Showing posts with label command. Show all posts
Showing posts with label command. Show all posts

Thursday, December 25, 2008

Cisco CCNP / BSCI Exam Tutorial: Using The OSPF Command “Area Range”

Your BSCI and CCNP exam success depends on knowing the details, and one such detail is knowing the proper way to summarize routes in OSPF. Route summarization is not just a test of your binary conversion abilities, but knowing where and when to summarize routes. It will not surprise any CCNA or CCNP certification candidate that OSPF gives us the most options for route summarization, and therefore more details to know!

OSPF offers us two options for route summarization configurations. In a previous tutorial, we looked at the "summary-address" command, and today we'll look at the proper use of the "area range" command.

The "area range" command should be used on an Area Border Router (ABR) to summarize routes being advertised from one OSPF area to another. In this tutorial, R1 is acting as an ABR, with interfaces in both Area 0 and Area 1. Four loopbacks have been placed into R1's Area 1.

R1(config)#router ospf 1

R1(config-router)#network 12.0.0.0 0.255.255.255 a 1

R1(config-router)#network 13.0.0.0 0.255.255.255 a 1

R1(config-router)#network 14.0.0.0 0.255.255.255 a 1

R1(config-router)#network 15.0.0.0 0.255.255.255 a 1

The routing table of an OSPF neighbor, R2, shows all four routes.

R2#show ip route ospf

12.0.0.0/32 is subnetted, 1 subnets

O IA 12.12.12.12 [110/65] via 172.12.123.1, 00:18:52, Serial0

13.0.0.0/32 is subnetted, 1 subnets

O IA 13.13.13.13 [110/65] via 172.12.123.1, 00:18:42, Serial0

14.0.0.0/32 is subnetted, 1 subnets

O IA 14.14.14.14 [110/65] via 172.12.123.1, 00:18:32, Serial0

15.0.0.0/32 is subnetted, 1 subnets

O IA 15.15.15.15 [110/65] via 172.12.123.1, 00:18:32, Serial0

To keep the routing tables of downstream routers smaller but still have the desired IP connectivity, we can use the area range command on R1 to summarize these four routes. The key to keep in mind with the area range command is that the area number given in the command is the area containing the destinations, NOT the area that will receive the summary route.

R1(config)#router ospf 1

R1(config-router)#area 1 range 12.0.0.0 252.0.0.0

R2 now shows a single summary route that can be used to reach all four remote networks.

R2#show ip route ospf

O IA 12.0.0.0/6 [110/65] via 172.12.123.1, 00:00:21, Serial0

Interestingly enough, there's now an additional route in R1's routing table.

R1#show ip route ospf
O 12.0.0.0/6 is a summary, 00:07:53, Null0


When you configure summary routes in OSPF, a route to null0 will be installed into the OSPF routing table of the router performing the summarization. This helps to prevent routing loops. Any packets destined for the routes that have been summarized will have a longer match in the routing table, and packets that do not match one of the summarized routes but do match the summary route will be dropped.

Cisco CCNP / BSCI Exam Tutorial: Using OSPF's "Summary-Address" Command

BSCI exam success, not to mention earning your CCNP, can come down to your OSPF route summarization skills. There are a few different commands and situations you need to be ready for, and one of these situations is the proper use of the "summary-address" command.

The summary-address command should be used on an ASBR in order to summarize routes that are being injected into the OSPF domain via redistribution. In the following example, four routes are being redisitributed into OSPF on R1, making R1 an ASBR.

interface Loopback16

ip address 16.16.16.16 255.0.0.0

!

interface Loopback17

ip address 17.17.17.17 255.0.0.0

!

interface Loopback18

ip address 18.18.18.18 255.0.0.0

!

interface Loopback19

ip address 19.19.19.19 255.0.0.0

R1(config)#router ospf 1

R1(config-router)#redistribute connected subnets

These four routes are seen on downstream router R2 as External Type-2, the default for routes redistributed into OSPF.

R2#show ip route ospf

O E2 17.0.0.0/8 [110/20] via 172.12.123.1, 00:00:07, Serial0

O E2 16.0.0.0/8 [110/20] via 172.12.123.1, 00:00:07, Serial0

O E2 19.0.0.0/8 [110/20] via 172.12.123.1, 00:00:07, Serial0

O E2 18.0.0.0/8 [110/20] via 172.12.123.1, 00:00:07, Serial0

To summarize networks learned by redistribution, use the OSPF command summary-address. You can probably do this summarization in your head, but do so before continuing with the lab.

