If you just bought your first used Cisco router, I bet one thing you want to immediately do is connecting the Cisco router to the cable internet.
I know I did, I have cable internet for my home network. Previously I used Linksys router to get my LAN connected to the internet.
Configuring Cisco router to connect to the cable internet is easy work, even if you know only the basic configuration stuff in Cisco.
Configure IP Address of the Router’s Interfaces
The router will get the ip configuration from DHCP server of the ISP, the Ethernet 0/0 port I use as the exit point to the internet.
The Ethernet 0/1 will be the port where my computer is connected. I’m going to set private IP address as the gateway for the computer.
Configure Routing
This example only shows the basic static routing, the router will send all request from the client (from port Ethernet 0/1) to the port Ethernet 0/0.
We need to first set the IP address of the router’s interfaces to begin configuring Cisco router to work with cable internet.
If you configure the router for the first time, connect to it using the console cable.
the interface ethernet 0/0 is connected to the cable modem and interface ethernet 0/1 connected to my PC.
Ethernet 0/0 is using configuration got from the ISP so we’ll set it to receive IP address from ISP’s DHCP server. Always remember to give no shutdown command on the interface:
router> enable
router# configure terminal
router (config) # interface ethernet 0/0
router (config-if)# ip address dhcp
router (config-if)# no shutdown
Now to set the Ethernet 0/1 port as the picture above, we can just jump right to the interface 0/1 configuration mode:
router (config-if)# interface ethernet 0/1
router (config-if)# ip address 192.168.1.1 255.255.255.0
router (config-if)# no shutdown
You have successfully configure IP addresses to your interfaces, you can check it using the following command:
router# show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0 xxx.xxx.xxx.xxx YES DHCP up up
Ethernet1 192.168.1.1 YES NVRAM up up
The show ip interface brief is a very useful command, you would want to use it to check the status of your interfaces.
The interface column shows you all the interfaces you have, the IP-Address is of course shows the addresses of the respective interfaces.
The Method column shows whether the addresses given by a DHCP server or you configured it yourself (stored in NVRAM) or it can also shows TFTP – configuration from TFTP server.
When you finished this configuration, your router will be receiving IP address on interface 0/0 from DHCP server of the ISP, and the interface 0/1 will be ready to communicate with network 192.168.1.0
Setting Cisco Router as DHCP Server
This option really is optional if you want to set Cisco router to work with cable internet, but this is a good chance to add your skill in configuring Cisco devices.
Now it’s time to configure your router as DHCP server.
To set a DHCP server, you will configure a pool of network IP addresses that you want to give out to the clients (PC, printer, NAS, etc).
I want to give out the IP addresses from the network 192.168.1.0.
First thing you need to configure is to exclude the IP addresses that you dont want to give out.
For example, I’ve configured the router interface 0/1 to be 192.168.1.1, then I need to exclude 192.168.1.1 so the router won’t give out this address.
You can configure the exclusion in the router’s global configuration mode:
router> enable
router# configure terminal
router (config)# ip dhcp excluded-address 192.168.1.1
This command is very useful especially if you need to exclude a range of IP addresses, if you need to exclude say 192.168.1.1 until 192.168.1.10 you can do it like this:
router (config)# ip dhcp excluded-address 192.168.1.1 192.168.1.10
After the ip dhcp excluded-address we give the low IP address and the high IP address, this way your router not give IP addresses from 192.168.1.1 to 192.168.1.10, the router will start giving out address from 192.168.1.11 and so on.
(more…)