You are on page 1of 14

Difference between Distance Vector and Link state routing protocol

Difference between Distance vector & Link State protocol

Distance Vector Protocol :

‡ Entire routing table is sent as an update ‡ Distance vector protocol send periodic update at every 30 or 90 second ‡ Update are broadcasted ‡ Updates are sent to directly connected neighbor only ‡ Routers don't have end to end visibility of entire network. ‡ Distance vector routing protocol network may have patch in network carrying wrong information ‡ It is proned to routing loops ‡ Routing loop avoidance Mechanism used are as below : 1> 2> 3> 4> Max Hop Count Spliti horizon Route poisoning Hold down Timer

‡ Distance vector routing protocol has slow convergance due to periodic update.

‡ Eg. RIP ,IGRP , BGP .

Link state protocol :

‡ Updates are incremental & enitire routing table is not sent as update ‡ Updates are triggered not periodic ‡ Updates are multicasted ‡ Update are sent to entire network & to just directly connected neighbor ‡ Updates are carry SPF tree information & SPF cost Calculation information of entire

topology ‡ Routers have visibility of entire network of that area only. ‡ Eg. search Dijkstra's algorithm . IS-IS Dijkstra's algorithm From Wikipedia. ‡ No routing loops ‡ Convergance is fast because of triggered updates. : OSPF . the free encyclopedia Jump to: navigation.

Dijkstra's algorithm runtime Class Search algorithm Data structure Graph Worst case performance O( | E | + | V | log | V | ) Graph search algorithms and Tree search algorithms Dijkstra's algorithm. Dijkstra's algorithm will assign some initial distance values and will try to improve them step by step. conceived by Dutch computer scientist Edsger Dijkstra in 1956 and published in 1959. producing a shortest path tree. Moore in 1957.e. the algorithm finds the path with lowest cost (i. most notably IS-IS and OSPF (Open Shortest Path First).[1][2] is a graph search algorithm that solves the single-source shortest path problem for a graph with nonnegative edge path costs. An equivalent algorithm was developed by Edward F. It can also be used for finding costs of shortest paths from a single vertex to a single destination vertex by stopping the algorithm once the shortest path to the destination vertex has been determined. As a result. the shortest path first is widely used in network routing protocols. the shortest path) between that vertex and every other vertex. For example. Let the node at which we are starting be called the initial node. . Let the distance of node Y be the distance from the initial node to Y. This algorithm is often used in routing.[3] For a given source vertex (node) in the graph. Dijkstra's algorithm can be used to find the shortest route between one city and all other cities. if the vertices of the graph represent cities and edge path costs represent driving distances between pairs of cities connected by a direct road.

and vice versa. Using a Virtual Link Where an Area Is Not Attached to the Backbone Example 8-7 shows the configuration required for a virtual link between Router E and Router B. such as "Area 0.0. virtual links are needed.0" or as a decimal number format. Area 2 is the transit area between Routers E and B. Figure 8-18. An area is a 32-bit number that can be defined either in an IP address format of "Area 0. which is required if more than one area is configured. All areas must be connected to Area 0. the virtual link will stay up . Router E will form a virtual link with Router B's router ID. otherwise.OSPF Areas OSPF provides two levels of hierarchy throughout an area." Area 0 is a backbone area.0. It is recommended that you use a loopback IP address as a router ID because loopback links always stay up. as shown in Figure 8-18. therefore.

the virtual link between routers C and D is to back up Area 0 if the link between Routers E and F fails.Figure 8-19. C. and Router C and D form a virtual link with transit Area 1 between them. The virtual link between Routers A and B is to back up Area 3 connectivity. and D OSPF has several types of areas. B. Routers A and D form a virtual link between each other with transit Area 2. and D. Example 8-8 Configuring the Virtual Link Between Routers A. C. Using a Virtual Link as a Backup Example 8-8 shows the configuration of Routers A. which can be defined according to the needs of a network: y y y y y Normal area Stub area Totally stubby area Not-so-stubby area (NSSA) Totally not-so-stubby area . B.

indicating that the area is incapable of importing any external LSAs. Normal Areas When the area is defined by default. Normal areas have the following characteristics: y y y Summary LSAs from other areas are injected. the E bit is clear. External default LSAs can be injected. it is considered a normal or regular area. Figure 8-21. The default route is injected as a summary route. no external LSAs are allowed. In Figure 8-21. OSPF Normal Area Example Stub Areas In stub areas. Stub areas have the following characteristics: y y y Summary LSAs from other areas are injected. Recall the Options field in OSPF Hello packet. In cases of stub areas. IGRP routes are redistributed into Area 1. . One of the bits in that option field is the E bit. External LSAs are injected.The sections that follow cover the different OSPF areas in greater detail. and RIP routes are redistributed into Area 2. External LSAs are not injected. Area 1 and Area 2 are normal areas.