R1(config)#router ospf 1

R1(config-router)#summary-address 16.0.0.0 252.0.0.0

Look at the change in R2's OSPF table.

R2#show ip route ospf

O E2 16.0.0.0/6 [110/20] via 172.12.123.1, 00:00:05, Serial0

The external routes have been successfully summarized. Note that the summary route is still marked as an E2 route.

There's an interesting route installed into R1's OSPF table as well.

R1#show ip route ospf


O 16.0.0.0/6 is a summary, 00:01:51, Null0

When you configure summary routes in OSPF, a route to null0 will be installed into the OSPF routing table. This helps to prevent routing loops. Any packets destined for the routes that have been summarized will have a longer match in the routing table....

C 17.0.0.0/8 is directly connected, Loopback17

C 16.0.0.0/8 is directly connected, Loopback16

C 19.0.0.0/8 is directly connected, Loopback19

C 18.0.0.0/8 is directly connected, Loopback18


O 16.0.0.0/6 is a summary, 00:03:10, Null0

O 12.0.0.0/6 is a summary, 00:07:53, Null0

.. and packets that do not match one of the summarized routes but do match the summary route will be dropped.

Cisco CCNP / BSCI Exam Tutorial: RIP Update Packet Authentication

When you earned your CCNA, you thought you learned everything there is to know about RIP. Close, but not quite! There are some additional details you need to know to pass the BSCI exam and get one step closer to the CCNP exam, and one of those involves RIP update packet authentication.

You're familiar with some advantages of using RIPv2 over RIPv1, support for VLSM chief among them. But one advantage that you're not introduced to in your CCNA studies is the ability to configure routing update packet authentication.

You have two options, clear text and MD5. Clear text is just that - a clear text password that is visible by anyone who can pick a packet off the wire. If you're going to go to the trouble of configuring update authentication, you should use MD5. The MD stands for "Message Digest", and this is the algorithm that produces the hash value for the password that will be contained in the update packets.

Not only must the routers agree on the password, they must agree on the authentication method. If one router sends an MD5-hashed password to another router that is configured for clear-text authentication, the update will not be accepted. debug ip rip is a great command for troubleshooting authenticated updates.

R1, R2, and R3 are running RIP over a frame relay cloud. Here is how RIP authentication would be configured on these three routers.

R1#conf t

R1(config)#key chain RIP

< The key chain can have any name. >

R1(config-keychain)#key 1

< Key chains can have multiple keys. Number them carefully when using multiples. >

R1(config-keychain-key)#key-string CISCO

< This is the text string the key will use for authentication. >


R1(config)#int s0

R1(config-if)#ip rip authentication mode text

< The interface will use clear-text mode. >

R1(config-if)#ip rip authentication key-chain RIP

< The interface is using key chain RIP, configured earlier. >

R2#conf t

R2(config)#key chain RIP

R2(config-keychain)#key 1

R2(config-keychain-key)#key-string CISCO

R2(config)#int s0.123

R2(config-subif)#ip rip authentication mode text

R2(config-subif)#ip rip authentication key-chain RIP

R3#conf t

R3(config)#key chain RIP

R3(config-keychain)#key 1

R3(config-keychain-key)#key-string CISCO

R3(config)#int s0.31

R3(config-subif)#ip rip authentication mode text

R3(config-subif)#ip rip authentication key-chain RIP

To use MD5 authentication rather than clear-text, simply replace the word "text" in the ip rip authentication mode command with md5.

Here's what a successfully authentication RIPv2 packet looks like, courtesy of debug ip rip. Clear-text authentication is in effect and the password is "cisco".

3d04h: RIP: received packet with text authentication cisco

3d04h: RIP: received v2 update from 150.1.1.3 on Ethernet0

3d04h: 100.0.0.0/8 via 0.0.0.0 in 1 hops

3d04h: 150.1.2.0/24 via 0.0.0.0 in 1 hops

Here's what it looks like when the remote device is set for MD5 authentication and the local router is set for clear-text. You'll also see this message if the password itself is incorrect.

3d04h: RIP: ignored v2 packet from 150.1.1.3 (invalid authentication)

"Debug ip rip" may be a simple command as compared to the debugs for other protocols. but it's also a very powerful debug. Start using debugs as early as possible in your Cisco studies to learn how router commands really work!

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!

Wednesday, December 24, 2008

Cisco CCNA Certification Exam Tutorial: Distance Vector Command Review

