Page 61 / 196 Scroll up to view Page 56 - 60
5-3
Cisco 850 Series and Cisco 870 Series Access Routers Software Configuration Guide
OL-5332-01
Chapter 5
Configuring a LAN with DHCP and VLANs
Configure DHCP
Step 3
ip dhcp excluded-address
low-address
[
high-address
]
Example:
Router(config)#
ip dhcp excluded-address
192.168.9.0
Specifies IP addresses that the DHCP server should
not assign to DHCP clients. In this example, we are
excluding the router address.
Step 4
ip dhcp pool
name
Example:
Router(config)#
ip dhcp pool dpool1
Router(config-dhcp)#
Creates a DHCP address pool on the router and
enters DHCP pool configuration mode. The
name
argument can be a string or an integer.
Step 5
network
network-number
[
mask
|
prefix-length
]
Example:
Router(config-dhcp)#
network 10.10.0.0
255.255.255.0
Router(config-dhcp)#
Defines subnet number (IP) address for the DHCP
address pool, optionally including the mask.
Step 6
import all
Example:
Router(config-dhcp)#
import all
Router(config-dhcp)#
Imports DHCP option parameters into the DHCP
portion of the router database.
Step 7
default-router
address
[
address2
...
address8
]
Example:
Router(config-dhcp)#
default-router
10.10.10.10
Router(config-dhcp)#
Specifies up to 8 default routers for a DHCP client.
Step 8
dns-server
address
[
address2
...
address8
]
Example:
Router(config-dhcp)#
dns-server 192.168.35.2
Router(config-dhcp)#
Specifies up to 8 DNS servers available to a DHCP
client.
Command
Purpose
Page 62 / 196
5-4
Cisco 850 Series and Cisco 870 Series Access Routers Software Configuration Guide
OL-5332-01
Chapter 5
Configuring a LAN with DHCP and VLANs
Configure DHCP
Configuration Example
The following configuration example shows a portion of the configuration file for the DCHP
configuration described in this chapter.
ip dhcp excluded-address 192.168.9.0
!
ip dhcp pool dpool1
import all
network 10.10.0.0 255.255.255.0
default-router 10.10.10.10
dns-server 192.168.35.2
domain-name cisco.com
!
ip domain name smallbiz.com
ip name-server 192.168.11.12
Verify Your DHCP Configuration
Use the following commands to view your DHCP configuration.
show ip dhcp import
—Displays the optional parameters imported into the DHCP server database.
show ip dhcp pool
—Displays information about the DHCP address pools.
show ip dhcp server statistics
—Displays the DHCP server statistics, such as the number of address
pools, bindings, and so forth.
Router#
show ip dhcp import
Address Pool Name: dpool1
Router#
show ip dhcp pool
Pool dpool1 :
Utilization mark (high/low)
: 100 / 0
Subnet size (first/next)
: 0 / 0
Total addresses
: 254
Leased addresses
: 0
Pending event
: none
1 subnet is currently in the pool :
Current index
IP address range
Leased addresses
10.10.0.1
10.10.0.1
- 10.10.0.254
0
Step 9
domain-name
domain
Example:
Router(config-dhcp)#
domain-name cisco.com
Router(config-dhcp)#
Specifies the domain name for a DHCP client.
Step 10
exit
Example:
Router(config-dhcp)#
exit
Router(config)#
Exits DHCP configuration mode, and enters global
configuration mode.
Command
Purpose
Page 63 / 196
5-5
Cisco 850 Series and Cisco 870 Series Access Routers Software Configuration Guide
OL-5332-01
Chapter 5
Configuring a LAN with DHCP and VLANs
Configure VLANs
Router#
show ip dhcp server statistics
Memory usage
15419
Address pools
1
Database agents
0
Automatic bindings
0
Manual bindings
0
Expired bindings
0
Malformed messages
0
Secure arp entries
0
Message
Received
BOOTREQUEST
0
DHCPDISCOVER
0
DHCPREQUEST
0
DHCPDECLINE
0
DHCPRELEASE
0
DHCPINFORM
0
Message
Sent
BOOTREPLY
0
DHCPOFFER
0
DHCPACK
0
DHCPNAK
0
Router#
Configure VLANs
Perform these steps to configure VLANs on your router, beginning in global configuration mode:
Command
Purpose
Step 1
vlan ?
Example:
Router#
config t
Router(config)#
vlan ?
WORD
ISL VLAN IDs 1-4094
accounting
VLAN accounting configuration
ifdescr
VLAN subinterface ifDescr
Router(config)#vlan
Enters VLAN configuration mode.
Step 2
ISL VLAN ID
Example:
Router(config)#vlan
2
Router(config-vlan)#
Adds VLANs, with identifiers ranging from
1- 4094.
For details about this command and additional
parameters that can be set, see the
Cisco IOS
Switching Services Command Reference
.
Step 3
exit
Example:
Router(config-vlan)#
exit
Router(config)#
Updates the VLAN database, propagates it throughout
the administrative domain, and returns to global
configuration mode.
Page 64 / 196
5-6
Cisco 850 Series and Cisco 870 Series Access Routers Software Configuration Guide
OL-5332-01
Chapter 5
Configuring a LAN with DHCP and VLANs
Configure VLANs
Assign a Switch Port to a VLAN
Perform these steps to assign a switch port to a VLAN, beginning in global configuration mode:
Command
Purpose
Step 1
interface
switch port id
Example:
Router(config)#
interface FastEthernet 2
Router(config-if)#
Specifies the switch port that you want to assign
to the VLAN.
Step 2
switchport
access vlan
vlan-id
Example:
Router(config-if)#
switchport access vlan 2
Router(config-if)#
Assigns a port to the VLAN.
Step 3
end
Example:
Router(config-if)#
end
Router#
Exits interface mode and returns to privileged
EXEC mode.
Verify Your VLAN Configuration
Use the following commands to view your VLAN configuration.
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.
Router#
vlan database
Router(vlan)#
show
VLAN ISL Id: 1
Name: default
Media Type: Ethernet
VLAN 802.10 Id: 100001
State: Operational
MTU: 1500
Translational Bridged VLAN: 1002
Translational Bridged VLAN: 1003
VLAN ISL Id: 2
Name: VLAN0002
Media Type: Ethernet
VLAN 802.10 Id: 100002
State: Operational
MTU: 1500
Page 65 / 196
5-7
Cisco 850 Series and Cisco 870 Series Access Routers Software Configuration Guide
OL-5332-01
Chapter 5
Configuring a LAN with DHCP and VLANs
Configure VLANs
VLAN ISL Id: 3
Name: red-vlan
Media Type: Ethernet
VLAN 802.10 Id: 100003
State: Operational
MTU: 1500
VLAN ISL Id: 1002
Name: fddi-default
Media Type: FDDI
VLAN 802.10 Id: 101002
State: Operational
MTU: 1500
Bridge Type: SRB
Translational Bridged VLAN: 1
Translational Bridged VLAN: 1003
VLAN ISL Id: 1003
Name: token-ring-default
Media Type: Token Ring
VLAN 802.10 Id: 101003
State: Operational
MTU: 1500
Bridge Type: SRB
Ring Number: 0
Bridge Number: 1
Parent VLAN: 1005
Maximum ARE Hop Count: 7
Maximum STE Hop Count: 7
Backup CRF Mode: Disabled
Translational Bridged VLAN: 1
Translational Bridged VLAN: 1002
VLAN ISL Id: 1004
Name: fddinet-default
Media Type: FDDI Net
VLAN 802.10 Id: 101004
State: Operational
MTU: 1500
Bridge Type: SRB
Bridge Number: 1
STP Type: IBM
VLAN ISL Id: 1005
Name: trnet-default
Media Type: Token Ring Net
VLAN 802.10 Id: 101005
State: Operational
MTU: 1500
Bridge Type: SRB
Bridge Number: 1
STP Type: IBM
Router#
show vlan-switch
VLAN Name
Status
Ports
---- -------------------------------- --------- -------------------------------
1
default
active
Fa0, Fa1, Fa3
2
VLAN0002
active
Fa2
1002 fddi-default
active
1003 token-ring-default
active
1004 fddinet-default
active
1005 trnet-default
active

Rate

4.5 / 5 based on 2 votes.

Bookmark Our Site

Press Ctrl + D to add this site to your favorites!

Share
Top