You may use the following commands to configure a Wide Area Network (WAN) between two Cisco routers in a lab environment. The routers in this example are Cisco 2501 routers. Also, I will print the output from the “router-1″ router and you may mirror these configurations on the “router-2″ router (I will note any exceptions below).
This network will consist of two routers. The Internet Protocol (IP) address of “router-1″ will be 172.16.4.100/24 and the IP address of router-2 will be 172.16.4.101/24. This IP addressing assignment puts these routers on the same network so that they may communicate as a Wide Area Network (WAN) link.
1. Configure the interfaces.
===START===
router-1#config t
Enter configuration commands, one per line. End with CNTL/Z.
router-1(config)#interface serial 0
router-1(config-if)#ip address 172.16.4.100 255.255.255.0
router-1(config-if)#clock rate 4000000
router-1(config-if)#description Wide Area Network (WAN) Link – DCE
router-1(config-if)#no shutdown
===END===
Notice that this is interface “Serial 0″ on the router. Additionally, I have given the interface a description and I have used the “clock rate” command as this interface will provide the clocking for this WAN (using the back-to-back serial cable).
2. Configure the telnet password on each router.
===START===
router-1#config t
Enter configuration commands, one per line. End with CNTL/Z.
router-1(config)#line vty 0
router-1(config-line)#password abc123
router-1(config-line)#login
===END===
In the above example I chose a very simple password “abc123″ because this is a lab environment.
3. Connect the back-to-back serial cable to the routers. You will plug the date communication equipment (DCE) end of the cable into the router that will be providing the clocking for this network (router-1 in this example) and plugging the date terminal equipment (DTE) end of the cable into the router that will be receiving the clock in this network (router-2 in this example).
In a non-production environment (such as the one in this example) I must use a back-to-back serial cable and use the “clock rate” command on the DCE side of the cable or the network will not function.
Now that all of the configurations have been provided on “router-1″ you may mirror these configurations on “router-2″. The difference would be that interface Serial 0 on “router-2″ would have an IP address of 172.16.4.101, you would not use the “clock rate” command on this router and optionally you may change the description to the following “Wide Area Network (WAN) Link – DTE”.
At this point we can test the IP connectivity between the routers by using the PING command as well as using the Telnet function.
router-1#ping 172.16.4.101
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echoes to 172.16.4.101, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms
router-1#telnet 172.16.4.101
Trying 172.16.4.101 … Open
User Access Verification
Password:
router-2>
From the above output we see that we can PING and Telnet to router-2 successfully so this wide area network link is functioning correctly.