Part of studying for CCNA exam success is keeping all these new commands straight in your head! And let's face it, there are a lot of commands you need to know in order to pass the CCNA exam and earn that certification. Here's a review of some very important distance vector and static routing commands you need to know, along with their proper usage and console output.

Bandwidth
IGRP makes a default assumption that any Serial interface running IGRP is connected to a T1 line, which runs at 1544 KBPS. With equal-cost load-balancing enabled by default, this may be an undesirable assumption.

To alter IGRP’s assumption, use the bandwidth command on the serial interface in question. Note that this command does NOT actually affect the bandwidth available to the interface; it merely changes IGRP’s assumption of the bandwidth.
R2#conf t

R2(config)#int s0

R2(config-if)#bandwidth 512




Clear ip route *

This command clears your routing table of all non-static and non-connected routes. In a lab environment, it’s very handy because it forces your routers running routing protocols to send and request updates, rather than waiting for the regularly scheduled updates.
R2#clear ip route *



Debug ip igrp events

Debug ip igrp events allows you to see IGRP updates being sent and requested. Here, the debug is run and then the routing table is cleared. The router immediately broadcasts update requests via the IGRP-enabled interfaces.

R2#debug ip igrp event

IGRP event debugging is on

R2#clear ip route *

06:02:51: IGRP: broadcasting request on BRI0

06:02:51: IGRP: broadcasting request on Serial0.123




Debug ip igrp transactions

To configure IGRP unequal-cost load-sharing with the variance command, you’ve got to know the metric of the less-desirable routes. EIGRP keeps these in its topology table; IGRP has no such table.

To get the metrics of routes not in the routing table, run debug ip igrp transactions. To force IGRP updates, the routing table below was cleared with clear ip route *.

R2#debug ip igrp transactions


IGRP protocol debugging is on

R2#clear ip route *

06:05:33: IGRP: received update from 172.12.123.1 on Serial0.123

06:05:33: subnet 172.12.123.0, metric 10476 (neighbor 8476)

06:05:33: network 1.0.0.0, metric 8976 (neighbor 501)

06:05:33: IGRP: edition is now 3

06:05:33: IGRP: sending update to 255.255.255.255 via BRI0 (172.12.12.2)

06:05:33: network 1.0.0.0, metric=8976

06:05:33: IGRP: sending update to 255.255.255.255 via Serial0.123 (172.12.123.2) - suppressing null update

06:05:34: IGRP: received update from 172.12.12.1 on BRI0

06:05:34: subnet 172.12.13.0, metric 160250 (neighbor 8476)

06:05:34: network 1.0.0.0, metric 158750 (neighbor 501)




Debug ip rip

R2#debug ip rip

IP protocol debugging is on

R2#clear ip route *

6:14:53: RIP: received v2 update from 172.23.23.3 on Ethernet0

6:14:53: 1.0.0.0/8 via 0.0.0.0 in 16 hops (inaccessible)

6:14:53: 1.1.1.1/32 via 0.0.0.0 in 2 hops

6:14:53: 172.12.0.0/16 via 0.0.0.0 in 16 hops (inaccessible)

6:14:53: 172.12.12.2/32 via 0.0.0.0 in 2 hops

6:14:53: 172.12.13.0/30 via 0.0.0.0 in 1 hops

6:14:53: 172.12.123.0/24 via 0.0.0.0 in 1 hops

6:14:53: 172.23.0.0/16 via 0.0.0.0 in 16 hops (inaccessible)


Run debug ip rip to troubleshoot routing update problems, RIP authentication problems, and to view the routing update contents. Clear ip route * was run to clear the routing table and to force a RIP update.

Ip route
R2#conf t

R2(config)#ip route 1.1.1.1 255.255.255.255 172.12.123.1

OR

R2(config)#ip route 1.1.1.1 255.255.255.255 serial0

To configure a static route to a given destination IP address, use the ip route command. The destination is followed by a subnet mask, and that can be followed by either the next-hop IP address or the exit interface on the local router.

Ip route 0.0.0.0 0.0.0.0

R2#conf t

R2(config)#ip route 0.0.0.0 0.0.0.0 172.12.123.1

OR


R2(config)#ip route 0.0.0.0 0.0.0.0 ethernet0

To configure a default static route, use either of these two commands.

You could have any number for the first “0.0.0.0", since the second set of zeroes is the subnet mask. This means that any destination will match this route statement.

That's a good review to get started with! I'll be back tomorrow with Part II of this CCNA exam command review!

Monday, December 22, 2008

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!