site Search:


 
    All FAQs Site FAQ DSL FAQ Cable Tech About DSL Distance DSL Hurdles »»






how-to block ads



Search for: in all FAQs
Suggested prerequisite reading:
»Cisco Forum FAQ »Things to expect when setup network for home or small business

For many cable and DSL internet connections, the ISPs inform their customers (subscribers) to set their router to receive IP address from ISP automatically. This means that the ISPs treat their subscriber's router as DHCP client.

When this is your case, then the following sample configuration is a good starting point to help you configure the router. Though the example uses 2514 router, the configuration applies to any router that uses or has two Ethernet interfaces for connection (one for WAN or facing the ISP, and another for LAN or facing your computers).

Typical network environment that might utilize following sample router configuration is as follows

* There is a modem in front of the router, which the modem connects to the ISP
* ISP is providing Public IP address to the router via DHCP
* The WAN interface (in this sample configuration, the Ethernet0) receives the ISP-provided Public IP address via DHCP process between the router and the ISP network.
* There is NAT/PAT in place on the router to translate internal IP addresses to the ISP-provided Public IP address
* All internal IP addresses are NAT/PAT-ed to the ISP-provided Public IP address (or to the Ethernet0 interface IP address)
* The router is also acting as DHCP server, which provide dynamic IP info for hosts behind the router

Note:

Keep in mind that there are two DHCP processes on this sample configuration. One is between your ISP and the router, and another is between the router and machines within your LAN. Your ISP would hand out specific IP address (i.e. 1.1.1.1) where your router would hand out completely different IP address for internal usage.

As mentioned, this sample configuration uses Ethernet0 interface as the WAN interface that receives the ISP-provided Public IP address via DHCP process between the router and the ISP network. You can however use any available and possible interface on your router, either Ethernet1, FastEthernet0/0, or GigabitEthernet1/0. When you do not use the exact same interface as sample configuration showed, make sure that you make necessary adjustment to fit your configuration.

This sample router configuration assumes the followings

* Internal private IP subnet (for hosts behind the router): 192.168.1.0/24
* All of the hosts' gateway would be the router inside interface IP address: 192.168.1.1
* The IP address range of 192.168.1.31-192.168.1.254 would be available for DHCP pool client
* The IP address range of 192.168.1.2-192.168.1.30 would be reserved for statically-assigned hosts, consequently
* The DHCP clients would also receive DNS IP addresses of 4.2.2.5, 4.2.2.6, and 4.2.2.66 automatically as part of the dynamically assigned IP address process
* When all hosts behind the router go out to the Internet, the hosts would be using the router outside interface IP address (which is the ISP-assigned Public IP address)

Note:

* The DNS server IP addresses used here are 4.2.2.5, 4.2.2.6, and 4.2.2.66 are "fake" samples of your ISP DNS server IP addresses which may not reflect your actual ISP DNS server IP addresses. To match your ISP DNS server IP addresses, simply replace those IP addresses with your ISP DNS server IP addresses.
* When you don't know your ISP DNS server IP addresses, simply issue show dhcp server command on your router to find out. You then implement those ISP DNS server IP addresses in your router DHCP configuration (read: replace 4.2.2.5, 4.2.2.6, and 4.2.2.66 with the ones that the show dhcp server command shows).

SAMPLE CONFIGURATION

service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
hostname Router
!
!
ip subnet-zero
no ip finger
ip dhcp excluded-address 192.168.1.1 192.168.1.30
!
ip dhcp pool insideDHCP
network 192.168.1.0 255.255.255.0
default-router 192.168.1.1
dns-server 4.2.2.5 4.2.2.6 4.2.2.66
!
!
!
!
!
interface Ethernet0
description Facing the ISP (the WAN)
ip address dhcp
ip nat outside
!
interface Ethernet1
description Facing my LAN
ip address 192.168.1.1 255.255.255.0
ip nat inside
!
interface Serial0
no ip address
shutdown
!
interface Serial1
no ip address
shutdown
!
ip nat inside source list 1 interface Ethernet0 overload
ip classless
no ip http server
!
access-list 1 permit 192.168.1.0 0.0.0.255
!
!
line con 0
exec-timeout 0 0
password 7 104308100F1E1C0C
logging synchronous
login
transport input none
line aux 0
password 7 082C4D4703100B10
login
line vty 0 4
password 7 050607062B45400E
login
!
end

Some discussions

»[Config] Need help configuring 1841 for lan broadband please ?
»[Config] Can anyone please help with my configuration?
»Router Setup, Please HELP
»[Config] my verizon DSL and cisco 2514 configuration
»[HELP] 2650XM Config for RR

Note:

* Watch the exclusion of the gateway of the last resort or default gateway command (ip route 0.0.0.0 0.0.0.0). This command is not needed for dynamic public IP address assignment via DHCP since that's the whole point of using DHCP. In other words, the default gateway should appear in routing table due to DHCP process with the ISP and not by manual configuration.

* The only time you need to manually configure the default gateway using DHCP is when you need to change the route administrative distance into something that fits your need. Should this be your choice, the command is the following.
ip route 0.0.0.0 0.0.0.0 dhcp [ENTER NEW ADMINISTRATIVE DISTANCE HERE]

* Some ISP lock down IP address assigning mechanism off their IP address pool with certain MAC address. When this is the case, you may want to inform your ISP to replace the MAC address with the correct one (which is your router WAN interface MAC address) or "clone" MAC address from the working one into the router. Check out the following thread for illustration

»[help] 851W and ISP DHCP


got feedback?
Thank you so much for this information. I had configured my 2621 as a DHCP client and PAT using the currently ISP assigned IP address but knew this was trouble but I had to get that working first then figure out how to make it use whatever address is currently assigned. Obviously, it is right there in the command help but I am somewhat of a noob to Cisco Routers. This replaced my D-Link DI-524 RevA. Yea! Randy

2010-05-22 23:57:47


Thumd up for u!

2010-10-19 07:44:28


by aryoba See Profile
last modified: 2011-07-17 10:33:55


Sunday, 12-Feb 07:18:23 Terms of Use & Privacy | feedback | contact | Hosting by nac.net - DSL,Hosting & Co-lo
over 12.5 years online! © 1999-2012 dslreports.com.