Showing posts with label study guide. Show all posts
Showing posts with label study guide. Show all posts

Friday, December 26, 2008

Cisco Routing For The CCNA And CCNP: Administrative Distance

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.

Cisco Home Lab Tutorial: Buying And Building A Frame Relay Switch

One of the major topics on your CCNA and CCNP exams is Frame Relay. Additionally, Frame Relay is one of the most popular WAN technolgies in today's networks. Getting hands-on experience with Frame Relay in Cisco networks isn't just a good idea, it's a necessity. Let's face it, your employer is going to get a little touchy if you start experimenting with your network's Frame Relay setup.


To practice all your important Frame Relay commands for your exams, you need a working Frame Relay cloud in your home lab. A production network's Frame cloud consists of a lot of Frame switches, but if you choose wisely, a single Cisco router can act as your home lab's entire Frame cloud!


Before we look at the configuration of such a router (hereafter referred to as a "frame relay switch"), let's look at the physical requirements.


The more serial ports you have, the better. You should get a router with at least four serial ports. For frame switching purposes, it doesn't matter if the ports are synchronous or asynchronous - you just need the ports.


You will also need some DTE/DCE cables. The DCE end of the cables will be connected to the frame switch.


A great configuration for a CCNA practice lab is three routers that serve as "production" routers, and a 4th router as a frame relay switch. (You'll want an access server as well, but that's another article.)


What I use in my student and customer pods is a setup where R1 is connected to the frame switch's S1 port, R2 is connected to S2 on the frame switch, and R3 is connected to the frame switch's S3 port.


Now comes the tricky part - the configuration. A frame relay switch's config can be hard to find, so here's a copy of mine. Pay particular attention to the config on ports s1, s2, and s3.


version 12.0

service timestamps debug uptime

service timestamps log uptime

no service password-encryption

!
hostname FRAME_SWITCH

!
!
ip subnet-zero

no ip domain-lookup

frame-relay switching

!
!
!
interface Ethernet0

no ip address

no ip directed-broadcast

shutdown

!
interface Serial0

ip address 10.1.1.2 255.255.255.0

clockrate 56000

!
interface Serial1

no ip address

no ip directed-broadcast

encapsulation frame-relay

logging event subif-link-status

logging event dlci-status-change

clockrate 56000

no frame-relay inverse-arp

frame-relay intf-type dce

frame-relay route 122 interface Serial2 221

frame-relay route 123 interface Serial3 321

!
interface Serial2

no ip address

no ip directed-broadcast

encapsulation frame-relay

logging event subif-link-status

logging event dlci-status-change

clockrate 56000

no frame-relay inverse-arp

frame-relay intf-type dce

frame-relay route 221 interface Serial1 122

!
interface Serial3

no ip address

no ip directed-broadcast

encapsulation frame-relay

logging event subif-link-status

logging event dlci-status-change

clockrate 56000

no frame-relay inverse-arp

frame-relay intf-type dce

frame-relay route 321 interface Serial1 123

!
interface BRI0

ip address 150.1.1.1 255.255.255.252

no ip directed-broadcast

encapsulation ppp

dialer map ip 150.1.1.2 name R2 broadcast 2335552221

dialer-group 1

!
ip classless

!
dialer-list 1 protocol ip permit

!
line con 0

exec-timeout 0 0

logging synchronous

transport input none

line aux 0

line vty 0 4

login

!
end


The key command in the global configuration is frame-relay switching. You must have this configured before you can configure the interfaces.


The interfaces will be configured with the frame route command. Let's take a look at what each value means in the command frame-relay route 122 interface Serial2 221.


frame-relay route - the command


122 - the incoming DLCI on this interface


interface serial2 - the interface the data will be sent out


221 - the outgoing DLCI


This command on S1 means that anything that comes in on this port on DLCI 122 will be sent out interface serial2 on DLCI 221.


It's a good idea to hard-code the interfaces to act as DCEs with the frame intf-type dce command. Since these interfaces are acting as DCEs, the clockrate command is needed for the line protocol to come up.


Once you've configured your frame switch as shown and have configured the frame map statements on the "production" routers, you can test the frame switch configuration. On the frame switch, run the command show frame route .


FRAME_SWITCH#show frame route

Input Intf Input Dlci Output Intf Output Dlci Status

