The Cisco3550EMI switch is used as an instance of the DHCP server project, and the cisco3550emidhcp
Configuration of Cisco3550EMI switch as an instance of DHCP server Engineering
Network Environment:
A 3550EMI switch is divided into three VLANs. vlan2 is the network where the server is located. It is named server, IP address segment is 192.168.2.0, subnet mask: 255.255.255.0, Gateway: 192.168.2.1, and Domain server is windows2000 advance server,
Also act as a DNS server. The IP address is 192.168.2.10, vlan3 is the network where client 1 is located, and 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 network of client 2,
Name work02, IP address segment 192.168.4.0, subnet mask: 255.255.255.0, Gateway: 192.168.4.1,
3550 as a DHCP server, Ports 1-8 are allocated to VLAN 2, ports 9-16 are divided into VLAN 3, and ports 17-24 are divided into VLAN 4.
DHCP server implementation functions:
Each VLAN retains 2-10 IP addresses regardless of configuration. For example, the IP address range of 192.168.2.0 is retained from 192.168.2.2 to 192.168.2.10.
The IP address segment of is not allocated.
Security requirements:
VLAN 3 and VLAN 4 are not allowed to access each other, but both can access the VLAN 2 where the server is located. The default access control list rule is to reject all packets.
The configuration command and steps are as follows:
Step 1: Create a VLAN:
Switch> en
Switch # VlanDatabase
Switch (Vlan)> Vlan2 Name server
Switch (Vlan)> Vlan3 Name work01
Switch (vlan)> Vlan 4 Name work02
Step 2: 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: Because the ports are not configured to VLAN2, 3, 4 at this time, each VLAN will be DOWN. After the ports are allocated to each VLAN, the VLAN will get up */
Step 3: Set port global Parameters
Switch (Config) InterfaceRange Fa 0/1-24
Switch (Config-if-range) SwitchportMode Access
Switch (Config-if-range) Spanning-treePortfast
Step 4: add the port to 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 */
Configure 3550 as the DHCP server
/* Configure available address pools and corresponding parameters for VLAN 2. You need to set several address pools for several VLANs */
Switch (Config) IpDhcp Pool Test01
/* Set the allocable subnet */
Switch (Config-pool) Network192.168.2.0 255.255.255.0
/* Set the 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 used by 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 used by 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
Step 6: Set DHCP to retain unassigned addresses
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
Step 7: Enable Routing
/* After a route is enabled, each VLAN host can access each other */
Switch (Config) IpRouting
Step 8: configure the access control list
Switch (Config) access-list103 permit ip 192.168.2.0 0.0.255 192.168.3.0 0.0.255
Switch (Config) access-list 103 permit ip 192.168.3.0 0.0.255 192.168.2.00.0.0.255
Switch (Config) access-list 103 permit udp any eq bootpc
Switch (Config) access-list 103 permit udp 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.255 192.168.4.00.0.0.255
Switch (Config) access-list 104 permit ip 192.168.4.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
Step 9: Application access control list
& N bsp;/* apply the access control list to VLAN3 and VLAN 4. VLAN 2 is not required */
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
Step 10: end and save the configuration
Switch (Config-vlan) End
Switch # Copy Run Start
The above test and pass