A stub zone can be configured in an area, which will replace any networks learned by the ABR with a default route pointing to that ABR. This minimizes the routing updates that need to propagate that area, since any traffic not designated in that area gets sent to the default router.
All routers in a stub area need to be identified as such. If the "stub" flag is not set on a router in the stub area, an adjacency will not form. Also, networks within the stub area need to be manually summarized. To do that, enter the command:
R1(config-router)#area 51 range 172.16.1.0 255.255.252.0
To redistribute the default route into the OSPF topology table, use:
R1(config-router)#default-information originate
And OSPF commands that can be applied to an interface:
R1(config-router)#ospf cost 2
Modifies the cost of the route to force preference over another interface.
R1(config-router)#ospf priority 22
Modifies the router priority to set the DR/BDR election to take place. This is a best-practice in OSPF.
Comands used to verify OSPF and troubleshoot:
R1#show running-config
R1#show ip protocols
R1#sho ip ospf neigbor
R1#sho ip ospf database summary
R1#sho ip ospf interface
R1#debug ip ospf events
And onward we go! I think it may be time for a little STP.
Working my way toward being a Full Stack Engineer. I work for a state University leading the Systems Team, looking to chart a future of the data center and how it looks to build into the cloud in a responsible and innovative manner. This blog is largely a place to stash things I pick up in daily work life and pursuit of knowledge.
Showing posts with label OSPF. Show all posts
Showing posts with label OSPF. Show all posts
Tuesday, August 6, 2013
Yet more OSPF
Picking up where we left off yesterday...
The router ID is determined by selecting the highest IP address of a loopback interface on the router, and if no loopback interface is defined, OSPF selects the highest IP address on a physical interface. The loopback, or virtual interface is used because it can not go down due to L1 issues and will always be in an up/up state unless the router is not functioning correctly or powered off - in which case it won't participate in the OSPF process anyway...
OSPF may operate in one of three topologies, affecting the dead timers, hello packets and bandwidth conservation. The topolgies are:
To deter multicast storms, a DR and BDR are elected using first the router with the highest priority, which is an arbitrarily- assigned number with a default of 1, and if there is a tie the highest router ID. When there is a link state change, the DR and BDR are notified, and they update the other routers in the area. If a router is assigned a priority of 0, it is ineligible for DR/BDR election. In practice, however, the first router in an area to come online becomes the DR and the second becomes the BDR. To change the DR/BDR election results, the preferred router must be brought online and the existing DR/BDR rebooted. (NOTE: In my humble opinion, that defeats the purpose of an "election.")
This information is multicast to two different IP addresses. The DR/BDR listen for LSUs on 224.0.0.6, then multicast to the remaining routers on 224.0.0.5.
OSPF initialization takes place by the following steps:
The router ID is determined by selecting the highest IP address of a loopback interface on the router, and if no loopback interface is defined, OSPF selects the highest IP address on a physical interface. The loopback, or virtual interface is used because it can not go down due to L1 issues and will always be in an up/up state unless the router is not functioning correctly or powered off - in which case it won't participate in the OSPF process anyway...
OSPF may operate in one of three topologies, affecting the dead timers, hello packets and bandwidth conservation. The topolgies are:
- Broadcast, Multi-Access - several devices on a shared medium (such as ethernet). Hello is sent every 10 seconds, dead-timer is 40 seconds
- Non-Broadcast Multi-Access - several devices sharing medium, but clients are not privy to each others' broadcast and multicast traffic. Frame Relay is an example, and hello packets are sent every 30 seconds, with dead timers being every 120 seconds. NOTE: Dead timers are 4 times the hello by default.
- Point-to-point - only two devices share the medium, so there is no need to update hello and dead timers as often. Consider an ISP connection or WAN link using a /30 subnet mask.
To deter multicast storms, a DR and BDR are elected using first the router with the highest priority, which is an arbitrarily- assigned number with a default of 1, and if there is a tie the highest router ID. When there is a link state change, the DR and BDR are notified, and they update the other routers in the area. If a router is assigned a priority of 0, it is ineligible for DR/BDR election. In practice, however, the first router in an area to come online becomes the DR and the second becomes the BDR. To change the DR/BDR election results, the preferred router must be brought online and the existing DR/BDR rebooted. (NOTE: In my humble opinion, that defeats the purpose of an "election.")
This information is multicast to two different IP addresses. The DR/BDR listen for LSUs on 224.0.0.6, then multicast to the remaining routers on 224.0.0.5.
OSPF initialization takes place by the following steps:
- A router comes online and sends a hello packet out all interfaces participating in the OSPF process. The hello packet contains the router ID, hello/dead intervals, authentication password and area as well as DR and BDR addresses, as well as known neighbors and stub flags.
- Any router that receives the hello packet checks its configuration to make sure the area, password, hello/dead intervals and stub flags match exactly (if one of these parameters is different, the router will not form an adjacency). If the criteria is all identical, it will add that router to its topology table and respond with a hello and its information
- Once the first router receives a hello from the second, it adds the second to its topology table along with its neighbors
- Once all neighbor information is accumulated, the OSPF process runs the Dijkstra algorithm on its topology table to determine the shortest paths to the discovered networks
- If the topology has a DR elected, it queries the DR for the topology table and enters it into its own
Monday, August 5, 2013
OSPF Review - especially stub zones
I've had OSPF on my list of important things to re-learn. I had a pretty decent grasp of it a few years back, but simply haven't had much use of it in the field and need to go back over the particulars. I remember there being questions and an interactive problem on the exam regarding a stub zone the first time I took the exam, so I want to be prepared.
So here goes, narrative on OSPF:
OSPF was developed in 1988 to address the scalability issues of RIP. Where RIP is classful, OSPF is completely classless - so the subnet mask is sent along with every network of which OSPF is aware. This resolves the problems with dis-contiguous networks, as each subnet and subnet mask is placed into the topology table, however, this can lead to increased router resource consumption.
OSPF will run Dijkstra's Shortest Path First (SPF) algorithm on each network as it arrives on the router. This can cause heavy load on the router if there are a large number of routers in the autonomous system, especially when a link rapidly goes up and down, which is called "link flapping." Each router will receive an update each time the link changes state.
To minimize the effect of link state updates over a large network, OSPF breaks the autonomous systems into areas. Routers that link multiple areas are called Area Border Routers (or ABR) and these routers have the responsibility to summarize routes within their area and present them to adjacent areas. If there is a link failure within a summarized network, only the affected area is updated and the adjacent areas using the summary route are completely unaffected.
Area 0 is known as the backbone router, and all networks must be connected to the backbone in some way. Routers that are either completely inside area 0 or have an interface in area 0 are known as "backbone routers." The backbone is typically composed of fast network connections (100/1000 Mb/sec) because all interconnected areas send their traffic through it. Routers that have an interface in are 0 and another area are ABRs for that connected area.
A stub area is used to minimize the amount of traffic and utilization on routers where a single path in and out of the area exists. The stub area is an area where there is only one path in or out of the network. This reduces the amount of information in the topolgy table, because the ABR replaces any routes learned through it with a default route to itself and advertises that default route to the other routers within that area. Because area 0 is an interconnecting area, it can never be configured as a stub area. All routers within the stub area must have it defined using the stub keyword, such as:
R1(config-router)#area 51 stub
Once configured as a stub on all routers, the routers that are not ABR have their gateway of last resort set, where they had none before the stub configuration.
OSPF path cost is calculated using Dijkstra's SPF algorithm, which is 10^8 divided by the link bandwidth in bps. Therefore, costs to know are:
1 Gbs - cost 1
100 Mbs - cost 1
10 Mbs - cost 10
E1 - cost 48
T1 - cost 64
64K - cost 1562
56K - cost 1785
Path cost is determined by adding all costs between two endpoints, and SPF will put the route with the lowest cost into the routing table.
I'll intend to lab this up tonight or tomorrow, and will have more thoughts on it.
So here goes, narrative on OSPF:
OSPF was developed in 1988 to address the scalability issues of RIP. Where RIP is classful, OSPF is completely classless - so the subnet mask is sent along with every network of which OSPF is aware. This resolves the problems with dis-contiguous networks, as each subnet and subnet mask is placed into the topology table, however, this can lead to increased router resource consumption.
OSPF will run Dijkstra's Shortest Path First (SPF) algorithm on each network as it arrives on the router. This can cause heavy load on the router if there are a large number of routers in the autonomous system, especially when a link rapidly goes up and down, which is called "link flapping." Each router will receive an update each time the link changes state.
To minimize the effect of link state updates over a large network, OSPF breaks the autonomous systems into areas. Routers that link multiple areas are called Area Border Routers (or ABR) and these routers have the responsibility to summarize routes within their area and present them to adjacent areas. If there is a link failure within a summarized network, only the affected area is updated and the adjacent areas using the summary route are completely unaffected.
Area 0 is known as the backbone router, and all networks must be connected to the backbone in some way. Routers that are either completely inside area 0 or have an interface in area 0 are known as "backbone routers." The backbone is typically composed of fast network connections (100/1000 Mb/sec) because all interconnected areas send their traffic through it. Routers that have an interface in are 0 and another area are ABRs for that connected area.
A stub area is used to minimize the amount of traffic and utilization on routers where a single path in and out of the area exists. The stub area is an area where there is only one path in or out of the network. This reduces the amount of information in the topolgy table, because the ABR replaces any routes learned through it with a default route to itself and advertises that default route to the other routers within that area. Because area 0 is an interconnecting area, it can never be configured as a stub area. All routers within the stub area must have it defined using the stub keyword, such as:
R1(config-router)#area 51 stub
Once configured as a stub on all routers, the routers that are not ABR have their gateway of last resort set, where they had none before the stub configuration.
OSPF path cost is calculated using Dijkstra's SPF algorithm, which is 10^8 divided by the link bandwidth in bps. Therefore, costs to know are:
1 Gbs - cost 1
100 Mbs - cost 1
10 Mbs - cost 10
E1 - cost 48
T1 - cost 64
64K - cost 1562
56K - cost 1785
Path cost is determined by adding all costs between two endpoints, and SPF will put the route with the lowest cost into the routing table.
I'll intend to lab this up tonight or tomorrow, and will have more thoughts on it.
Subscribe to:
Posts (Atom)