Friday, September 27, 2013

Lesson 5 -- WAN Connections

Thanks to the amazing job you've done on your company's network, the company is growing by leaps and bounds. The company has just opened a new branch office in another location, and you have been tasked with setting up a second router with a leased line to connect the remote office to the main office. Create a static route from the main office to the branch office so that employees' desktops and laptops at the new branch office can communicate with the desktops, laptops and servers at the main office, and also set up NAT so the branch office can reach the Internet, too. We'll tackle the project in steps, starting with configuring the serial ports between the two routers.

First, a basic config on the new router. You could type in all of the commands by hand, but...well, as a former co-worker once told me, "The best sys admins are LAZY sys admins." Don't take that wrong -- I'm not encouraging an attitude of slacking off, doing no more than what your boss requires that you do, or anything like that. Rather, I'm saying the best sys admins are the ones who look for ways of automating tedious problems. Think proactive, rather than reactive, and you'll be on the right track. In this case, rather than create a whole new configuration from scratch, just re-use and modify your config from the main office router:

lab2651rtr# copy run tftp
Address or name of remote host []? 192.168.1.32
Destination filename [lab2651rtr-confg]? lab2651rtrNatDhcp-confg
!!
1798 bytes copied in 0.361 secs (4981 bytes/sec)
lab2651rtr#


This requires that you have a TFTP server running on a host on your network. Again, most -- if not all -- *Nix operating systems will have a package to provide TFTP services. In fact, on a Linux or FreeBSD box, TFTP may already be installed and waiting to be started by Inetd or Xinetd. For Windows, a company called "Klever Group" makes a pretty good TFTP client and server called "Pumpkin." A complete discussion of installing and configuring TFTP is beyond the scope of this article, but there are plenty of resources on Google to help you with the process. Note: I said that the "lazy" route was to copy, modify and re-use your old config. Setting up a TFTP server so that you can copy the config to a PC may seem like a lot of work to be "lazy," but trust me -- you'll be using the TFTP server a lot. Getting it running now really will save you a lot of time and effort before we are done with the CCNA.

Okay, you've got your TFTP server running, and you've copied the config to a PC. Open the config file with your favorite editor, and make the following changes:
* Change the hostname on the router;
* Change all occurrences of 192.168.1.1 255.255.255.0 to 192.168.2.1 255.255.255.0;
* Remove all of the NAT configs;
* Change the default route from 100.64.1.1 to 192.168.3.5;

Once that's done, save the modified config file to your TFTP server, create a temporary IP address on your new router, connect your PC to the new router and copy the config back to your new router: lab3640rtr#copy tftp start
Address or name of remote host []?192.168.1.32
Source filename [/tftpboot/lab3640rtrDhcp-confg]?
Destination filename [startup-config]?
Accessing tftp://192.168.1.32//tftpboot/lab3640rtrDhcp-confg...
Loading /tftpboot/lab3640rtrDhcp-confg from 192.168.1.32 (via Serial0/1): !
[OK - 1436/2048 bytes]
[OK]
1436 bytes copied in 0.348 secs
lab3640rtr#


Reload the router, then once it has come back on-line, add the serial port:

lab3640rtr# conf t
lab3640rtr(config)# int serial 0/1
lab3640rtr(config-if)# description T1 to lab2651rtr
lab3640rtr(config-if)# bandwidth 1544
lab3640rtr(config-if)# ip address 192.168.3.6 255.255.255.252
lab3640rtr(config-if)# no shut
lab3640rtr(config-if)# exit
lab3640rtr(config)# exit
lab3640rtr#


...and on the 2651:

lab2651rtr# conf t
lab2651rtr(config)# int serial 0/1
lab2651rtr(config-if)# description T1 to lab3640rtr
lab2651rtr(config-if)# bandwidth 1544
lab2651rtr(config-if)# ip address 192.168.3.5 255.255.255.252
lab2651rtr(config-if)# no shut
lab2651rtr(config-if)# exit
lab2651rtr(config)# exit
lab2651rtr#


These commands should be pretty straightforward to you by now. Basically, we are using the second serial port in slot 0 on both routers, and we are setting a point-to-point link between them. Because only two hosts can exist in a point-to-point network, I have selected a subnet mask that gives us two usable IP addresses (192.168.3.4 255.255.255.252, or 192.168.3.4/30 provides four IP addresses: 192.168.3.4-7, and of those four, only .5 and .6 are usable, as .4 is the network address, and .7 is the broadcast address). The only command that might look a bit odd is the "bandwidth 1544" statement. This tells the router that this particular interface can carry up to 1.544Mbps of traffic, which the router will need to know later on. Technically, we could leave it off right now and it would make no difference, but since it will become important to include a "bandwidth" statement on serial interfaces in the fairly near future, you might as well get used to including it from the start :) One other note: on a home lab, it may not matter, but take my word for it -- in a professional work environment, be very, very careful when typing "no shut" on a Cisco router, especially when logging is enabled, as a typo can be, ahem, embarrassing (hint: what key is next to the "u" key on the keyboard?). Not that I would know from first-hand experience, of course (*cough*).

Once you have made this change to both routers, make sure the serial line is working by running the "sho ip int brie" command, then try pinging from one router to the other:

lab2651rtr# ping 192.168.3.6

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.3.6, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/3/4 ms
lab2651rtr#


With that, we have established a WAN connection between the main office router, and the branch office router. In the next lab, we will connect the two LAN networks so that hosts on each LAN can communicate (right now, only the routers are talking to each other).

No comments:

Post a Comment