Showing posts with label switching. Show all posts
Showing posts with label switching. Show all posts

Friday, December 26, 2008

Cisco Routing: "ip default-network" vs. Default Static Routes

One point of confusion for some CCNA and CCNP candidates is the difference between configuring a static default route and using the Cisco routing command ip default-network.


At first glance, they appear to do the same thing. Both configure a destination to which packets should be routed if there is no more specific route in the routing table.


The major difference between these two options is that configuring a static default route only defines a default route for the router you're configuring it on, while ip default-network will propagate the route via its routing protocol.


Let's examine the routing tables of a hub-and-spoke network using the ip default-network command. R1 is the hub and R2 and R3 are the spokes. They are directly connected via the network 172.12.123.0 /24, and each has a loopback with a 32-bit mask that are numbered according to the router number (1.1.1.1, etc.) RIP is running on all three routers and the loopbacks are advertised.


R1 has another serial interface with the IP address 10.1.1.1 /24, and this network has been flagged as a default network with the command ip default-network 10.0.0.0 . It is not being advertised by RIP.


The routing protocol will then advertise this route. With RIP, the default network is advertised as 0.0.0.0 . (With IGRP, it appears as the network number, but is marked as an IGRP External route. ) This route has been designated a candidate default route on R1, as we see with the asterisk next to the 10.0.0.0 /24 network (code table removed for brevity):


R1#show ip route


Gateway of last resort is not set


1.0.0.0/32 is subnetted, 1 subnets

C 1.1.1.1 is directly connected, Loopback0

R 2.0.0.0/8 [120/1] via 172.12.123.2, 00:00:11, Serial0

R 3.0.0.0/8 [120/1] via 172.12.123.3, 00:00:11, Serial0

172.12.0.0/16 is variably subnetted, 2 subnets, 2 masks

C 172.12.21.0/30 is directly connected, BRI0

C 172.12.123.0/24 is directly connected, Serial0

* 10.0.0.0/24 is subnetted, 1 subnets

C 10.1.1.0 is directly connected, Serial1


On R2 and R3, a default RIP route is now seen (code tables again deleted):


R2#show ip route

Gateway of last resort is 172.12.123.1 to network 0.0.0.0


R 1.0.0.0/8 [120/1] via 172.12.123.1, 00:00:00, Serial0.213

2.0.0.0/32 is subnetted, 1 subnets

C 2.2.2.2 is directly connected, Loopback0

R 3.0.0.0/8 [120/2] via 172.12.123.1, 00:00:00, Serial0.213

172.12.0.0/16 is variably subnetted, 2 subnets, 2 masks

C 172.12.21.0/30 is directly connected, BRI0

C 172.12.123.0/24 is directly connected, Serial0.213

R* 0.0.0.0/0 [120/1] via 172.12.123.1, 00:00:00, Serial0.213


R3#show ip route

Gateway of last resort is 172.12.123.1 to network 0.0.0.0


R 1.0.0.0/8 [120/1] via 172.12.123.1, 00:00:27, Serial0.31

R 2.0.0.0/8 [120/2] via 172.12.123.1, 00:00:28, Serial0.31

3.0.0.0/32 is subnetted, 1 subnets

C 3.3.3.3 is directly connected, Loopback0

172.12.0.0/24 is subnetted, 1 subnets

C 172.12.123.0 is directly connected, Serial0.31

R* 0.0.0.0/0 [120/1] via 172.12.123.1, 00:00:28, Serial0.31


And the default route works, since we can ping 10.1.1.1 from both R2 and R3. Since they have no other match in their routing tables, they use the default route.


R2#ping 10.1.1.1


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 68/68/68 ms


R3#ping 10.1.1.1


Type escape sequence to abort.

Sending 5, 100-byte ICMP Echos to 10.1.1.1, timeout is 2 seconds:
!!!!!

Success rate is 100 percent (5/5), round-trip min/avg/max = 68/68/68 ms


When deciding whether to use a default static route or a default network, keep in mind that if you want the routing protocol to propagate the default route, the ip default-network command will do that for you. But if you want only the local router to have the default route, a static IP route is the way to go.

Wednesday, December 24, 2008

Cisco CCNA Certification Exam Tutorial: Variance And Unequal Cost Load Balancing

To pass the CCNA exam, you've got to know how to work with IGRP and EIGRP unequal-cost load balancing. You may not see much IGRP in production networks anymore, but you'll see a lot of EIGRP, and part of fine-tuning your EIGRP network is making sure that all paths are in use while allowing for varying bandwidth rates.

Using the variance command is the easy part - it's getting the metric that's the hard part with IGRP. With EIGRP, you just look in the topology table and that's it. With IGRP, you've got to run a debug to get the right metric.

The variance command is a multiplier when the value supplied with the variance command is multiplied by the lowest-cost metric, it must exceed the higher-cost metric in order for the higher-cost route to be added.

If that sounds complicated, it's not. It's one of those things that sounds difficult, but isn't. Trust me!

In this example, R1 has two paths to 172.23.0.0, but is currently using only one. By looking in the IP routing table, we've seen that the lowest-cost metric for network 172.23.0.0 on R1 is 8576. This path goes through the 172.12.123.0 network. There is another valid path that uses the 172.12.13.0 network, but is not currently in use.

I 172.23.0.0/16 [100/8576] via 172.12.123.2, 00:00:53, Serial0

IGRP does not have a “show" command that displays all valid routes to a destination, as does EIGRP. The command debug ip igrp transactions will show the current metric of the routes using the 512 KBPS route.

R1#debug ip igrp transactions

IGRP protocol debugging is on

19:17:51: IGRP: broadcasting request on Loopback0

19:17:51: IGRP: broadcasting request on Serial0

19:17:51: IGRP: broadcasting request on Serial1

19:17:51: IGRP: received update from 172.12.13.3 on Serial1

19:17:51: subnet 172.12.13.0, metric 23531 (neighbor 21531)

19:17:51: subnet 172.12.123.0, metric 23531 (neighbor 8476)

19:17:51: network 1.0.0.0, metric 24031 (neighbor 8976)

19:17:51: network 2.0.0.0, metric 22131 (neighbor 1600)

19:17:51: network 3.0.0.0, metric 22031 (neighbor 501)

19:17:51: network 172.23.0.0, metric 21631 (neighbor 1100)

R1(config)#router igrp 1
R1(config-router)#variance 3
R1#show ip route 172.23.0.0
Routing entry for 172.23.0.0/16
Known via "igrp 1", distance 100, metric 8576
Redistributing via igrp 1
Advertised by igrp 1 (self originated)
Last update from 172.12.123.2 on Serial0, 00:00:01 ago
Routing Descriptor Blocks:
* 172.12.13.3, from 172.12.13.3, 00:00:20 ago, via Serial1
Route metric is 21631, traffic share count is 1
Total delay is 21000 microseconds, minimum bandwidth is 512 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 0
172.12.123.3, from 172.12.123.3, 00:00:20 ago, via Serial0
Route metric is 8576, traffic share count is 3
Total delay is 21000 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 0
172.12.123.2, from 172.12.123.2, 00:00:01 ago, via Serial0
Route metric is 8576, traffic share count is 3
Total delay is 21000 microseconds, minimum bandwidth is 1544 Kbit
Reliability 255/255, minimum MTU 1500 bytes
Loading 1/255, Hops 0

The metric for 172.23.0.0 through the direct connection is 21631. A variance of 3 means that any route with a metric less than the best metric multiplied by the variance (in this case, 8576 x 3 = 25728) will be entered into the routing table. R1 now has three unequal-cost paths to 172.23.0.0 in its routing table, and load balancing will take place.

IGRP unequal-cost load balancing takes some practice, but as you can see, once you get the metric it's easy to work with. Just make sure you know how to get that metric!

Cisco CCNA Certification: The (Many) Different Kinds Of Switching