Serial1 122 Serial2 221 active

Serial1 123 Serial3 321 active

Serial2 221 Serial1 122 active

Serial3 321 Serial1 123 active


You should see "active" for all the interfaces. If you see "deleted", make sure your frame switch interfaces are open if they are, check the router configs.


Keep in mind that you can still configure routing protocols to run on ports that you're not using for frame switching. The router we used here had an ethernet port and BRI port, and the BRI port has been configured as part of the production network. Running frame switching does not disable IP routing.


Purchasing and configuring your own frame relay switch is an invaluable part of your Cisco education. By practicing your frame commands and configuring frame connections over your own frame relay cloud, you're polishing your Cisco skills and gaining knowledge that cannot be duplicated by simulator programs.


To your success,


Chris Bryant


CCIE #12933

Wednesday, December 24, 2008

Cisco CCNA / CCNP Home Lab Tutorial: Buying And Configuring An Access Server

A Cisco access server is generally the last item a CCNA or CCNP candidate has on their mind when they're putting together a home lab. The thinking tends to be that since this router isn't really doing anything in the production part of your practice lab, it's not really important.

Once you have more than two devices in your home lab, though, you'll realize that constantly moving the console cable around from one router to another gets very tiresome. That's what an access server does for a home lab - it allows you to connect your PC to a single device when working in your home lab, with no need to constantly disconnect and reconnect the console cable. The console cable will be connected directly to the access server, and the access server is connected to all the other devices in your home lab. Once you start working with one, you'll wonder how you got along without it!

The term "access server" is a little misleading. This is not a server in the traditional sense, it's a Cisco router with asynchronous serial ports. It is these ports that you'll use to connect to the other devices in your home lab. Two affordable models of access servers are Cisco 2509s and Cisco 2511s. They can be found on ebay as well as other vendors on the Net.

You will also need an octal cable. On one end, the cable has a large connector that will connect to the access server. The other end is actually eight separate cables, each with RJ-45 connectors. These connectors are numbered 1 - 8 and will be connected to the console port on each router and switch. It is important to note the number on each connector you're connecting to the other lab devices.

Now that you've got the physical equipment, let's take a look at a typical configuration of an access server:

no service password-encryption

no service udp-small-servers

no service tcp-small-servers

! hostname BRYANT_ADVANTAGE_AS4

no ip domain-lookup

ip host r1 2001 10.4.4.4

ip host r2 2002 10.4.4.4

ip host r3 2003 10.4.4.4

ip host sw1 2004 10.4.4.4

ip host sw2 2005 10.4.4.4

ip host FrameSwitch 2006 10.4.4.4

interface Loopback555

ip address 10.4.4.4 255.255.255.0

line con 0

exec-timeout 0 0

logging synchronous\

line 1 16

no exec

transport input all

You can assign any loopback address and number here the important thing to note is that the IP HOST table you will build constantly refers back to the loopback address on the access server.

In this configuration, I have the octal cable's connector 1 in R1, 2 in R2, 3 in R3, 4 in SW1, 5 in SW2, and 6 in my frame relay switch. The number "2001" in the first line of the IP HOST table refers to that connector. That's why it is important to note the number on a given connector you place in the console port of a router or switch.

The asynchonous lines are identified by "line 1 16". This access server has 16 possible connections many will just have 8, which is usually plenty. Regardless of how many lines you have, you'll need the commands transport input all and no exec to allow reverse telnet to work effectively.

There's one more thing to watch out for. When you first connect to the AS for a practice session, you will need to open the line to each device by using the full hostname of the device as shown in the IP HOST table. Here, you would begin by entering R1, R2, R3, SW1, SW2, and FrameSwitch to open the line to each device. After that, you need to enter the line number - 1, 2, 3, 4, 5, and 6. It sounds a little confusing at first, but after just a few minutes of practice you'll be doing it without even thinking about it.

When you are working in your home lab, you will not go from one device to another that is, when you are done on R1 and want to configure R2, you must go back to the access server and then to R2. The keystroke to do this is . Again, it may sound complicated, but after a little practice you will again do this without thinking about it.

Adding an access server to your CCNA or CCNP home lab may not be on your mind now, but once you add a few more routers or switches to the lab, you'll want to spend more time configuring and practicing and less time moving a cable around. And once you get one, you'll wonder how you did without it!