Penguin
Annotated edit history of OSPF version 20, including all changes. View license author blame.
Rev Author # Line
15 LindsayDruett 1 !!!__O__pen __S__hortest __P__ath __F__irst
2
3 Open Shortest Path First (OSPF) is a routing protocol developed for Internet Protocol (IP) networks by the interior gateway protocol (IGP) working group of the Internet Engineering Task Force (IETF).
4
5 [Infromation about OSPF from Cisco Systems|http://www.cisco.com/application/pdf/en/us/guest/tech/tk480/c1550/ccmigration_09186a0080187c6d.pdf]
6 %%%
7 ''-- Great document apart from the fact that someone from Cisco must have written it for their Grandma''
8 ----
9 !!OSPF Configuration on Zebra
10
11
12 Ok, to get OSPF going first hack zebra.conf and ospfd.conf
13
14
15 The remote stations need stuff like this ;
16
17 # [Zebra].conf
18 #
19 hostname whatever
20 password passwd
21 enable password passwd
22
23 router ospf
24 network 192.168.67.0/24 area 0
25
26 #
27 log /var/log/ospd.log
28 # end
29
30 ONLY advertise networks that this device is responsible for.
31
18 LindsayDruett 32
33 ----
34 !!Single Area OSPF Configuration on Cisco Routers
35
36 Global Router Configurations
37
38 Router(config)#__router ospf__ ''<process-number>''
39 ''- Starts the OSPF process and identifies it with a process ID.''
40 Router(config-router)#__network__ ''<network> <wildcard-mask>'' __area 0__
41 ''- Identifies which networks - and which interfaces - partake in the OSPF process.''
42 Router(config-router)#__router-id__ ''<ip-address>''
43 ''- Used to define the RID of the router.''
44
45 Example of configuring the Router ID
46
20 LindsayDruett 47 <pre>
18 LindsayDruett 48 Router(config)#__interface loopback 0__
49 Router(config-if)#__ip address 192.168.254.1 255.255.255.0__
50 Router(config-if)#__!__
51 Router(config)#__router ospf 100__
52 Router(config-router)#__router-id 192.168.254.1__
20 LindsayDruett 53 </pre>
18 LindsayDruett 54
55 Interface Level Configurations
56
57 Router(config-if)#__ip ospf cost__ ''<cost>''
58 ''- Sets the cost or metric for the outgoing interface.''
59 Router(config-if)#__auto-cost reference-bandwidth__ ''<reference-bandwidth>''
60 ''- Allows the administrator to change the formula used to calculate the metric.''
61 Router(config-if)#__ip ospf priority__ ''<number>''
62 ''- Helps to determine which router on a multicast network will be elected as the DR/BDR.''
63 Router(config-if)#__ip ospf network__ ''<network-type>''
64 ''- Identifies the type of network to the OSPF process, which will determine how the adjacencies are created.''
65 Router(config-if)#__neighbor__ ''<ip-address>'' (__priority__ ''<number>'') (__poll-interval__ ''<sec>'') (__cost__ ''<number>'')
66 ''- States the neighbor, its address, and its capability to become the DR.''
67 ''- This command also allows the configuration of cost and the timers on the interface.''
68
69 Operation Verification Commands
70
71 Router#__show ip ospf__
72 ''- Shows the OSPF process and it's details.''
73 Router#__show ip ospf database__
74 ''- Show the contents of the topological database.''
75 Router#__show ip ospf interface__
76 ''- Gives information about how OSPF has been configured on each interface''
77 Router#__show ip ospf neighbor__
78 ''- Displays all the information about the relationship that the router has with it's neighbors.''
79 Router#__show ip protocols__
80 ''- Enables you to view the IP routing protocol configuration on the router.''
81 Router#__show ip route__
82 ''- Shows detailed information about the networks the router is aware and the preferred paths to those networks.''
83 ''- Also gives the next logical hop as the next step in the path.''
84
85 Troubleshooting Commands
86
87 ''With troubleshooting using debug, if you're connected via the console port, turn on console logging (Router(config)#__logging console__) or if connected by virtual terminal, turn on the logging monitor (Router#__term mon__)''
88
89 Router#__debug ip ospf events__
90 ''- Displays information about OSPF-related events.''
91 Router#__debug ip packet__
92 ''- Ip debugging information includes packets received, generated, and forwarded.''
15 LindsayDruett 93
94 ----
95 !!User Comments on Implementing OSPF
96
19 CraigBox 97 Perry says to stick everything in area 0, <shrug> so do it his way ok..
15 LindsayDruett 98
99 PerryLorier: Yeah, because dealing with area's is a bitch, and if you are just learning, stick everything in area 0, when your network gets large enough that convergance times are starting to become a worry, think about different areas then, but before that time, stick everything in area 0 and you'll save yourself a lot of hassle. Also, remember that Area 0 is "special" to [OSPF], so if you decide to use area 42 or whatever, it __will__ break.
100
18 LindsayDruett 101 LindsayDruett: Dealing with multiple areas is not really that bad, however, you must remember that all Areas __must__ connect directly to Area 0, that is because Area 0 is the __backbone__ Area.
16 LindsayDruett 102
17 LindsayDruett 103 If you __really__ can't meet the requirements of directly connecting to Area 0 and have to go through another area instead, you can insert a __''Virtual Link''__ - ''However, it is not a recommended strategy, I don't know if this feature is available on routers other than Cisco, but either way it is strongly advised to avoid using virtual links.''
16 LindsayDruett 104
17 LindsayDruett 105 It is good practice to configure a Loopback Interface (other than 127.0.0.1) on your OSPF router and use that Loopback interface for the OSPF RouterID. Also it is a good idea to configure it as the OSPF Router ID rather than letting the router discover that address as the OSPF RouterID.
16 LindsayDruett 106
107 It is also good practice to limit each area to 50 routers, make sure that each router has no more than 60 neighbors, that neighbor is spelled the American way, each Area Border router doesn't have more than 3 areas, and that you set the OSPF priority so that it doesn't get elected as a DR or BDR for more than 1 network.
15 LindsayDruett 108
109 ----
110 !!OSPF Fundamentals
111
112 OSPF Neighbors
113 *A router configured for OSPF sends out a small hello packet periodically. It has the source address of the router and a multicast destination address set to __AllSPFRouters__ which is __224.0.0.5__. All routers running OSPF listen to the protocol and send their own hello packets periodically.
114 *When the topology databases of the neighbors are the same (synchronized), the neighbors are ''fully adjacent''. To ensure that the link is maintained and the topology databases are up to date and accurate, the Hello packet continues to transmit.
115
116 DR/BDR Election Process
117 *Highest OSPF Priority Number
118 **Priority is set between 0-255
119 **Priority 0 means that the router is abstaining for DR/BDR Election
120 *Highest IP Address (Router ID)
121 **Cisco routers will submit their highest IP Address configured on a Loopback Interface if there is a Loopback Interface configured rather than use the highest IP Address configured on a physical interface of the router. If there is no Loopback Interface configured then the highest IP Address configured on a physical interface will be used.
122
123 Timers
124 *Hello Timers
125 **10 Seconds on the default multicast media
126 **40 Seconds in instances where hello packets are tansmitted in unicast environments
127 *Dead Timers
128 **4 times the hello timer period
129 *Complete OSPF Database purge and update
130 **30 Minutes
131
132 Five packets are used to build the routing table for the first time.
133 *Hello Protocol (Hello Packet)
134 *Database Descriptor (DDP Packet)
135 *Link-state Request (LSR Packet)
136 *Link-state Update (LSU Packet)
137 *Link-state Acknowledgement (LSACK Packet)
138
139 ----
140 !!OSPF Topologies
141 *Broadcast Multiaccess Network.
142 **Broadcast multiaccess in any LAN Network, such as Ethernet, Token Ring, or FDDI. In this environment, OSPF sends out multicast traffic. A DR and a BDR will be elected.
143 *Point-to-Point Network.
144 **Point-to-Point technology is used where there is only one router directly connected to the transmitting or receiving router, such as PPP, SDLC, HDLC, etc. OSPF has no need for a DR or BDR in this scenario. OSPF messaging is sent using the multicast address for __AllSPFRouters__ (224.0.0.5).
145 *Point-to-Multipoint Network.
146 **Point-to-Multipoint is a single interface that connects to multiple destinations. The underlying network treats the network as a series of point-to-point circuits. It replicates LSA packets for each circuit. OSPF traffic is sent as multicast. There is no DR or BDR election. This technology uses one IP subnet for all endpoints on the network.
147 *Nonbroadcast Multiaccess Network.
148 **Physically, some point-to-multipoint networks cannot support multicast or broadcast traffic. In an NBMA topology, special configuration is required. NBMA physically resembles a point-to-point line, but in fact, many destinations are possible. WAN clouds, including x.25 and Frame Relay, are examples of this technology. It is recommended that when deploying Frame Relay that sub-interfaces are configured.
149
20 LindsayDruett 150 <?plugin OldStyleTable
15 LindsayDruett 151 |OSPF over NBMA|__Point-to-Multipoint Nonbroadcast__|__Point-to-point__|__Broadcast__|__NBMA__|__Point-to-Multipoint__
152 |''Addressing''|Unicast|Multicast|Multicast|Unicast|Multicast
153 |''DR/BDR''|No|No|Yes|Yes (Manual)|No
154 |''Manual Configuration of Neighbors''|Yes|No|No|Yes|No
155 |''Hello Timer''|30 Sec|10 Sec|10 Sec|30 Sec|30 Sec
156 |''Dead Timer''|120 Sec|40 Sec|40 Sec|120 Sec|120 Sec
157 |''Compliance''|Cisco|Cisco|Cisco|RFC 2328|RFC 2328
158 |''Network Supported''|Star, Partial Mesh|Star, Sub-Interfaces|Full Mesh|Full Mesh|Star, Partial Mesh
159 |''Replicates Packets''|Yes|Yes|Yes|Yes|Yes
160 |''Number of Subnets''|1|Many (1 Per circuit)|1|1|1
20 LindsayDruett 161 ?>
15 LindsayDruett 162
163 ----
164 !!OSPF in multiple areas
165
166 Router Types
167 *Internal Router
168 *Backbone Router
169 *Area Backbone Router (ABR)
170 *Automonous System Boundary Router (ASBR)
171
172 Common Link-state Advertisemnets (LSA) Types
173
20 LindsayDruett 174 <?plugin OldStyleTable
15 LindsayDruett 175 |Type 1|Router Link LSA|Intra-area LSA
176 |Type 2|Network Link LSA|Intra-area LSA
177 |Type 3|Network Summary Link LSA|Inter-area LSA
178 |Type 4|AS external ASBR Summary Link LSA|Inter-area LSA
179 |Type 5|External Link LSA|Originated by AS boundary routers
180 |Type 7|Not So Stubby Area external LSA|Summary LSA
20 LindsayDruett 181 ?>
15 LindsayDruett 182 ----
183 !!OSPF Terms
184
20 LindsayDruett 185 <?plugin OldStyleTable
15 LindsayDruett 186 |Adjacency|Formed when two neighboring routers have exchanged information and have the same topology table. The databases are synchronized, and they both see the same networks.
187 |Area|A group of routers that share the same area ID. Each router in the area has the same topology table. The area is defined on an interface basis in the configuration of OSPF.
188 |Autonomous System|Routers that share the same routing protocol with the organization.
189 |Backup Designated Router (BDR)|The backup to the Designated Router (DR), in case the DR fails. The BDR performs none of the DR functions while the DR is operating correctly.
190 |Cost|The metric for OSPF. It is not defined in the standard with a value. Cisco use the default of the inverse of bandwitdh so that the higher the speed of the link, the lower the cost, and, therefore, the more attractive the path.%%%This default can be overridden by by a manual configuration. This should be done only if you have full knowlege of the network.
191 |Database descriptor|Referred to as DBDs or Database Descriptor Packets (DDPs). These are packets exchanged between neighbors during the exchange state. The DDPs contain a summary of the LSA, which describe the links of every router in the neighbor's topology table.
192 |Designated Router (DR)|Router responsible for making adjacencies with all neighbors on a multiaccess network, such as Ethernet or FDDI. The DR represents the multiaccess network, in that it ensures that every router on the link has the same topology database.
193 |Dijkstra Algorithm|A complex algorithm used by routers running link-state routing protocols to find the shortest path to the destination.
194 |Exchange State|Method by which two neighboring routers discover the map of the network. When these routers become adjacent, they must first exchange DDPs to ensure that they have the same topology table.
195 |Exstart State|State in which the neighboring routers determine the sequence number of the DDPs and establish the master/slave relationship.
196 |Flood|A term that refers to network information. When network information is flooded, it is sent to every network device in the domain.
197 |Fully Adjacent|When the routing tables of the two neighbors are fully synchronized, with exactly the same view of the network.
198 |Init State|State in which a hello packet has been sent from the router, which is waiting for a reply to establish two-way communication.
199 |Internal Router|A router that has all it's interfaces in the same area.
200 |Link-state Advertisement (LSA)|A packet describing a router's links and the state of those links. There are different types of LSAa to describe the different types of links.
201 |Link-state database|Otherwise known as the topology map, the link-state database has a map of every router, its links, and the state of the links. It also has a map of every network and every path to each network.
202 |Link-state Request (LSR)|When the router recieves a DDP complete with summary of the LSA information, it compares the LSA against the topological database. If either the LSA entry is not present bor the entry is older than the DDP, it will request further information.
203 |Link-state update (LSU)|Update sent in response to the LSR. It is the LSA that was requested.
204 |Loading State|State in which, if the receiving router requires more information during the process in which two routers are creating an adjacency, it will request that particular link in more detail using the LSR packet. The LSR will prompt the master router to send the LSU packet. This is the same as an LSA used to flood the network with routing information. While the recieving router is awaiting the LSUs from its neighbor, it is in the loading state.
205 |Neighbor|A router on the same link with whom routing information is exchanged.
206 |Neighbor Table|A table built from hello messages received from the neighbors. The hello message also carries a list of the neighbors.
207 |Priority|The means by which the DR can be manually elected - or, conversely, prevented from taking part in the DR/BDR election.
208 |Shortest Path First (SPF)|The same as Dijkstra algorithm, which is the algorithm used to find the shortest path.
209 |SPF Tree|A tree of the topological network. It can be drawn after the SPF algorithm has been run. The algorithm prunes the database of alternate paths and creates a loop-free shortest path to all networks. The router is at the root of the network, which is percieved from its perspective.
210 |Topology Table|The same as a link-state database. the table contains every link in the wider network.
211 |Two-way state|State during the process in which two routers are creating an adjacency. The new router see it's own router ID in the list of neighbors, and a neighbor relationship is established. This is the stage before routing information is exchanged.
20 LindsayDruett 212 ?>
15 LindsayDruett 213
214 ----
215 [OSPFvsISIS]
216 %%%
217 CategoryNetworking

PHP Warning

lib/blame.php:177: Warning: Invalid argument supplied for foreach() (...repeated 4 times)