⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 ospf.tex

📁 xorp源码hg
💻 TEX
📖 第 1 页 / 共 2 页
字号:
considering a neighbor dead. If no hello packets are seen from theneighbor in this time then it is considered dead.\item{\tt retransmit-interval}: This is the time in seconds betweenretransmitting various packets, such as link state update packets orlink state request packets.\item{\tt authentication}: This directive specifies the authenticationmechanism used to authorise OSPF updates sent and received via thisvif/address.  The authentication is configured by using one of the followingmutually-exclusive statements:\begin{description}\item{\tt simple-password}: this specifies the password used for  plaintext authentication on this vif/address.\item{\tt md5}: this specifies an MD5 authentication key. The parameter  is the key ID and must be in the interval [0, 255].  The MD5 authentication is configured by using the following  statements:\begin{description}  \item{\tt password}: this specifies the MD5 password for the specific  key.  \item{\tt start-time}: this specifies the start time when the key  becomes active. The format is ``YYYY-MM-DD.HH:MM''. If it is empty,  then the key should become active immediately.  \item{\tt end-time}: this specifies the end time when the key becomes  inactive. The format is ``YYYY-MM-DD.HH:MM''. If it is empty,  then the key should never expire.  \item{\tt max-time-drift}: this specifies the maximum time drift  (in seconds) among all OSPF routers.  The allowed values are in the  interval [0, 65535]. If the value is 65535, the time drift is  unlimited. The purpose of this statement is to decide when to start  accepting the MD5 keys in case other routers's clocks are not  syncronized and  have started to generate messages with a particular  key:\begin{description}  \item KeyStartAccept = KeyStartGenerate - MaxTimeDrift  \item KeyStopAccept  = KeyStopGenerate  + MaxTimeDrift\end{description}\end{description}If there are multiple configured keys, among the keys that are validfor message generation, the one with the most recent {\stt start-time}(and the largest key ID as a tie breaker) would be used to generate themessages.\end{description}\end{description}\item{\tt interface}: This specifies a network interface that should  be used by OSPF for routing.  See Chapter \ref{interfaces} for  details of interfaces.  The interface must be configured  in the {\stt interfaces} part of the router configuration.\begin{description}\item{\tt link-type}: This specifies the type of the link, {\sttbroadcast}, {\stt p2p} (Point-to-Point) or {\stt p2m} (Point-to-Multipoint).\begin{description}\item{\tt vif}: This specifies a vif that should be used by OSPF for routing.  See Chapter \ref{interfaces} for details of vifs.\begin{description}\item{\tt address}: This specifies an IPv4 address that should be used  by OSPF for routing.  OSPF will peer with other routers on this {\stt  interface/vif} using this {\stt address}.  The address must be a  valid configured address for this vif.  The parameters that can be specified for each address are:\begin{description}\item{\tt priority}: This is the priority used to select theDesignated Router on a {\stt broadcast} or {\stt nbma} {\sttlink-type}. The priorities range from 0 to 255. If a value of 0 ischoosen this router will not be a candidate to become the Designated Router\item{\tt hello-interval}: This is the time in seconds between sendinghello packets.\item{\tt router-dead-interval}: This is the time in seconds to wait beforeconsidering a neighbor dead. If no hello packets are seen from theneighbor in this time then it is considered dead.\item{\tt interface-cost}: The cost for this address that is placed inthe Router-LSA.\item{\tt retransmit-interval}:  This is the time in seconds betweenretransmitting various packets, such as link state update packets orlink state request packets.\item{\tt transit-delay}: The time to transmit an LSA on this address,this value is added to the age field of all LSAs.\item{\tt authentication}: This directive specifies the authenticationmechanism used to authorise OSPF updates sent and received via thisvif/address.  The authentication is configured by using same configuration statementsas those in case of virtual links (see the {\tt virtual-link}configuration statement above).%% The authentication is configured by using one of the following%% mutually-exclusive statements:%% \begin{description}%% \item{\tt simple-password}: this specifies the password used for%%   plaintext authentication on this vif/address.%% \item{\tt md5}: this specifies an MD5 authentication key. The parameter%%   is the key ID and must be in the interval [0, 255].%%   The MD5 authentication is configured by using the following%%   statements:%% \begin{description}%%   \item{\tt password}: this specifies the MD5 password for the specific%%   key.%%   \item{\tt start-time}: this specifies the start time when the key%%   becomes active. The format is ``YYYY-MM-DD.HH:MM''. If it is empty,%%   then the key should become active immediately.%%   \item{\tt end-time}: this specifies the end time when the key becomes%%   inactive. The format is ``YYYY-MM-DD.HH:MM''. If it is empty,%%   then the key should never expire.%%   \item{\tt max-time-drift}: this specifies the maximum time drift%%   (in seconds) among all OSPF routers.  The allowed values are in the%%   interval [0, 65535]. If the value is 65535, the time drift is%%   unlimited. The purpose of this statement is to decide when to start%%   accepting the MD5 keys in case other routers's clocks are not%%   syncronized and  have started to generate messages with a particular%%   key:%% \begin{description}%%   \item KeyStartAccept = KeyStartGenerate - MaxTimeDrift%%   \item KeyStopAccept  = KeyStopGenerate  + MaxTimeDrift%% \end{description}%% \end{description}%% \end{description}\item{\tt passive}: This takes the value {\stt true} or {\sttfalse}. The default setting is {\stt false} it can be set to {\stttrue} to set the interface in loopback. The protocol is no longer runon this address and the Router-LSA contains a host route for this address.\item{\tt neighbor}: This allows neighbors to be configured for {\sttlink-type}s of {\stt p2p} or {\stt p2m}. The parameter is the IPv4address of the neighbor. The {\stt router-id} of the neighbor mustalso be configured.%% \begin{description}%% \item{\tt router-id}:%% \end{description}\item{\tt disable}:  This takes the value {\stt true} or {\sttfalse}. The default setting is {\stt false} it can be set to {\stttrue} to disable OSPF on this address without removing all the configuration.\end{description}\end{description}\end{description}\end{description}\end{description}\end{description}\subsection{Example Configurations}\vspace{0.1in}\noindent\framebox[\textwidth][l]{\scriptsize\begin{minipage}{6in}\begin{alltt}\begin{tabbing}xx\=xx\=xx\=xx\=xx\=\killprotocols \{\\\>ospf4 \{\\\>\>router-id: 10.10.10.10\\\\\>\>area 0.0.0.0 \{\\\>\>\>interface dc0 \{\\\>\>\>\>vif dc0 \{\\\>\>\>\>\>address 10.10.10.10 \{\\\>\>\>\>\>\}\\\>\>\>\>\}\\\>\>\>\}\\\>\>\}\\\>\}\\\}\\\end{tabbing}\end{alltt}\end{minipage}}This configuration is an example of the minimal possibleconfiguration. OSPFv2 is running in the {\tt BACKBONE} area, on a singleinterface/vif the {\tt router-id} is set to the interface/vif address.\vspace{0.1in}\noindent\framebox[\textwidth][l]{\scriptsize\begin{minipage}{6in}\begin{alltt}\begin{tabbing}xx\=xx\=xx\=xx\=xx\=\killprotocols \{\\\>ospf6 \{\\\>\>router-id: 10.10.10.10\\\\\>\>area 0.0.0.0 \{\\\>\>\>interface dc0 \{\\\>\>\>\>vif dc0 \{\\\>\>\>\>\}\\\>\>\>\}\\\>\>\}\\\>\}\\\}\\\end{tabbing}\end{alltt}\end{minipage}}This configuration is an example of the minimal possibleconfiguration. OSPFv3 is running in the {\tt BACKBONE} area, on a singleinterface/vif the {\tt router-id} is set to an an IPv4 address ownedby the router.\newpage\section{Monitoring OSPF}On a router running OSPF, the OSPF routing state can be displayedusing the {\stt show ospf4} or {\stt show ospf6} operational-modecommand. Examples are given below of ospf4 commands equivalent ospf6commands are available. Information is available about the per areaLSA databases and the status of OSPF adjacencies.As always, command completion using $<$TAB$>$ or ? will display theavailable sub-commands and parameters:\vspace{0.1in}\noindent\framebox[\textwidth][l]{\scriptsize\begin{minipage}{6in}\begin{alltt}\begin{tabbing}xx\=xxxxxxxxxxxxxxxxxxxxx\=\killuser@hostname> \textbf{show ospf4 ?}\\Possible completions:\\\>database\>Show LSA database\\\>neighbor\>Show Neighbors\\\>|\>Pipe through a command\\\end{tabbing}\end{alltt}\end{minipage}}The {\stt show ospf4 database} command will display information about theLSAs in the database. Many optional parameters are available to narrowthe search to specific LSA type or to an area. The optional parameter{\stt detail} will print more information about a LSA. The optionalparameter {\stt summary} prints a count of the LSAs.\vspace{0.1in}\noindent\framebox[\textwidth][l]{\scriptsize\begin{minipage}{6in}\begin{alltt}\begin{tabbing}xx\=xxxxxxxxxxxxxxxxxxxxx\=\killuser@hostname> \textbf{show ospf4 database ?}\\Possible completions:\\\><[Enter]>\>Execute this command\\\>  area            \>Show LSA database\\\>  asbrsummary     \>Show Summary-LSA (AS boundary router) database\\\>  brief           \>Display brief output (default)\\\>  detail          \>Display detailed output\\\>  external        \>Show External-LSA database\\\>  netsummary      \>Show Summary-LSA (network) database\\\>  network         \>Show Network-LSA database\\\>  nssa            \>Show NSSA-LSA database\\\>  router          \>Show Router-LSA database\\\>  summary         \>Display summary output\\\>|\>Pipe through a command\\\end{tabbing}\end{alltt}\end{minipage}}\newpageThe {\stt show ospf4 database} command with no modifiers will show allLSA types in all areas:\vspace{0.1in}\noindent\framebox[\textwidth][l]{\scriptsize\begin{minipage}{6in}\begin{alltt}\begin{tabbing}%%\=xxxxxxxxx\=xxxxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxxxx\=xxxxxxxx\=xxxxxxxx\=xxxxxxxx\=xxxxxxxx\=xxxxxxxx\=xxxxxxxx\=\killuser@hostname> \textbf{show ospf4 database}\\   OSPF link state database, Area 0.0.0.0\\\=xxxxxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxxxxxx\=xxxxx\=xxxxx\=xxxxxxx\=\kill\>Type\>       ID\>               Adv Rtr\>           Seq\>      Age\>  Opt\>  Cksum\>  Len\\\=xxxxxxxx\=x\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxx\=xxxxx\=xxxxx\=xxxxxxx\=\kill\>Router\>*\>  192.150.187.112\>192.150.187.112\>0x8000018f\>1444\>0x2\>  0x9d24\>          36\\\>Network\>\>  192.150.187.99\>   192.150.187.99\>   0x80000054\>   167\>  0x22\> 0x7c63\>  40\\\>SummaryN\>*\>172.16.0.0\>       192.150.187.112\>  0x80000188\>  1453\>  0x2\>  0x9df5\>  28\\\>SummaryN\>*\>172.16.1.0\>       192.150.187.112\>  0x80000188\>  1453\>  0x2\>  0x92ff\>  28\\\>SummaryN\>*\>172.16.2.0\>       192.150.187.112\>  0x80000188\>  1453\>  0x2\>  0x870a\>  28\\\>Router\>\>   192.150.187.99\>   192.150.187.99\>   0x80000e76\>   167\>  0x22\> 0xddf7\>  36\\\>Router\>\>   192.150.187.5\>    192.150.187.5\>    0x800004a6\>   983\>  0x2\>  0x40a8\>  36\\\>Router\>\>   192.150.187.108\>  192.150.187.108\>  0x80000301\>   598\>  0x2\>  0xb9a1\>  36\\\>ASExt-2\>\>  172.16.0.0\>       192.150.187.5\>    0x800003a9\>   990\>  0x2\>  0x77c1\>  36\\   OSPF link state database, Area 0.0.0.13\\\=xxxxxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxxxxxx\=xxxxx\=xxxxx\=xxxxxxx\=\kill\>Type\>       ID\>               Adv Rtr\>           Seq\>      Age\>  Opt\>  Cksum\>  Len\\\=xxxxxxxx\=x\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxx\=xxxxx\=xxxxx\=xxxxxxx\=\kill\>Router\>*\>  192.150.187.112\>  192.150.187.112\>  0x80000001\>  1454\>  0x2\>  0x8a03\>  36\\\>SummaryN\>*\>192.150.187.0\>    192.150.187.112\>  0x80000001\>  1443\>  0x2\>  0x4ef6\>  28\\\>SummaryN\>*\>172.16.1.0\>       192.150.187.112\>  0x80000001\>  1453\>  0x2\>  0xa476\>  28\\\>SummaryN\>*\>172.16.2.0\>       192.150.187.112\>  0x80000001\>  1453\>  0x2\>  0x9980\>  28\\\>SummaryR\>*\>192.150.187.5\>    192.150.187.112\>  0x80000001\>  1443\>  0x2\>  0xbb4\>   28\\\>ASExt-2\>\>  172.16.0.0\>       192.150.187.5\>    0x800003a9\>   990\>  0x2\>  0x77c1\>  36\\   OSPF link state database, Area 0.0.0.2\\\=xxxxxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxxxxxx\=xxxxx\=xxxxx\=xxxxxxx\=\kill\>Type\>       ID\>               Adv Rtr\>           Seq\>      Age\>  Opt\>  Cksum\>  Len\\\=xxxxxxxx\=x\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxx\=xxxxx\=xxxxx\=xxxxxxx\=\kill\>Router\>*\>  192.150.187.112\>  192.150.187.112\>  0x80000001\>  1454\>  0x2\>  0x93f8\>  36\\\>SummaryN\>*\>192.150.187.0\>    192.150.187.112\>  0x80000001\>  1443\>  0x2\>  0x4ef6\>  28\\\>SummaryN\>*\>172.16.0.0\>       192.150.187.112\>  0x80000001\>  1453\>  0x2\>  0xaf6c\>  28\\\>SummaryN\>*\>172.16.2.0\>       192.150.187.112\>  0x80000001\>  1453\>  0x2\>  0x9980\>  28\\\>SummaryR\>*\>192.150.187.5\>    192.150.187.112\>  0x80000001\>  1443\>  0x2\>  0xbb4\>   28\\\>ASExt-2\>\>  172.16.0.0\>       192.150.187.5\>    0x800003a9\>   990\>  0x2\>  0x77c1\>  36\\   OSPF link state database, Area 0.0.0.3\\\=xxxxxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxxxxxx\=xxxxx\=xxxxx\=xxxxxxx\=\kill\>Type\>       ID\>               Adv Rtr\>           Seq\>      Age\>  Opt\>  Cksum\>  Len\\\=xxxxxxxx\=x\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxx\=xxxxx\=xxxxx\=xxxxxxx\=\kill\>Router\>*\>  192.150.187.112\>  192.150.187.112\>  0x80000001\>  1454\>  0x2\>  0x9cee\>  36\\\>SummaryN\>*\>192.150.187.0\>    192.150.187.112\>  0x80000001\>  1443\>  0x2\>  0x4ef6\>  28\\\>SummaryN\>*\>172.16.0.0\>       192.150.187.112\>  0x80000001\>  1453\>  0x2\>  0xaf6c\>  28\\\>SummaryN\>*\>172.16.1.0\>       192.150.187.112\>  0x80000001\>  1453\>  0x2\>  0xa476\>  28\\\>SummaryR\>*\>192.150.187.5\>    192.150.187.112\>  0x80000001\>  1443\>  0x2\>  0xbb4\>   28\\\>ASExt-2\>\>  172.16.0.0\>       192.150.187.5\>    0x800003a9\>   990\>  0x2\>  0x77c1\>  36\\\end{tabbing}\end{alltt}\end{minipage}}The {\stt show ospf4 neighbor} command will show state of adjacencies:\vspace{0.1in}\noindent\framebox[\textwidth][l]{\scriptsize\begin{minipage}{6in}\begin{alltt}\begin{tabbing}user@hostname> show ospf4 neighbor\\\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxxxxxx\=xxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxx\=\kill\>  Address\>         Interface\>             State\>      ID\>              Pri\>  Dead\\\>192.150.187.5\>    fxp0/fxp0\>              Full\>      192.150.187.5\>    150\>    34\\\>192.150.187.99\>   fxp0/fxp0\>              Full\>      192.150.187.99\>   128\>    34\\\>192.150.187.108\>  fxp0/fxp0\>              TwoWay\>    192.150.187.108\>  128\>    34\\\>192.150.187.78\>   fxp0/fxp0\>              Down\>      0.0.0.78\>           0\>     0\\\end{tabbing}\end{alltt}\end{minipage}}\newpageThe {\stt show ospf4 neighbor detail} command will show state ofadjacencies with extra detail such as the Designated Router and thetime the adjacency has been up:\vspace{0.1in}\noindent\framebox[\textwidth][l]{\scriptsize\begin{minipage}{6in}\begin{alltt}\begin{tabbing}user@hostname> show ospf4 neighbor detail\\\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxxxxxx\=xxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxx\=\kill\>  Address\>         Interface\>             State\>      ID\>              Pri\>  Dead\\\>192.150.187.5\>    fxp0/fxp0\>              Full\>      192.150.187.5\>    150\>    33\\\=xxxxxxxxxxxxxxxxxx\=xxxxxxxxx\=xxxxxxxxxxxxxxxxxxx\=\kill\>  Area 0.0.0.0,\> opt 0x2,\> DR 192.150.187.99,\> BDR 192.150.187.5\\\>  Up 54:09:26,\> adjacent 54:09:16\\\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxxxxxx\=xxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxx\=\kill\>192.150.187.99\>   fxp0/fxp0\>              Full\>      192.150.187.99\>   128\>    38\\\=xxxxxxxxxxxxxxxxxx\=xxxxxxxxx\=xxxxxxxxxxxxxxxxxxx\=\kill\>  Area 0.0.0.0,\> opt 0x2,\> DR 192.150.187.99,\> BDR 192.150.187.5\\\>  Up 54:09:26,\> adjacent 54:09:16\\\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxxxxxx\=xxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxx\=\kill\>192.150.187.108\>  fxp0/fxp0\>              TwoWay\>    192.150.187.108\>  128\>    33\\\=xxxxxxxxxxxxxxxxxx\=xxxxxxxxx\=xxxxxxxxxxxxxxxxxxx\=\kill\>  Area 0.0.0.0,\> opt 0x2,\> DR 192.150.187.99,\> BDR 192.150.187.5\\\>  Up 54:09:26\\\=xxxxxxxxxxxxxxxx\=xxxxxxxxxxxxxxxxxxxx\=xxxxxxxxx\=xxxxxxxxxxxxxxxx\=xxxx\=\kill\>192.150.187.78\>   fxp0/fxp0\>              Down\>      0.0.0.78\>           0\>    0\\\=xxxxxxxxxxxxxxxxxx\=xxxxxxxxx\=xxxxxxxxxxxxxxxxxxx\=\kill\>  Area 0.0.0.0,\> opt 0,\> DR 0.0.0.0,\> BDR 0.0.0.0\\\>  Up 14:47:32\\\end{tabbing}\end{alltt}\end{minipage}}

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -