Frank - CIF-Rochester/wiki GitHub Wiki

Frank is the router in the Cage that connects the Lab network to the UR network and the outside world. It provides NAT and DHCP services, replacing Xana for these functions. Frank was replaced by Ben in Fall 2019.

Currently, Frank is a Cisco 2621 router. Based on the configuration that was found on it, it appears to have been donated to CIF by the Rochester office of Gillespie Associates. It will hopefully be upgraded to a newer model at some point, but should be sufficient for now. The name "Frank" was coined from the label found on the back of the router when it was pulled off the shelf in the Cage. The origins of this label are unknown, but it seemed like a decent enough name, and Ben Ackerman '18 didn't feel like being creative at that moment, so it stuck.

Current Configuration

The router is currently set up with a very simple NAT+DHCP configuration using two 100Mbps Ethernet interfaces. The other interfaces in our unit, which include an additional Ethernet interface (likely only 10Mbps), a Token Ring interface (combined with the extra Ethernet), and a T1 interface, are not used. FastEthernet0/0 is the "outside" interface, connecting to the UR network. Its IP address is ###.###.220.4. FastEthernet0/1 is the "inside" interface, connecting to the lab switch. The IP on that side is 192.168.1.1.

Setup

If you have never used Cisco IOS before, you may wish to read up on it a bit before doing this. Its command line is very different than that of Windows/DOS or UNIX/Linux...

Console Connection

In order to do this, you'll need a computer with an RS-232 serial port (a USB dongle should work, but can be finicky), terminal software (HyperTerminal, PuTTY, etc.), and a Cisco console cable (light blue flat cable with a DB9 connector on one end and RJ45 on the other - there are at least 2 of them floating around the cage).

Connect the cable between the "CONSOLE" port on the router and your computer's serial port. If you can't figure out which end goes where, you're probably either drunk or highly sleep-deprived, and you shouldn't be doing this right now. Start your terminal software of choice, and establish a serial connection on the appropriate port. Serial parameters should be 9600 baud, 8 data bits, 1 stop bit, no parity, and no flow control (9600 8-N-1). If the router is on, hitting Enter on the terminal should get you to the IOS command line.

Factory Reset

You'll want to start by factory resetting the router to blow away any previous configuration that may be on it. Since you will probably be doing this on something that has just been donated/purchased second-hand/etc., you will probably not have the password to log in and will need to reset it from ROMmon. This process differs between different Cisco devices, so if you're doing this on something other than a 2600-series router, you'll probably need to do some Googling. But for the 2600-series, it can be done like this (taken from here):

With the router powered off, set up the console connection as described in the section above. Power the router on and watch what appears on the terminal. When you see this:

 Self decompressing the image : ###
press Ctrl+Break as the #signs are counting. In PuTTY, this can be done using the physical keys (Ctrl and the Pause/Break key to the right of Scroll Lock), but some terminals may have a special command to send that character. If you got it right, you should see:
 monitor: command "boot" aborted due to user interrupt
 rommon 1 >
From this prompt, type
 confreg 0x2142
to set the configuration register, then reboot the router by typing
 reset

When the router (eventually) boots into IOS, it will ask if you want to configure it. This dialog doesn't give us enough options,

so answer "no" for now. When you reach the "Router>" prompt, type

 enable
to gain admin privileges, then
 config terminal
(or "config t" for short) to enter configuration mode. Now, run:
 enable secret 
 hostname Frank
 config-register 0x2102
 exit

Replace with the password you want to use to protect the privileged mode of the console. Note that it WILL be displayed in plaintext as you do that, so make sure no plebs are looking over your shoulder. The other commands set the router's hostname to Frank and reset the configuration register back to its normal setting (and then exit config mode). Now, go ahead and type

 reload
to store all of this and reboot. Go get a snack while the router takes its time to do that.

