The textbook definition of "administrative distance" is simple enough: "the measurement of a protocol's believability". It's not enough to know the definition, however you've got to know when AD comes into the picture and when it does not.
When a packet needs to be routed, the router looks in its routing table for the next-hop IP address the packet should take to get to the destination. There may be more than one matching path, in which case the router will look for the "longest match". The route that has the longest match - the route with the most bits in the mask set to "1" - will be the route that is used.
Consider the following three routes from a fictional Cisco router:
I 172.17.0.0 /24 via 172.1.1.1
O 172.17.0.0 /25 via 173.1.1.1
R 172.17.0.0 /26 via 174.1.1.1
This router has three possible next-hop IP addresses that it can send packets destined for the network 172.17.0.0. The masks are of different lengths, meaning that the route with the longest match (again, the route with the most bits set to "1") will be used. In this example, the RIP route will be used, since it has the longest match with a mask of /26. The administrative distances do not matter.
AD does matter when the masks are the same length, as shown here:
I 172.17.0.0 /24 via 172.1.1.1
O 172.17.0.0 /24 via 173.1.1.1
R 172.17.0.0 /24 via 174.1.1.1
The longest match rule always precedes the use of AD, but here there is a three-way tie regarding the masks. They're all /24 (or 255.255.255.0 in dotted decimal). AD will be used to break this tie.
As mentioned, AD is a measurement of a protocol's believability. It is important to keep in mind that the lowest AD will be preferred. And while the routing table will show you the ADs of the respective protocols, it's a very good idea to know these ADs before taking the CCNA or CCNP:
Connected route: 0
Static Route: 1
EIGRP Summary: 5
External BGP: 20
EIGRP (Internal): 90
IGRP: 100
OSPF: 110
ISIS : 115
RIP: 120
EIGRP (External) : 170
Unknown: 255 (A router will not believe a source with an AD of 255, and such routes will not be placed into the routing table.)
The three protocols we looked at in the comparison were RIP, IGRP, and OSPF. While your first instinct may be that the OSPF route would be the most believable, IGRP actually has a lower AD than the other two and would be the route installed in the routing table.
Since IGRP does not support variable-length subnet masking and OSPF does, you may never see this scenario outside of an exam question. But if you do see it in the exam room or in a production network, you'll understand how an IGRP route could be preferred over an OSPF route.
Showing posts with label ad. Show all posts
Showing posts with label ad. Show all posts
Friday, December 26, 2008
Thursday, December 25, 2008
Cisco CCNP Certification / BSCI Exam Tutorial: Floating Static Routes
Passing the BSCI exam and earning your CCNP certification demands that you add greatly to the networking skills foundation you created when you studied for your CCNA certification. You learned quite a bit about static routing and default static routing when you passed the CCNA test, and it does seem like that should be all you need to know about static routing, right?
One thing you'll learn as you continue to earn Cisco certifications is that there's always something else to learn! You may have heard the term "floating static route", which does suggest some interesting mental pictures. "Floating"? Floating on what?
In a way, a floating static route is "floating" in your routing table. A floating static route is a route that will be used only if routes for the same destination but with a lower administrative distance are removed from the table. For example, you could be using an OSPF-discovered route as your primary route to a given destination, and the floating static route would serve as a backup route that would be used only if the OSPF route leaves the routing table.
Now, how can that happen? After all, OSPF has an administrative distance of 110 and static routes have ADs of one or zero, depending on whether it's configured with a next-hop IP address or a local exit interface. One way or the other, 1 and 0 are still less than 110!
When you want to configure a floating static route, you must assign the route an AD higher than that of the primary route. In this case, we've got to create a static route with an AD higher than 110. We do this by using the "distance" option at the end of the "ip route" command.
R1(config)#ip route 110.1.1.0 255.255.255.0 172.12.123.1 ?
<1-255> Distance metric for this route
name Specify name of the next hop
permanent permanent route
tag Set tag for this route
R1(config)#ip route 110.1.1.0 255.255.255.0 172.12.123.1 111
The number entered at the very end of the "ip route" command is the AD of that route. If there is an OSPF route for 110.1.1.0 /24, that will be the primary route, and the floating static route will not be used unless the OSPF route is taken out of the routing table.
Floating static routes aren't just a good thing to know for the BSCI exam and your CCNP certification pursuit - they're very practical in the real world as well.
One thing you'll learn as you continue to earn Cisco certifications is that there's always something else to learn! You may have heard the term "floating static route", which does suggest some interesting mental pictures. "Floating"? Floating on what?
In a way, a floating static route is "floating" in your routing table. A floating static route is a route that will be used only if routes for the same destination but with a lower administrative distance are removed from the table. For example, you could be using an OSPF-discovered route as your primary route to a given destination, and the floating static route would serve as a backup route that would be used only if the OSPF route leaves the routing table.
Now, how can that happen? After all, OSPF has an administrative distance of 110 and static routes have ADs of one or zero, depending on whether it's configured with a next-hop IP address or a local exit interface. One way or the other, 1 and 0 are still less than 110!
When you want to configure a floating static route, you must assign the route an AD higher than that of the primary route. In this case, we've got to create a static route with an AD higher than 110. We do this by using the "distance" option at the end of the "ip route" command.
R1(config)#ip route 110.1.1.0 255.255.255.0 172.12.123.1 ?
<1-255> Distance metric for this route
name Specify name of the next hop
permanent permanent route
tag Set tag for this route
R1(config)#ip route 110.1.1.0 255.255.255.0 172.12.123.1 111
The number entered at the very end of the "ip route" command is the AD of that route. If there is an OSPF route for 110.1.1.0 /24, that will be the primary route, and the floating static route will not be used unless the OSPF route is taken out of the routing table.
Floating static routes aren't just a good thing to know for the BSCI exam and your CCNP certification pursuit - they're very practical in the real world as well.
Cisco CCNP / BSCI Exam Tutorial: Not All Static Routes Are Created Equal
As a CCNP candidate, as a CCNA, and in getting ready to pass the BSCI exam, you may be tempted to breeze through your static route studies, or even skip them! That's because static routes are easy enough to configure, and as long as you remember the syntax of the ip route command, you're in good shape.
But there's one vital detail regarding static routes that many exam candidates miss. That's because many CCNA and CCNP books say "the administrative distance of a static route is 1", but that is not quite accurate.
You know from your CCNA studies that the ip route command is used to create a static route, and that you have the option of configuring a local exit interface or a next-hop IP address at the end of the command. However, the administrative distances are not the same. The AD of a static route that uses a local exit interface is zero! (That's because the router considers a static route with a local exit interface to actually be a directly connected network.) The AD of a static route with a next-hop IP address is 1.
Therefore, if the router has the following two ip route statements to consider...
Router(config)#ip route 172.1.1.1 255.255.255.255 fast0
Router(config)#ip route 172.1.1.1 255.255.255.255 210.1.1.1
... the prefix lengths are the same, so the static route using the local exit interface fastethernet0 will be preferred due to its lower AD, and will be installed into the routing table.
Keep the details in mind on the job and in the exam room, and you’re on your way to CCNP exam success!
But there's one vital detail regarding static routes that many exam candidates miss. That's because many CCNA and CCNP books say "the administrative distance of a static route is 1", but that is not quite accurate.
You know from your CCNA studies that the ip route command is used to create a static route, and that you have the option of configuring a local exit interface or a next-hop IP address at the end of the command. However, the administrative distances are not the same. The AD of a static route that uses a local exit interface is zero! (That's because the router considers a static route with a local exit interface to actually be a directly connected network.) The AD of a static route with a next-hop IP address is 1.
Therefore, if the router has the following two ip route statements to consider...
Router(config)#ip route 172.1.1.1 255.255.255.255 fast0
Router(config)#ip route 172.1.1.1 255.255.255.255 210.1.1.1
... the prefix lengths are the same, so the static route using the local exit interface fastethernet0 will be preferred due to its lower AD, and will be installed into the routing table.
Keep the details in mind on the job and in the exam room, and you’re on your way to CCNP exam success!
Monday, December 22, 2008
Cisco CCNA / CCNP Certification Exam Tutorial: Floating Static Routes
To pass the Cisco CCNA and CCNP certification exams, as well as becoming a world-class networker, you've got to know how and when to use floating static routes. And if you're wondering what makes them "float" -- read on!
In this example, R1 and R2 are running OSPF over a Frame Relay network, 172.12.123.0 /24. They're also connected by a BRI ISDN link, 172.12.12.0 /24. R1 is advertising a loopback network, 1.1.1.1 /32, via OSPF. We want R2 to have a route to that loopback even if the frame goes down - and here, we'll use a floating static route to make that happen.
R2 sees the route to the loopback interface via OSPF, and can ping that interface successfully.
R2#show ip route ospf
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/65] via 172.12.123.1, 00:00:02, Serial0
R2#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 68/68/68 ms
This is when it's important to know your administrative distances.... or at least know where to look to see them! The AD of OSPF is 110, which means we can configure a static route to 1.1.1.1 /32, and as long as the AD of the static route is higher than 110, it won't be used unless the OSPF route leaves the routing table. That's why this kind of route is called a "floating" static route - the route "floats" in the routing table and isn't seen unless the primary route leaves the table.
You learned how to write a static route in your CCNA studies, but you also remember that the default AD of a static route is either 1 or 0... and both of those values are less than 110! To change the AD of a static route, configure the desired distance at the end of the ip route command.
R2(config)#ip route 1.1.1.1 255.255.255.255 bri0 ?
<1-255> Distance metric for this route
A.B.C.D Forwarding router's address
name Specify name of the next hop
permanent permanent route
tag Set tag for this route
R2(config)#ip route 1.1.1.1 255.255.255.255 bri0 111
The static route has an AD that's only one higher than that of the OSPF route, but that's enough to make the route "float" and not yet be seen in the routing table.
R2#show ip route
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/65] via 172.12.123.1, 00:06:44, Serial0
172.12.0.0/24 is subnetted, 2 subnets
C 172.12.12.0 is directly connected, BRI0
C 172.12.123.0 is directly connected, Serial0
Let's see the effect on the routing table when the Serial0 interface is closed.
R2(config)#int s0
R2(config-if)#shutdown
12:04:53: %OSPF-5-ADJCHG: Process 1, Nbr 172.12.123.1 on Serial0 from FULL to DOWN, Neighbor Down: Interface down or detached
12:04:55: %SYS-5-CONFIG_I: Configured from console by console
12:04:55: %LINK-5-CHANGED: Interface Serial0, changed state to administratively down
12:04:56: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
R2#show ip route
1.0.0.0/32 is subnetted, 1 subnets
S 1.1.1.1 is directly connected, BRI0
172.12.0.0/24 is subnetted, 1 subnets
C 172.12.12.0 is directly connected, BRI0
The floating static route appears in the table, but the ISDN link will not come up until the BRI interface has traffic to send. Let's ping 1.1.1.1 and see what happens. debug dialer was configured on R2 before sending the ping.
R2#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
12:16:01: BR0 DDR: Dialing cause ip (s=172.12.12.2, d=1.1.1.1)
12:16:01: BR0 DDR: Attempting to dial 8358661
12:16:01: %LINK-3-UPDOWN: Interface BRI0:1, changed state to up.!!
12:16:01: BR0:1 DDR: dialer protocol up!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 36/37/40 ms
The link comes up and traffic can still reach 1.1.1.1. Once R2 becomes an OSPF neighbor of R1 again, the OSPF route will again become the primary path and the floating static route leaves the routing table.
R2(config)#int s0
R2(config-if)#no shut
R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
172.12.123.1 1 FULL/DR 00:01:57 172.12.123.1 Serial0
R2#show ip route
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/65] via 172.12.123.1, 00:00:16, Serial0
172.12.0.0/24 is subnetted, 2 subnets
C 172.12.12.0 is directly connected, BRI0
C 172.12.123.0 is directly connected, Serial0
A floating static route is an excellent "back door" that will keep the ISDN link down while allowing that link to serve as a backup route. Just make sure the ISDN link comes down when you expect it to - always check that with show isdn status!
In this example, R1 and R2 are running OSPF over a Frame Relay network, 172.12.123.0 /24. They're also connected by a BRI ISDN link, 172.12.12.0 /24. R1 is advertising a loopback network, 1.1.1.1 /32, via OSPF. We want R2 to have a route to that loopback even if the frame goes down - and here, we'll use a floating static route to make that happen.
R2 sees the route to the loopback interface via OSPF, and can ping that interface successfully.
R2#show ip route ospf
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/65] via 172.12.123.1, 00:00:02, Serial0
R2#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 68/68/68 ms
This is when it's important to know your administrative distances.... or at least know where to look to see them! The AD of OSPF is 110, which means we can configure a static route to 1.1.1.1 /32, and as long as the AD of the static route is higher than 110, it won't be used unless the OSPF route leaves the routing table. That's why this kind of route is called a "floating" static route - the route "floats" in the routing table and isn't seen unless the primary route leaves the table.
You learned how to write a static route in your CCNA studies, but you also remember that the default AD of a static route is either 1 or 0... and both of those values are less than 110! To change the AD of a static route, configure the desired distance at the end of the ip route command.
R2(config)#ip route 1.1.1.1 255.255.255.255 bri0 ?
<1-255> Distance metric for this route
A.B.C.D Forwarding router's address
name Specify name of the next hop
permanent permanent route
tag Set tag for this route
R2(config)#ip route 1.1.1.1 255.255.255.255 bri0 111
The static route has an AD that's only one higher than that of the OSPF route, but that's enough to make the route "float" and not yet be seen in the routing table.
R2#show ip route
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/65] via 172.12.123.1, 00:06:44, Serial0
172.12.0.0/24 is subnetted, 2 subnets
C 172.12.12.0 is directly connected, BRI0
C 172.12.123.0 is directly connected, Serial0
Let's see the effect on the routing table when the Serial0 interface is closed.
R2(config)#int s0
R2(config-if)#shutdown
12:04:53: %OSPF-5-ADJCHG: Process 1, Nbr 172.12.123.1 on Serial0 from FULL to DOWN, Neighbor Down: Interface down or detached
12:04:55: %SYS-5-CONFIG_I: Configured from console by console
12:04:55: %LINK-5-CHANGED: Interface Serial0, changed state to administratively down
12:04:56: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0, changed state to down
R2#show ip route
1.0.0.0/32 is subnetted, 1 subnets
S 1.1.1.1 is directly connected, BRI0
172.12.0.0/24 is subnetted, 1 subnets
C 172.12.12.0 is directly connected, BRI0
The floating static route appears in the table, but the ISDN link will not come up until the BRI interface has traffic to send. Let's ping 1.1.1.1 and see what happens. debug dialer was configured on R2 before sending the ping.
R2#ping 1.1.1.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
12:16:01: BR0 DDR: Dialing cause ip (s=172.12.12.2, d=1.1.1.1)
12:16:01: BR0 DDR: Attempting to dial 8358661
12:16:01: %LINK-3-UPDOWN: Interface BRI0:1, changed state to up.!!
12:16:01: BR0:1 DDR: dialer protocol up!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 36/37/40 ms
The link comes up and traffic can still reach 1.1.1.1. Once R2 becomes an OSPF neighbor of R1 again, the OSPF route will again become the primary path and the floating static route leaves the routing table.
R2(config)#int s0
R2(config-if)#no shut
R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
172.12.123.1 1 FULL/DR 00:01:57 172.12.123.1 Serial0
R2#show ip route
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/65] via 172.12.123.1, 00:00:16, Serial0
172.12.0.0/24 is subnetted, 2 subnets
C 172.12.12.0 is directly connected, BRI0
C 172.12.123.0 is directly connected, Serial0
A floating static route is an excellent "back door" that will keep the ISDN link down while allowing that link to serve as a backup route. Just make sure the ISDN link comes down when you expect it to - always check that with show isdn status!
Cisco CCNP / BSCI Exam Tutorial: Not All Static Routes Are Created Equal
As a CCNP candidate, as a CCNA, and in getting ready to pass the BSCI exam, you may be tempted to breeze through your static route studies, or even skip them! That's because static routes are easy enough to configure, and as long as you remember the syntax of the ip route command, you're in good shape.
But there's one vital detail regarding static routes that many exam candidates miss. That's because many CCNA and CCNP books say "the administrative distance of a static route is 1", but that is not quite accurate.
You know from your CCNA studies that the ip route command is used to create a static route, and that you have the option of configuring a local exit interface or a next-hop IP address at the end of the command. However, the administrative distances are not the same. The AD of a static route that uses a local exit interface is zero! (That's because the router considers a static route with a local exit interface to actually be a directly connected network.) The AD of a static route with a next-hop IP address is 1.
Therefore, if the router has the following two ip route statements to consider...
Router(config)#ip route 172.1.1.1 255.255.255.255 fast0
Router(config)#ip route 172.1.1.1 255.255.255.255 210.1.1.1
... the prefix lengths are the same, so the static route using the local exit interface fastethernet0 will be preferred due to its lower AD, and will be installed into the routing table.
Keep the details in mind on the job and in the exam room, and you’re on your way to CCNP exam success!
But there's one vital detail regarding static routes that many exam candidates miss. That's because many CCNA and CCNP books say "the administrative distance of a static route is 1", but that is not quite accurate.
You know from your CCNA studies that the ip route command is used to create a static route, and that you have the option of configuring a local exit interface or a next-hop IP address at the end of the command. However, the administrative distances are not the same. The AD of a static route that uses a local exit interface is zero! (That's because the router considers a static route with a local exit interface to actually be a directly connected network.) The AD of a static route with a next-hop IP address is 1.
Therefore, if the router has the following two ip route statements to consider...
Router(config)#ip route 172.1.1.1 255.255.255.255 fast0
Router(config)#ip route 172.1.1.1 255.255.255.255 210.1.1.1
... the prefix lengths are the same, so the static route using the local exit interface fastethernet0 will be preferred due to its lower AD, and will be installed into the routing table.
Keep the details in mind on the job and in the exam room, and you’re on your way to CCNP exam success!
Subscribe to:
Posts (Atom)