C3550 configured as DHCP Server Engineering Examples
network environment:
A 3550EMI switch, divided into three vlan,vlan2 for the server's network, named Server,ip address segment 192.168.2.0, Subnet mask: 255.255.255.0, Gateway: 192.168.2.1, The domain server is windows2000 advance server,
Concurrently as a DNS server, the IP address of 192.168.2.10,VLAN3 is the client 1 network, the IP address segment is 192.168.3.0,
Subnet Mask: 255.255.255.0, Gateway: 192.168.3.1 named Work01,vlan4 as the Client 2 network,
The Work02,ip address segment is named 192.168.4.0, subnet mask: 255.255.255.0, Gateway: 192.168.4.1,
3550 as a DHCP server, port 1-8 is zoned to VLAN 2, Port 9-16 is divided into VLAN 3, Port 17-24 is divided into VLAN 4.
DHCP Server implementation features:
Each VLAN retains 2-10 of the IP address is not configured, for example: 192.168.2.0 network segment, reserved 192.168.2.2 to 192.168.2.10
The IP address segment is not assigned.
Safety Requirements:
VLAN 3 and VLAN 4 do not allow mutual access, but both can access the VLAN 2 where the server resides, and the default Access control list rules are to deny all packages.
The configuration commands and steps are as follows:
First step: Create a VLAN:
switch>en
Switch#vlandatabase
Switch (Vlan) >vlan2 Name Server
Switch (Vlan) >vlan3 Name work01
Switch (VLAN) >vlan 4 Name work02
Step Two: Set the VLAN IP address:
Switch#config T
Switch (Config) >intvlan 2
Switch (Config-vlan) IpAddress 192.168.2.1 255.255.255.0
Switch (Config-vlan) Noshut
Switch (Config-vlan) >intvlan 3
Switch (Config-vlan) IpAddress 192.168.3.1 255.255.255.0
Switch (Config-vlan) Noshut
Switch (Config-vlan) >intvlan 4
Switch (Config-vlan) IpAddress 192.168.4.1 255.255.255.0
Switch (Config-vlan) Noshut
Switch (Config-vlan) Exit
/* Note: Since the port is not configured to vlan2,3,4 at this time, the VLAN will be down and the VLAN will rise after the port is allocated to each VLAN */
Step Three: Set the port global parameters
Switch (Config) interfacerange Fa 0/1-24
Switch (config-if-range) Switchportmode Access
Switch (config-if-range) spanning-treeportfast
Fourth Step: Add the port to the vlan2,3,4
/* Add port 1-8 to VLAN 2*/
Switch (Config) interfacerange Fa 0/1-8
Switch (config-if-range) switchportaccess Vlan 2
/* Add port 9-16 to VLAN 3*/
Switch (Config) interfacerange Fa 0/9-16
Switch (config-if-range) switchportaccess Vlan 3
/* Add port 17-24 to VLAN 4*/
Switch (Config) interfacerange Fa 0/17-24
Switch (config-if-range) Switchport Access Vlan 4
Switch (Config-if-range) Exit
/* After this step, each VLAN will get up */
Configuring 3550 as a DHCP server
/*vlan 2 available address pools and configuration of corresponding parameters, there are several VLANs to set several address pools */
Switch (Config) ipdhcp Pool Test01
/* Set up assignable subnets */
Switch (config-pool) Network192.168.2.0 255.255.255.0
/* Set up a DNS server */
Switch (config-pool) dns-server192.168.2.10
/* Set the gateway for this subnet */
Switch (config-pool) default-router192.168.2.1
/* Configure the address pool and corresponding parameters for the VLAN3 */
Switch (Config) ipdhcp Pool Test02
Switch (config-pool) Network192.168.3.0 255.255.255.0
Switch (config-pool) dns-server 192.168.2.10
Switch (Config-pool) default-router192.168.3.1
/* Configure the address pool and corresponding parameters for the VLAN4 */
Switch (Config) ipdhcp Pool Test03
Switch (config-pool) Network192.168.4.0 255.255.255.0
Switch (config-pool) dns-server192.168.2.10
Switch (config-pool) Default-router 192.168.4.1
Sixth step: Set DHCP reservation unassigned address
Switch (Config) ipdhcp excluded-address 192.168.2.2 192.168.2.10
Switch (Config) Ip Dhcp excluded-address 192.168.3.2 192.168.3.10
Switch (Config) Ip Dhcp excluded-address 192.168.4.2 192.168.4.10
Seventh Step: Enable routing
/* When routing is enabled, hosts in each VLAN can access each other */
Switch (Config) iprouting
Eighth Step: Configure access Control lists
Switch (Config) access-list103 permit IP 192.168.2.0 0.0.0.255 192.168.3.0 0.0.0.255
Switch (Config) access-list 103 permit IP 192.168.3.0 0.0.0.255 192.168.2.00.0.0.255
Switch (Config) access-list 103 permit UDP any any EQ BOOTPC
Switch (Config) access-list 103 permit UDP any any EQ tftp
Switch (Config) access-list 103 permit UDP any EQ bootpc any
Switch (Config) access-list 103 permit UDP any EQ tftp any
Switch (Config) access-list 104 permit IP 192.168.2.0 0.0.0.255 192.168.4.00.0.0.255
Switch (Config) access-list 104 permit IP 192.168.4.0 0.0.0.255 192.168.2.00.0.0.255
Switch (Config) access-list 104 permit UDP any EQ tftp any
Switch (Config) access-list 104 permit UDP any EQ bootpc any
Switch (Config) access-list 104 permit UDP any EQ bootpc any
Switch (Config) access-list 104 permit UDP any EQ tftp any
nineth Step: Apply access Control List
&n BSP; /* Apply the Access control list to VLAN3 and VLAN 4,vlan 2 do not need * /
Switch (Config) Int Vlan 3
Switch (config-vlan) IP Access-group 103 out
Switch (config-vlan) Int VLAN 4
Switch (config-vlan) IP access-group 104 out
Tenth step: End and save the configuration
Switch (Config-vlan) End
switch#copy Run Start
tested and approved
This article is from the "Learn Linux history" blog, please be sure to keep this source http://woyaoxuelinux.blog.51cto.com/5663865/1978998
CISCO3550 configuration as a DHCP server engineering instance