Friday, November 5, 2010

Complete Frame Relay Lab Setup with T1 WICs

I set up a very simple frame-relay Cisco lab today using the following equipment:

Cisco 1841 router with a WIC 1DSU-T1 V2 card (acting as DTE #1 - TOP)
Cisco 1841 router with a VWIC2-2MFT-T1/E1 card (acting as DTE #2 - SMALL)
Cisco 3825 router with a VWIC2-2MFT-T1/E1 card (acting as DTE #3 - BOTTOM)
Cisco 3640 router with a few WIC 1DSU T1 card (acting as DCE - frame relay switch - FRSWITCH)

NOTE!  There are no serial cables involved here.  These are all T1 WICs with RJ45 connections.  See this post if you need to create T1 crossover cables for this setup.  I had a lot of trouble setting this up properly due to lack of coherent information online regarding the T1 card configuration on the router acting as a frame relay switch (not to mention it was my first attempt at setting up a frame relay network).

DOUBLE NOTE!!  These exact instructions won't work using serial cables!  If you are using serial cables, there are plenty of other instructions out there to follow.

First of all, here is the diagram of what I ended up creating:

The router named FRSWITCH acts as a frame relay switch (the telco's network), and the other two routers act as two endpoints we need to connect via frame relay!  I left the switch connected to BOTTOM from the last lab I created; it doesn't affect this configuration at all.

I'm going to assume all the cables are made, tested, and connected properly as shown in the diagram above.

Let's start by programming the FRSWITCH router:

FRSWITCH>enable
FRSWITCH#configure terminal
FRSWITCH(config)#frame-relay switching
FRSWITCH(config)#interface s0/0
FRSWITCH(config-if)#encapsulation frame-relay
FRSWITCH(config-if)#no ip mroute-cache
FRSWITCH(config-if)#frame-relay intf-type dce
FRSWITCH(config-if)#frame-relay route 100 interface s0/1 101
FRSWITCH(config-if)#frame-relay route 102 interface s3/0 101
----- This last command tells the router to take frames with DLCI 102 and send them out s3/0 re-tagged with DLCI 101 (so that the destination knows where they came from).  These two commands, along with their counterparts a few lines down, actually create the PVCs.


FRSWITCH(config-if)#no shutdown
FRSWITCH(config-if)#interface s0/1
FRSWITCH(config-if)#encapsulation frame-relay
FRSWITCH(config-if)#frame-relay intf-type dce
----- This command doesn't have anything to do with clocking or serial cables - it just affects LMI functions.

FRSWITCH(config-if)#frame-relay route 101 interface s0/0 100
FRSWITCH(config-if)#frame-relay route 102 interface s3/0 100
FRSWITCH(config-if)#no shutdown

NOTE!  At no point in the FRSWITCH configuration do you have to specify service-module T1 settings.

Next, I set up BOTTOM as a DTE:

BOTTOM>enable
BOTTOM#configure terminal
BOTTOM(config)#card type t1 0 0
BOTTOM(config)#controller t1 0/0/0
BOTTOM(config-controller)#channel-group 0 timeslots 1-24 speed 64
BOTTOM(config-controller)#interface s0/0/0:0
BOTTOM(config-if)#encapsulation frame-relay
BOTTOM(config-if)#ip 192.168.0.1 255.255.255.0
BOTTOM(config-if)#no shutdown


That finishes up the basic frame-relay setup on BOTTOM.  Next I did the same thing to SMALL, just changing the IP address:


SMALL>enable
SMALL#configure terminal
SMALL(config)#card type t1 0 0
SMALL(config)#controller t1 0/0/0
SMALL(config-controller)#channel-group 0 timeslots 1-24 speed 64
SMALL(config-controller)#interface s0/0/0:0
SMALL(config-if)#encapsulation frame-relay
SMALL(config-if)#ip address 192.168.0.2 255.255.255.0
SMALL(config-if)#no shutdown


Follow the steps above again on TOP, and all 3 routers should have no trouble pinging across the 192.168.0.0/24 network!  I also configured the Ethernet interfaces shown on the routers, then configured EIGRP, allowing communication between all subnets on the diagram, but I won't cram that into this post.

NOTE!  You can see details on how Frame Relay is configured by running "show frame-relay pvc" or "show frame-relay map" on any of the DTE routers.

Let me know if you run into any problems or have any questions - hopefully this helps document the process of using the T1 WICs for frame relay lab connections.

Wednesday, November 3, 2010

OSPF on 3 routers

The next step for my 3 router (and 1 switch) Cisco lab is to set up a routing protocol so that all of the subnets on the network can communicate.  Here is the current setup (see my last post for setup details):
Right now, if I try to ping TOP's E0/0 interface (172.16.10.1) from SWITCH, the ping will fail, even after setting the IP DEFAULT GATEWAY 172.16.30.1 global configuration command on SWITCH in order to set BOTTOM as it's default gateway.  The ping fails when the packet reaches BOTTOM and BOTTOM and none of BOTTOM's routes include 172.16.10.1.

Let's look at BOTTOM's routes as they stand:

BOTTOM>SHOW IP ROUTE


Gateway of last resort is not set


   172.16.0.0/24 is subnetted, 1 subnets
C     172.16.30.0 is directly connected, G0/0
   192.168.1.0/24 is variably subnetted, 4 subnets, 2 masks
C     192.168.1.9/32 is directly connected, S0/0/1:0
C     192.168.1.8/30 is directly connected, S0/0/1:0
C     192.168.1.0/30 is directly connected, S0/0/0:0
C     192.168.1.2/32 is directly connected, S0/0/0:0

So, you can see from the routing table that there is no way a ping going through BOTTOM is going to reach the 172.16.10.1, because BOTTOM doesn't know where to send it!

Now, let's enable the a very basic instance of the OSPF routing protocol on BOTTOM and TOP so they will know about each other's connected subnets.

BOTTOM>enable
BOTTOM#configure terminal
BOTTOM(config)#router ospf 1
----- This command tells the router that you want to configure instance #1 of OSPF

BOTTOM(config-router)#network 0.0.0.0 255.255.255.255 area 0
----- This tells the router to include ALL attached interfaces in the OSPF topology.  I'm not going to go into the details here, but you can use the network command to specify only interfaces with specific subnets attached to be included in the OSPF topology.


BOTTOM(config-router)#area 0 authentication message-digest
----- This sets all interfaces encompassed by the previous command to use MD5 authentication for OSPF communication.


BOTTOM(config-router)#do show ip ospf interface
----- This will list all interfaces encompassed by the OSPF network command.  We will need to set the MD5 password on each of these interfaces:


BOTTOM(config-router)#interface s0/0/1:0
BOTTOM(config-if)#ip ospf message-digest-key 1 md5 c3s76k
----- This bizarre command sets the first OSPF MD5 key to "c3s76k".  You'll need to run the same command on any interface that connects to another router running OSPF in this environment:


BOTTOM(config-if)#interface s0/0/0:0
BOTTOM(config-if)#ip ospf message-digest-key 1 md5 c3s76k

That completes the OSPF configuration for BOTTOM.  Notice, nothing has changed in the routing table.  You'll have to perform the same steps on TOP and SMALL before your OSPF environment will be properly configured!  Make sure to use the exact same area number (0) and MD5 key, or your router's won't communicate OSPF information.

After running these commands on TOP and SMALL, here is BOTTOM's new routing table:
BOTTOM>SHOW IP ROUTE

Gateway of last resort is not set

   172.16.0.0/24 is subnetted, 3 subnets
C     172.16.30.0 is directly connected, G0/0
O     172.16.20.0 [110/66] via 192.168.1.9 ... S0/0/1:0
O     172.16.10.0 [110/75] via 192.168.1.2 ... S0/0/0:0
   192.168.1.0/24 is variably subnetted, 4 subnets, 2 masks
C     192.168.1.9/32 is directly connected, S0/0/1:0
C     192.168.1.8/30 is directly connected, S0/0/1:0
C     192.168.1.0/30 is directly connected, S0/0/0:0
C     192.168.1.2/32 is directly connected, S0/0/0:0
O     192.168.1.4/30 [110/130] via 192.168.1.9 ... S0/0/1:0
                     [110/130] via 192.168.1.2 ... S0/0/0:0

I have bolded the routes added by OSPF.  You'll notice that there are two equal-cost routes to 192.168.1.4/30, because the calculated distance to the serial link between TOP and SMALL is exactly the same regardless of whether you go through TOP or SMALL to get there.

You should now be able to successfully ping 172.16.10.1 from SWITCH, because your routers have routes there and back!

Best of all, even if you lose one of the serial links, all of your subnets will be able to talk to each other once OSPF converges (convergence takes less than 5 seconds in this network).

Up next, EIGRP!

Tuesday, November 2, 2010

Cisco Training Lab Network

I set up a Cisco equipment training lab for myself today using some spare Cisco equipment.  The diagram below outlines the basics of the network that I set up.  You can use this information as a guide for how to set up a basic Cisco training lab!  I'll be doing some more interesting stuff with this setup as time goes on.

TOP is a Cisco 3640 with a few WIC 1DSU T1 controller cards installed.
BOTTOM is a Cisco 3825 router with a few VWIC2-2MFT-T1/E1 controller cards installed.
SMALL is a Cisco 1841 router with one VWIC2-2MFT-T1/E1 controller card installed.
SWITCH is a Cisco Catalyst 2950; a 24 port fast Ethernet switch.

In order to connect the routers back-to-back without an ISP between them, just create some cables that switch wires 1 & 2 with 4 & 5 on one end (normal straight cable on the other end).  If you're comfortable creating straight-through cat5/cat6 cables, just create a cable with OW-O-GW-Bl-BlW-G-BrW-Br on one end and Bl-BlW-GW-OW-O-G-BrW-Br on the other end.  The reason behind this cable wiring is that both routers will be sending on wires 4 & 5 and listening on wires 1 & 2.  Therefore, you must swap these two pairs so that when router 1 sends on 4 & 5, the signal will end up on router 2's listening wires, 1 & 2.

Depending on the router, you may have to set up the controller module before a serial interface even appears:

BOTTOM>enable
BOTTOM#configure terminal
BOTTOM(config)#card type t1 0 0
----- This tells the router that you have a T1 card in slot 0/0. The card's amber light(s) will probably come on now.

BOTTOM(config)#controller t1 0/0/0
BOTTOM(config-controller)#framing esf
BOTTOM(config-controller)#linecode b8zs
BOTTOM(config-controller)#clock source internal
BOTTOM(config-controller)#channel-group 0 timeslots 1-24 speed 64
----- The command above will cause the router to create a serial interface.

BOTTOM(config-controller)#interface s0/0/0:0
BOTTOM(config-if)#encapsulation ppp
BOTTOM(config-if)#ip address 192.168.1.1 255.255.255.252
BOTTOM(config-if)#no shutdown
----- The mask of 255.255.255.252 (192.168.1.1/30) breaks the 192.168.1.0/24 (255.255.255.0) subnet into many smaller subnets with 2 usable IPs each - perfect for point-to-point links!  The 192.168.1.0/30 subnet consists of the following IPs:
-- 192.168.1.0 (network IP)
-- 192.168.1.1 (usable IP - BOTTOM router)
-- 192.168.1.2 (usable IP - TOP router)
-- 192.168.1.3 (broadcast IP)
If you're not comfortable with subnetting information like this, read up on it!  It's very important knowledge for anyone working on routers and switches.

The commands listed above are all that are required (and some are optional) on this router to set up a basic point-to-point interface.  Now, we need to set up the interface on one of our other routers, TOP, which requires a slightly different method because of the different interface card used:

TOP>enable
TOP#configure terminal
TOP(config)#interface s0/0
TOP(config-if)#service-module t1 clock source internal
TOP(config-if)#service-module t1 framing esf
TOP(config-if)#service-module t1 linecode b8zs
TOP(config-if)#service-module t1 timeslots 1-24 speed 64
----- The last 4 commands replace the card and controller configuration commands used on BOTTOM, the last router we configured.

TOP(config-if)#encapsulation ppp
TOP(config-if)#ip address 192.168.1.2 255.255.255.252
TOP(config-if)#no shutdown

We should now have a working, usable point-to-point link between BOTTOM and TOP, as long as you created the cable properly and plugged it into the correct interface on each router.  Try pinging between the routers:

TOP#ping 192.168.1.1
Sending 5, 100-byte ICMP Echos to 192.168.1.1, Timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms

Now that you have this link configured, it should be a piece of cake for you to configure the remaining serial links and Ethernet interfaces to complete the network in the picture at the top of this post.

Good luck!  Let me know if you run into any problems!