Cisco IOS: Home Router Configuration

Author
Aron Schatz
Posted
October 22, 2006
Views
113879
Cisco IOS: Home Router Configuration
Imagine that you have a Cisco router running IOS but don't know the first thing about how to use it as a home router. Stop imagining because there are many people that are in the same situation. This guide will help you through it.

Page 1: Intro, Show Run

Intro:

Many readers are like me and want to see what Cisco's Internetwork Operating System (IOS) can do and how powerful it is. There are a plethora of guides on the internet to do many useful functions with a router and a later version of IOS, but none that are easy to follow and give step by step instructions on how to do basic setups such as a home router. I am sure many of you have an inexpensive router sitting in your homes doing all the routing for your network. I think it is time to upgrade to a bit more expensive router than can do the job of that and more.

Stop Right There:

Do not bother to buy a Cisco router if you do not plan on learning IOS. This is the only reason I purchased mine. There is no benefit to owning a Cisco router (except bragging rights, I guess) over a SOHO based router. The SOHO router is cheaper and is much easier to setup. If you do not want to spend time configuring a router, do not purchase one.

Just The Config:

In searching for guides while trying to setup my personal 2612, all I wanted was the config output so I could input the commands. Without further ado, here is the basic home router config file. It gets its address from DHCP on the internet side and acts as a DHCP server on the LAN side using port address translation.

Code

!
version 12.3
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname aserouter
!
boot-start-marker
boot-end-marker
!
enable secret 5 xxxxxxxxxxxxxxx
!
no aaa new-model
ip subnet-zero
ip cef
!
!
no ip domain lookup
ip dhcp excluded-address 10.0.0.1
!
ip dhcp pool LAN
   import all
   network 10.0.0.0 255.0.0.0
   default-router 10.0.0.1
!
!
!
!
!
interface Ethernet0/0
description Internet Port
ip address dhcp
ip nat outside
half-duplex
!
interface Ethernet0/1
description LAN Port
ip address 10.0.0.1 255.0.0.0
ip nat inside
half-duplex
!
ip nat inside source list 1 interface Ethernet0/0 overload
no ip http server
ip classless
!
!
access-list 1 permit 10.0.0.0 0.255.255.255
no cdp run
!
line con 0
line aux 0
line vty 0 4
transport service none
login
no password
!
!
end


Simple.

What You Need:

Cisco 2612


There are a few parts you need to configure a Cisco router. The first is a Cisco router. It should be one that is running an up to date version of IOS. 12.2 or higher would be fine to use. If you do not have this version of IOS, you will need to acquire an image and load it into your router. This is beyond the scope of this article, but there are many guides on how to do this elsewhere. You also will need a RJ45 to serial cable. What? Instead of making a serial port on the back of the router, it is a plain RJ45 port that needs to be adapted to serial. You can get these cables at many places or make your own. Did I mention you need a computer with a serial port? Yes, not many new computers have them today. I did notice some new routers that have USB on them as well. Lastly, you will need a power cord to power your router. All the other networking equipment is gravy.

Step By Step:

2612 Ports


Now that you have the configuration you need, we can go through how to setup your router step by step. I will explain each command as I go. The first thing you will need to do is setup the router all by itself. Make sure you are near a computer that has a serial port and open up a terminal session using something like HyperTerminal if you are on Windows. Setup the port settings to 9600bps, 8 data, no flow control, 1 stop bit, and no parity (9600 8-N-1). Now plug in the RJ45 to serial cable into your serial port and the console port on the router. Turn on the router. You will be greeted by something that looks like this...

Code

System Bootstrap, Version 11.3(2)XA4, RELEASE SOFTWARE (fc1)
Copyright (c) 1999 by cisco Systems, Inc.
TAC:Home:SW:IOS:Specials for info
C2600 platform with 32768 Kbytes of main memory

program load complete, entry point: 0x80008000, size: 0x75ed1c
Self decompressing the image : ############################################################################################################################## [OK]


Smart Init is enabled
smart init is sizing iomem
  ID            MEMORY_REQ                 TYPE
000092          0X000B3280 C2600 Dual Ethernet
                0X00098670 public buffer pools
                0X00211000 public particle pools
TOTAL:          0X0035C8F0

If any of the above Memory Requirements are
"UNKNOWN", you may be using an unsupported
configuration or there is a software problem and
system operation may be compromised.
Rounded IOMEM up to: 4Mb.
Using 12 percent iomem. [4Mb/32Mb]


Eventually you will be looking at something that says "Press RETURN to get started!" or the end of the boot up process. It is at this point you can press return a few times to bring up a prompt and now we can get started

Step 1: Erase Your Configuration

My router had some things setup in it that were plaguing me and I could not resolve the issue. It is better to start with a fresh router. To do this, issue the "write erase" command at a configuration terminal. How do you get there? If you have a fresh router, this is good practice. First thing you will notice when you have a prompt is what type of prompt is it?

There are two types.
Routerhostname> - This is the unenabled prompt that is for user functions. It is basically useless beyond some minor things.
Routerhostname# - This is the 'root' prompt that you will be able to use. To get to this from the other prompt, type "enable".

If you are at routerhostname>, type "enable" to get to the enable prompt. Now that you are in the root mode prompt, to actually configure the router, you need to enter the configure terminal mode. To do this, you enter 'configure terminal' or 'conf t' at the enable prompt. Most IOS functions can be shortened. This will bring you to the config prompt.

Routerhostname(config)#

How?

Code

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#


You can get out of the config prompt by pressing control+z or by typing "exit" and then pressing enter. We are getting ahead of ourselves. To erase the configuration of the router, you only need to be at the enable prompt. To do this, type "write erase" at the prompt. After this is done, do a reload on the router to reboot.

Code

Router>en
Router#write erase
Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]
[OK]
Erase of nvram: complete
Router#
*Mar  1 00:15:05.527: %SYS-7-NV_BLOCK_INIT: Initialized the geometry of nvram
Router#reload
Proceed with reload? [confirm]


See, that was not so bad. Now you have the basic feel for IOS and I can get down to business.

Step 2: No Service Config

You might be getting messages such as these...

Code

%Error opening tftp://255.255.255.255/network-confg (Timed out)
%Error opening tftp://255.255.255.255/cisconet.cfg (Timed out)
%Error opening tftp://255.255.255.255/router-confg (Timed out)
%Error opening tftp://255.255.255.255/ciscortr.cfg (Timed out)


If this is happening, you should disable the configuration service by typing 'no service config' at a configuration prompt. How do you do this?

Code

Router>en
Router#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#no service config
Router(config)#exit
Router#wr mem

I went to the enable prompt and then entered the terminal configuration mode. I type 'no service config' and then I exited the config prompt by typing 'exit'. The last line is to commit the changes to memory. You can use 'write mem' at an enable prompt or the current command of 'copy running-config startup-config' tells you what you are actually doing. When you make a change to the configuration you are changing the running config. You need to commit these changes to memory or else when the router reloads, you will lose your changes. Sometimes this is good when you screw something up. When you are done with above, issue another 'reload' command at the enable prompt.

Title

Medium Image View Large