how-to block ads
»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 them 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. Typical network environment that might utilize following sample router configuration is as follows
* There is no (external) modem in front of the router that connects to the ISP
* The modem to the ISP would be internal within the router itself
* DSL line would go directly to the router internal modem
* ISP is providing Public IP address to the router via DHCP
* There is NAT/PAT in place on the router to translate internal IP addresses to the ISP-provided Public IP address
* The router could also be acting as DHCP server, which provide dynamic IP info for hosts behind the router
Keep in mind that when the router acts as DHCP server, there are two DHCP process 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. 184.108.40.206) where your router would hand out completely different IP address for internal usage.
DHCP client configuration for generic (dual-Ethernet) router or for ADSL router is basically the same. Specifically for ADSL router, you need to configure the DSL (ATM) interface, the BVI interface, and the IRB feature.
To go a bit technical, the ATM interface should be configured as point to point with the matching ISP VPI/VCI value. The reason behind it is that there is possibility of having multiple VPI/VCI values within the same ATM interface. By setting a sub-interface as point-to-point connection with specific VPI/VCI value, the ADSL modem will know how it correctly forwards traffic to proper path.
The next step is to tie point-to-point ATM interface to a specific BVI interface by setting them in the same broadcast domain. In this sample configuration, both the ATM interface and the BVI interface are in the same broadcast domain #1 (bridge group 1).
The reason behind such setup is following. There are two interfaces that deal with the DSL connection. One interface is the physical ATM interface where you physically connect phone cable into it. The other interface is the logical Layer-2/3 BVI interface that will do IP routing and switching. In other words, the BVI is handling the ISP and Internet IP routing connection.
Where logically the BVI is the WAN side, the LAN side is still the same which is the Ethernet interface. When your LAN needs to go out to the Internet, the router will send all necessary packets from the Ethernet interface to the BVI interface. Since BVI interface is only a logical interface and not a physical interface, the BVI will then look for its physical interface in order to forward the packets that need to go out to the Internet. The physical interface in question is the ATM interface.
To make sure the BVI interface know that its associating physical interface is the ATM interface, you need to put them in the same broadcast domain. This is where the "bridge group 1" command come in handy.
Since your router would have two interfaces (the ATM and BVI) in the same broadcast domain and would need to do proper IP routing between your ISP and your LAN, then you also need to configure the IRB feature. IRB is short for Integrated Routing Bridging. With IRB, your router is capable to act as a bridge (for the ATM and BVI interfaces) and as a router (for routing business between your ISP and your LAN).
This sample router configuration assumes the followings
* Internal private IP subnet (for hosts behind the router): 10.10.10.0/24
* All of the hosts' gateway would be the router inside interface IP address: 10.10.10.1
* The IP address range of 10.10.10.2 to 10.10.10.254 would be available for your LAN devices/hosts
* 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)
Following is a sample configuration to set an ADSL router as the ISP's DHCP client. Please note that the pvc (vpi/vci) value used here in this sample configuration MUST BE MODIFIED to match your ISP vpi/vci's. Since only your ISP that know for sure of what their own vpi/vci value, please ask your ISP to find out the value.
no service pad
service timestamps debug uptime
service timestamps log uptime
ip address 10.10.10.1 255.255.255.0
no ip directed-broadcast
ip nat inside
no ip address
no ip directed-broadcast
no atm ilmi-keepalive
hold-queue 208 in
interface ATM0.35 point-to-point
no ip directed-broadcast
ip address dhcp
no ip directed-broadcast
ip nat outside
ip nat inside source list 1 interface BVI1 overload
no ip http server
access-list 1 permit 10.10.10.0 0.0.0.255
bridge 1 protocol ieee
bridge 1 route ip
line con 0
exec-timeout 0 0
transport input none
line vty 0 4
scheduler max-task-time 5000
* Watch the exclusion of the gateway of the last resort 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 handed-down IP address 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
* To illustrate some DHCP debugging processes and techniques which may help you in case of needing to troubleshoot some DHCP issue, check out the following thread.
»[HELP] 881 does not "recover" after cable modem reboot
Setup the router as DHCP server (handing out IP address to LAN hosts automatically)
Keep in mind that the above sample configuration assumes all of your LAN machines (i.e. computers, print servers) to have their associating IP address statically configured. When your computers are configured to receive IP address automatically (read: as DHCP clients), then you need to configure the router as the DHCP server to your LAN machines. The following is the needed configuration.
ip dhcp excluded-address 10.10.10.1 10.10.10.31
ip dhcp pool CLIENT
network 10.10.10.0 255.255.255.0
dns-server 220.127.116.11 18.104.22.168 22.214.171.124
With the above setup,
* The IP address range of 10.10.1.32-10.10.10.254 would be available for DHCP pool client
* The IP address range of 10.10.10.2-192.168.1.31 would be reserved for statically-assigned hosts, consequently
* The DHCP clients would also receive DNS IP addresses of 126.96.36.199, 188.8.131.52, and 184.108.40.206 automatically as part of the dynamically assigned IP address process
* These 220.127.116.11, 18.104.22.168, and 22.214.171.124 should be either your local DNS/WINS servers or ISP-provided DNS servers