H. RIP routes that are injected at Router E as OSPF externals are blocked at Router F. Example 8-10 Configuring Area 1 as a Stub Area RouterF# router ospf 1 area 1 stub Totally Stubby Areas Totally stubby areas are the most restricted form of area. Routers in this type of area rely on only the injection of a default summary route from the ABR. or G need to send a packet to external destination. Area 1 still receives the summary route created for Area 2 by Router F (ABR). No redistribution can take place at Routers I. This area has the following characteristics: y y No summary LSAs are allowed. This is an extension to the stub area. Stub Area Example Example 8-10 shows the configuration required to make Area 1 a stub area. No external LSAs are allowed. This stub configuration must be done on all the routers in Area 1. . which is Router F in this case. Figure 8-22. however. No other external or summary information is included in the routing table. A default summary LSA also will be injected by the ABR (Router F) into Area 1. Also. they will always forward the packet to the nearest ABR. so all the characteristics are still true for this area. Area 1 is defined as a stub area. This means that if Routers I. or G because no Type 5 LSAs are allowed by stub areas. H.In Figure 8-22.

The keyword nssa must be typed on all the routers that are part of Area 1. When Area 1 is changed into an NSSA. Suppose in Figure 8-12 that Area 1 is defined as a stub area and there is a requirement of redistribution of an IGRP route into that area. Type 7 LSAs are converted into Type 5 LSAs at the NSSA ABR. which is marked with O IA. NSSAs were created to inject external routes from stub areas into the OSPF domain. The only routes that Area 1 will have are the intra-area (marked with O in the routing table) routes for Area 1 and the default route injected by the ABR. get converted into Type 7 LSAs. as shown Figure 8-21 . The ABR translates this LSA to a Type 5 LSA. Example 8-12 shows the configuration example for an NSSA area.y The default route is injected as a summary route. however. the configuration change needs to happen only at the ABR.2. RIP routes are not injected into Area 1 as OSPF external routes. In Figure 8-13. Because this is an extension of a stub area. The Type 7 LSA flooding scope is within the NSSA area. which is propagated to the rest of the autono-mous system. Area 1 will not receive any summary route or any external routes. If Area 1 were defined as stub. Note that the difference between the stubby area and the totally stubby area is that no summary LSA is generated into a totally stubby area. In the NSSA. Example 8-11 Configuring the ABR (Router F) to Make Area 1 Totally Stubby RouterF# router ospf 1 area 1 stub no-summary Not-So-Stubby Areas This is also an extension of the stub area. it generates a Type 7 LSA. The keyword no-summary here means to avoid sending any summary LSAs in Area 1. All other routers that are configured with a stub option do not require any change in the configuration. this would not be possible. it will allow redistribution and then IGRP routes can be redistributed into the NSSA area as Type 7 LSAs. No external LSA are allowed. To redistribute an IGRP route into Area 1. Example 8-11 shows the configuration required on the ABR to make Area 1 a totally stubby area. IGRP routes. Summary LSAs are injected. Area 1 must be changed into an NSSA. NSSA is supported starting in Cisco IOS Software Release 11. NSSAs have the following characteristics: y y y y Type 7 LSAs carry external information within an NSSA. when the ASBR injects a route into the AS. Because summary LSA generation takes place only at the ABR.

The forwarding address is calculated as follows: If the route has a next-hop address (not true for connected routes). Network Diagram Where Type 7 LSAs Are Originated .Use one of the loopback addresses (if it's up and OSPF is running) in the area that is announcing LSAs. The three main differences are as follows: y y The Type field contains the value of 7 instead of 5. try to use it. If any of the conditions explained in the Type 5 forwarding address selection criteria is not true. Everything that was explained in the Type 5 forwarding address selection also holds true for Type 7 LSAs. indicating its Type 7 LSA. . Figure 8-23. use the address of the first interface in that area. The following two rules apply in that case: .Example 8-12 Configuring an NSSA on All the Routers in the NSSA Area RouterF# router ospf 1 area 1 nssa Type 7 LSAs The packet format for Type 7 LSA is very similar to that of Type 5.If no loopback addresses are configured. Router I is the NSSA ASBR doing redistribution of IGRP into OSPF. NSSA LSA Example Example 8-13 shows the output of the NSSA LSA from Figure 8-23. This is possible only if the route is an OSPF internal route. y The P bit is explained in the following example. the next hop will not be used as a forwarding address.

1.10.10.Type 7 LSAs are generated into Area 1 and then are translated into Type 5 LSAs by the NSSA ABR.108. which is Router F.10. Type 7/5 translation.21 LS Seq Number: 80000001 Checksum: 0x4309 .10. DC) LS Type: AS External Link Link State ID: 10.0 (External Network Number) Advertising Router: 141.0 LS age: 36 Options: (No TOS-capability. Example 8-13 NSSA LSA Output RouterI#show ip ospf database nssa-external 10.

except that there are a few important things to remember regarding the P bit in this output: y The P bit is used to tell the NSSA ABR whether to translate Type 7 LSAs into Type 5 LSAs. This bit was already mentioned in the Option field that was discussed in the "Hello Packets" section earlier.108. y y y y P stands for propagation. Basically. The ABR makes the decision based on the value of this bit. No Type 7/5 translation means bit P = 0. This means that no RIP routes are allowed in Area 1. Type 7/5 translation means bit P = 1. NSSA Configuration Example Example 8-14 shows a configuration example for defining an NSSA area. this bit is used for propagation control. This happens when the NSSA ASBR is also an NSSA ABR. the one with the lowest router ID) must translate this Type 7 LSA into a Type 5 LSA. If bit P = 1. the NSSA ABR must not translate this LSA into a Type 5 LSA.1. If bit P = 0. as shown in Figure 8-23. Example 8-14 Configuring an NSSA RouterF# router ospf 1 area 1 nssa After defining Area 1 as an NSSA in Figure 8-23. . This configu-ration must be present on all routers that are in Area 1. This Type 7 route can exist only within NSSA. the NSSA ABR (if multiple NSSA ABRs exist.21 External Route Tag: 0 The output of the NSSA LSA resembles that of the external LSA output. it will have the following characteristics: y y No Type 5 LSAs are allowed in Area 1.Length: 36 Network Mask: /24 Metric Type: 2 (Larger than any link state path) TOS: 0 Metric: 20 Forward Address: 141. All IGRP routes are redistributed as Type 7 routes.

