SoFunction
Updated on 2025-04-12

3550 Configuring DHCP Relay Agent Project Example

3550 Configuring DHCP Relay Agent Project Example
There are many discussions on the network, but most of them have errors and omissions. After following the configuration of "IP HELPER-ADDRESS DHCP server address" introduced online, the project found that the client could not obtain the IP address from the DHCP server. I recently happened to configure 3550 as the DHCP server relay agent. I was confused for a long time at first. Later, I searched for information online and sought help from everyone on the forum. Finally, I passed the test in the project. In order to avoid everyone from encountering such situations in the project, I wrote down the configuration process for everyone as a reference.

Network environment: a 3550EMI switch, divided into three vlans and vlan2, which are 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, domain server is Windows 2000 advance server, and it also serves as a DHCP server and DNS server, IP address is 192.168.2.10, vlan3 is the network where the client 1 is located, IP address segment is 192.168.3.0, subnet mask: 255.255.255.0, gateway: 192.168.3.1 is named work01, vlan4 It is the network where client 2 is located, named work02, the IP address segment is 192.168.4.0, the subnet mask: 255.255.255.0, and the gateway: 192.168.4.1.
3550 is divided into VLAN 2, ports 9-16 are divided into VLAN 3, and ports 17-24 are divided into VLAN 4.

The configuration commands 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 Agent:
/*A key step, if the following two commands are missing, use "IP HELPER-ADDRESS DHCP Server Address" to specify the DHCP server in the VLAN, 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 the VLAN IP address:
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: Since the ports are not configured to VLAN2, 3, 4 at this time, each VLAN will DOWN. After the ports are allocated to each VLAN, the VLAN will rise*/

Step 4: Set the 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 ports to VLAN2, 3, 4
/*Add ports 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
/*DHCP server address is not required 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 routing is enabled, hosts between VLANs can access each other. If you need to further control access rights, it needs to be applied to the access control list*/
Switch(Config)Ip Routing

Step 8: End and save the configuration
Switch(Config-vlan)End
Switch#Copy Run Start
Article entry: aaadxmm     Editor in charge: aaadxmm