Configuring A Lan With DHCP and Vlans
Configuring A Lan With DHCP and Vlans
Configuring A Lan With DHCP and Vlans
The Cisco 819, Cisco 860 and Cisco 880 Integrated Services Routers (ISRs) support clients on both physical
LANs and virtual LANs (VLANs).
Figure 1: Physical and Virtual LANs with DHCP Configured on the Cisco Router
3 VLAN 1
4 VLAN 2
DHCP
DHCP, which is described in RFC 2131, uses a client/server model for address allocation. As an administrator,
you can configure your Cisco 800 series router to act as a DHCP server, providing IP address assignment and
other TCP/IP-oriented configuration information to your workstations. DHCP frees you from having to
manually assign an IP address to each client.
When you configure a DHCP server, you must configure the server properties, policies, and DHCP options.
Note Whenever you change server properties, you must reload the server with the configuration data from the
Network Registrar database.
VLANs
The Cisco 819, Cisco 860 and Cisco 880 routers support four Fast Ethernet ports on which you can configure
VLANs.
VLANs enable networks to be segmented and formed into logical groups of users, regardless of the user’s
physical location or LAN connection.
Note The procedures in this chapter assume you have already configured basic router features, as well as PPPoE
or PPPoA with NAT. If you have not performed these configurations tasks, see the Basic Router
Configuration and Configuring a VPN Using Easy VPN and an IPSec Tunnel as appropriate for your
router.
Configuring DHCP
Perform these steps to configure your router for DHCP operation, beginning in global configuration mode:
SUMMARY STEPS
DETAILED STEPS
Step 2 ip name-server server-address1 Specifies the address of one or more Domain Name System
[server-address2...server-address6] (DNS) servers to use for name and address resolution.
Example:
Router(config)# ip name-server192.168.11.12
Step 3 ip dhcp excluded-address low-address [high-address] Specifies IP addresses that the DHCP server should not
assign to DHCP clients. In this example, we are excluding
Example: the router address.
Step 4 ip dhcp pool name Creates a DHCP address pool on the router and enters DHCP
pool configuration mode. The name argument can be a string
Example: or an integer.
Step 5 network network-number [mask | prefix-length] Defines subnet number (IP) address for the DHCP address
pool, optionally including the mask.
Example:
Router(config-dhcp)#network 10.10.0.0
255.255.255.0
Step 7 default-router address [address2...address8] Specifies up to eight default routers for a DHCP client.
Example:
Router(config-dhcp)#default-router 10.10.10.10
Step 8 dns-server address [address2...address8] Specifies up to eight DNS servers available to a DHCP client.
Example:
Router(config-dhcp)# dns-server 192.168.35.2
Step 9 domain-name domain Specifies the domain name for a DHCP client.
Example:
Router(config-dhcp)#domain-name cisco.com
Configuring VLANs
Perform these steps to configure VLANs on your router, beginning in global configuration mode:
SUMMARY STEPS
1. vlan vlan_id
2. exit
DETAILED STEPS
Example:
Router# config t
Router(config)#vlan 2
SUMMARY STEPS
DETAILED STEPS
Example:
Router(config-if)# switchport access vlan 2
• show—Entered from VLAN database mode. Displays summary configuration information for all
configured VLANs.
• show vlan-switch—Entered from privileged EXEC mode. Displays detailed configuration information
for all configured VLANs.