Once it comes back up, get yourself back into privileged mode (this time you'll have to use the password you set to do that). Go ahead and set the clock by running:

 clock set 03:05:30 5 mar 2017
(using the actual date and time, of course). Now, let's get to the good stuff...

IP and NAT configuration

We'll start by configuring the range of addresses that NAT will translate. Get back into configuration mode, then type

 access-list 1 permit 192.168.1.0 0.0.0.255
to build the list of addresses. Now, set up Overloaded NAT on that range by typing
 ip nat inside source list 1 interface fa0/0 overload
(assuming FastEthernet0/0, or "fa0/0" for short, will be the UR side of the router).

Now, we have to configure the interfaces. Let's start with the lab side (in this case FastEthernet0/1, abbreviated to "fa0/1"):

 interface fa0/1
 ip address 192.168.1.1 255.255.255.0
 ip nat inside
 exit
This sets the router's IP on that interface, and sets it to be the inside interface of our NAT configuration. Note that the first

line enters interface config mode, and the final "exit" backs out of that back to global config mode (where you started from). Now, let's configure the UR side:

 interface fa0/0
 ip address ###.###.220.4 255.255.255.0
 ip nat outside
 exit
Now that both sides are configured, we'll enter a few other general IP settings. Still at the global config prompt:
 ip default-gateway ###.###.220.250
 ip name-server ###.###.220.31 ###.###.220.30
This sets the default gateway on the UR side and the default DNS servers (Labmistress and Labmaster).

DHCP Configuration

Still at the global config prompt, enter DHCP config mode by running:

 ip dhcp pool LAB
You can replace "LAB" with some other identifying word if you want. Now, we'll define the DHCP settings:
 network 192.168.1.0 255.255.255.0
 default-router 192.168.1.1
 dns-server ###.###.220.31 ###.###.220.30
 domain-name cif.rochester.edu
 lease 1
This puts DHCP into the 192.168.1.* range, tells it to send the router's IP out as the default gateway, sets Labmistress and Labmaster, tells it to send out "cif.rochester.edu" as the domain name, and configures a lease time of 1 day (you could set it longer if you want). It should bump you back out to global config after the last command, but you should be able to jump out using "exit" if it doesn't.

Now, we need to add an excluded range of IPs. These will be used for static IPs such as that of the router itself and those of the printers. Set this by running (from global config):

 ip dhcp excluded-address 192.168.1.1 192.168.1.99
With that setting, DHCP assignment will start at 192.168.1.100.

Eventually, we may want to configure additional options for such things as PXE booting (for FOG), but we'll do that another time (ProxyDHCP on Lucifer is working fine as of now).

Configuring the Default Route

Since we haven't enabled any protocols with which the router can learn the network topology, we need to tell it where to send traffic destined for outside our portion of the UR network. From global config, run:

 ip route 0.0.0.0 0.0.0.0 ###.###.220.250
to tell the router to send all traffic that doesn't match another rule to our gateway on the UR network.

Bringing Up The Interfaces

At this point, it's time to connect the cables and bring the interfaces up.

NOTE: Do NOT shut off the router and move it at this point, as we have not saved our configuration yet. If you have to move it to connect the cables, go to "Saving Your Configuration" below and do that first.

Connect the cables to the appropriate interfaces. Then, from global config, run

 interface fa0/0
 no shutdown
 exit

 interface fa0/1
 no shutdown
 exit
to bring each interface up. You should now be able to access the Internet from computers on the lab side of the router; go ahead and test that to make sure you did everything right.

Saving Your Configuration

Finally, we need to save this configuration so it loads on startup. (NOTE: Even if you did this before so you could move the router, you'll need to do it again to save the "no shutdown" command too.) Exit global config mode, and from the main privileged prompt, type

 copy run start
When it asks for a file name, accept the default by hitting Enter. It will build the configuration, and eventually it will say "[OK]" and return to the prompt. Now, go ahead and
 disable
 logout
to log out of privileged mode and out of the router entirely.

Congratulations, you're done!

⚠️ **GitHub.com Fallback** ⚠️