the following is true: y y y No RIP routes will be injected into Area 1 because those are external routes. Type 7 LSAs are converted into Type 5 LSAs at the NSSA ABR. If only one exit point exists. Totally NSSAs have the following characteristics: y y y y No summary LSAs are allowed. if Area 1 is defined as a totally NSSA. In Figure 8-23. As in case of totally stubby areas. The default summary LSA will be generated by the ABR. Totally Not-So-Stubby Areas This type of area is an extension to the NSSA. No external LSAs are allowed. for Totally NSSA Area RouterF# router ospf 1 area 1 nssa no-summary Filtering in NSSA In some situations. Example 8-15 shows the configuration required on the NSSA ABR. When redistribution takes place in this scenario. Area 1 is configured using the no-redistribution option. Figure 8-24. the router generates Type 5 LSAs as well as Type 7 LSAs. In Figure 8-24. Scenarios Where NSSA Filtering Can Be Used . This situation usually occurs when an ASBR is also an NSSA ABR. The default route is injected as a summary route. Example 8-15 Configuration on the NSSA ABR. Router F. No summary LSA from other areas will be injected into Area 1 because of the definition of a totally NSSA. there is no need to inject external routes into the NSSA as Type 7 routes. Router F. the no-summary command is needed only on the ABR because the summary LSA generation is done on the ABR.y All Type 7 LSAs are translated into Type 5 LSAs by the NSSA ABR and are leaked into the OSPF domain as Type 5 LSAs. this is the most recommended form of NSSA area type.

You don't want this route to be leaked into the rest of the OSPF areas.10. Example 8-16 Configuration to Filter Type 7 in NSSA RouterA# router ospf 1 area 1 nssa no-redistribution Configure the no-redistribution command on an NSSA ABR that's also an ASBR. Another case of filtering occurs when you need to prevent the Type 7 LSAs from being translated outside the NSSA. Example 8-16 shows the configuration that prevents NSSA ABR Router A from generating Type 7 LSAs for IGRP routes.0 not-advertise This summary-address configuration generates a Type 7 LSA that won't be translated into a Type 5 LSA by the NSSA ABR. . you want to control which Type 7 LSAs get translated into Type 5 LSAs. In other words.108. Example 8-17 shows the configu-ration that will prevent RIP routes from being translated into Type 5 LSAs.This means that all IGRP routes are redistributed into Area 0. Example 8-17 Configuration to Control Type 7 to Type 5 Conversion RouterA# router ospf 1 summary-address 141.0/24 that's being injected into the OSPF NSSA Area 1.255.0 255.108.255.10. Figure 8-24 shows a RIP-learned route 141. For example. but no Type 7 LSAs will be generated for Area 1. This configuration can be used on either Router A or Router B.

Default Routes in NSSA There are two ways to have a default route in an NSSA: y y When you configure an area as an NSSA. the NSSA ABR generates a default summary route. the NSSA ABR generates a default summary route. totally stubby area. a default summary route would not be generated by the NSSA ABR. Example 8-18 shows how to send a default summary route in an NSSA by configuring an NSSA. In the case of a stub area or an NSSA. if the NSSA area were not defined as a totally stubby area. NSSA ABR can generate a default route with or without a default route in its own routing table. the NSSA ABR doesn't generate a default summary route. Default Summary Route By defining an area as an NSSA. As mentioned earlier. Example 8-18 Configuration to Generate the Default Summary Route into an NSSA Area RouterA# router ospf 1 area 1 nssa no-summary Default Type 7 Example 8-19 shows the configuration that generates a Type 7 default route. This is done by applying the no-summary option on the NSSA ABR. Example 8-19 Configuration for Originating Type 7 Default into an NSSA Area RouterA# router ospf 1 area 1 nssa default-information-originate < Free Open Study > . You can configure this command on any NSSA ASBR or NSSA ABR. by default. totally stubby area. totally stubby area. with the following rules: y y NSSA ASBR can generate a default only when it has a default route in its routing table.