When you're studying for your CCNA exam, whether you're taking the Intro-ICND path or the single-exam path, you're quickly introduced to the fact that switching occurs at Layer 2 of the OSI model. No problem there, but then other terms involving switching are thrown in, and some of them can be more than a little confusing. What is "cell switching"? What is "circuit switching"? Most confusing of all, how can you have "packet switching"? Packets are found at Layer 3, but switching occurs at Layer 2. How can packets be switched?

Relax! As you'll see in this article, the terms aren't that hard to keep straight. Packet switching, for example, describes a protocol that divides a message into packets before they're sent. The packets are then sent individually, and may take different paths to the same destination. Once the packets arrive at the final destination, they are reassembled.

Frame switching follows the same process, but at a different layer of the OSI model. When the protocol runs at Layer 2 rather than Layer 3, the process is referred to as frame switching.

Cell switching also does much the same thing, but as the name implies, the device in use is a cell switch. Cell-switched packets are fixed in length. ATM is a popular cell-switching technology.

The process of circuit switching is just a bit different, in that the process of setting up the circuit itself is part of the process. The channel is set up between two parties, data is transmitted, and the channel is then torn down. The circuit-switching technology most familiar to CCNA candidates is ISDN.

Don't let these terms confuse you. The four different terms are describing much the same process. The main difference is that they are occurring at different levels of the OSI model, and using a different transport method to get the data where it needs to go.

Cisco CCNA / CCNP Home Lab Tutorial: Routing On A Frame Relay Switch

When you're preparing for CCNA and CCNP exam success, the best investment you can make is to put together your own home lab. There is no better way to learn Cisco technologies and prepare for the CCNA, BSCI, BCMSN, CIT, and other exams than by working with the many protocols and services you'll need to master in order to pass the exams.

One of the most popular articles I've written over the few years dealt with buying and configuring a Cisco router as a frame relay switch. That article is still available on many websites (including my own), but I want to remind you that just because you configure a router as a frame relay switch, that doesn't mean you can't use it as a home lab router, too!

The global command "frame-relay switching" allows a Cisco router such as a 2520 or 4000 to perform just that, frame relay switching, but this command doesn't disable IP routing. Depending on the router model you use, you will most likely have some extra serial connectors as well as an ethernet port that you can use with your other routers in your home lab.

Let's say you have a 2520 router as your frame relay switch. This switch has four serial ports and an AUI port. You could connect to up to four routers to the 2520's serial ports in order to serve as the frame relay switch for those other routers, and still assign an IP address to the ethernet port and run a routing protocol on the 2520. If you're connecting to less than four other routers as the frame relay switch, you can assign IP addresses to the leftover serial ports as well.

Monday, December 22, 2008

CCNA Certification Exam Tutorial: Cisco Switching Modes

To pass the CCNA exam and earn this important certification, you’ve got to know switching inside and out. While you’re learning all the basic switching theory, make sure to spend some time with the one of three switching modes Cisco routers can use.

Store-and-Forward is exactly what it sounds like. The entire frame will be stored before it is forwarded. This mode allows for the greatest amount of error checking, since a CRC (Cyclical Redundancy Check) is run against the frame before it is forwarded. If the frame contains an error, it is discarded. If there’s no problem with the frame, the frame is then forwarded to its proper destination.


While store-and-forward does perform error checking, the delay in processing the frame while this error check is run results in higher latency than the other modes you’re about to read about. The latency time can also vary, since not all frames are the same size.

Cut-through switching copies only the destination MAC address into its memory before beginning to forward the frame. Since the frame is being forwarded as soon as the destination MAC is read, there is less latency than store-and-forward. The drawback is that there is no error checking.

There is a middle ground, fragment-free switching. Only part of the frame is copied to memory before it is forwarded, but it’s the first 64 bytes of the frame, not just the destination MAC. (Why? Because if there is a problem with the frame, it’s most likely in the first 64 bytes.) There is a little more error checking than cut-through, but not as much latency as with store-and-forward.

Note that the latency of both cut-through and fragment-free is fixed; these modes always look at the first six or 64 bytes, respectively. Store-and-forward's latency depends on the size of the frame.
Learning the similarities and differences between these modes is an often-overlooked part of CCNA studies. Spend some time studying this important CCNA topic – you’ll be glad you did!