In Cisco 3550, dhcp configuration is often discussed on the network, but there are mostly errors and omissions. According to the configuration described on the internet, after "ip helper-address dhcp server ADDRESS, in the project, I found that the client could not obtain the IP address from the DHCP server. I recently configured 3550 as the DHCP server relay proxy, and I was confused for a long time, later, I searched for information on the Internet and asked everyone for help on the forum. I finally passed the test in the project. In order to avoid such problems in the project, I adjusted it to the right, write the configuration process for your reference.
Network Environment: A 3550EMI switch is divided into three VLANs. vlan2 is the network where the server is located, named server, IP address segment is 192.168.2.0, subnet mask: 255.255.255.0, Gateway: 192.168.2.1, the Domain server is a windows 2000 advance server and also serves as a DHCP server. The DNS server has the IP address 192.168.2.10, vlan3 is the network where client 1 is located, the IP address segment is 192.168.3.0, The subnet mask is 255.255.255.0, And the Gateway: 192.168.3.1 is named work01, vlan4 is the network of client 2, work02, IP address segment is 192.168.4.0, subnet mask: 255.255.255.0, Gateway: 192.168.4.1.
3550 Ports 1-8 are allocated to VLAN 2, ports 9-16 are divided into VLAN 3, and ports 17-24 are allocated to VLAN 4.
The configuration command and steps are as follows:
Step 1: Create a VLAN
Switch> Vlan Database
Switch (Vlan)> Vlan 2 Name server
Switch (Vlan)> Vlan 3 Name work01
Switch (vlan)> Vlan 4 Name work02
Step 2: enable DHCP relay proxy
/* In the key step, if the following two commands are missing, use "ip helper-address dhcp server ADDRESS" in the VLAN to specify the DHCP server, and the client still cannot obtain the ip address */
Switch> Enable
Switch # Config t
Switch (Config) Service Dhcp
Switch (Config) Ip Dhcp Relay Information Option
Step 3: Set vlan ip addresses
Switch (Config)> Int Vlan 2
Switch (Config-vlan) Ip Address 192.168.2.1 255.255.255.0
Switch (Config-vlan) No Shut
Switch (Config-vlan)> Int Vlan 3
Switch (Config-vlan) Ip Address 192.168.3.1 255.255.255.0
Switch (Config-vlan) No Shut
Switch (Config-vlan)> Int Vlan 4
Switch (Config-vlan) Ip Address 192.168.4.1
255.255.255.0
Switch (Config-vlan) No Shut
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 4: set global port Parameters
Switch (Config) Interface Range Fa 0/1-24
Switch (Config-if-range) Switchport Mode Access
Switch (Config-if-range) Spanning-tree Portfast
Step 5: add the port to VLAN2, 3, 4
/* Add Port 1-8 to VLAN 2 */
Switch (Config) Interface Range Fa 0/1-8
Switch (Config-if-range) Switchport Access Vlan 2
/* Add Port 9-16 to VLAN 3 */
Switch (Config) Interface Range Fa 0/9-16
Switch (Config-if-range) Switchport Access Vlan 3
/* Add Port 17-24 to VLAN 4 */
Switch (Config) Interface Range 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 */
Step 6: Set the DHCP server address in VLAN3 and 4
/* No DHCP server address must be specified in VLAN 2 */
Switch (Config) Int Vlan 3
Switch (Config-vlan) Ip Helper-address 192.168.2.10
Switch (Config) Int Vlan 4
Switch (Config-vlan) Ip Helper-address 192.168.2.10
Step 7: Enable Routing
/* After a route is enabled, the hosts in each VLAN can access each other. To further control the access permission, apply the access control list */
Switch (Config) Ip Routing
Step 8: end and save the configuration
Switch (Config-vlan) End
Switch # Copy Run Start
Thanks to all the people who have given me help, thanks to TERU, the access control list provided by wheat. If you still have any unclear welcome to contact me, my mailbox is: usr0012003@yahoo.com.cn