Topology
As the core device, s5700 configures DHCP and assigns an IP address to the office network.
S2700 as access device
S5700 Configuration
VLAN 100
Description bangong
Interface gigabitethernet0/0/1
Port Link-type trunk
Port trunk allow-pass VLAN 100
Interface vlanif100
IP address 192.168.10.254 255.255.255.0
S2700 Configuration
VLAN 100
Description bangong
Interface ethernet0/0/1
Port Link-type trunk
Port trunk allow-pass VLAN 100
Interface ethernet0/0/2
Port Link-type access
Port default, VLAN 100
Interface ethernet0/0/3
Port Link-type access
Port default, VLAN 100
Interface ethernet0/0/4
Port Link-type access
Port default, VLAN 100
Enable DHCP
DHCP enable
Configure the address pool and perform static binding. pC1 can only get 192.168.10.1 PC2 and can only get the remaining address of 192.168.10.2. No allocation is made to prevent external personnel from accessing.
IP pool bangong
Gateway-list 192.168.10.254
Network 192.168.10.0 mask 255.255.255.0
Static-bind IP-address 192.168.10.1 Mac-address 5489-98e7-7f28
Static-bind IP-address 192.168.10.2 Mac-address 5489-98d8-4d8c
Excluded-IP-address 192.168.10.3 192.168.10.253
DNS-list 8.8.8.8
Enable global DHCP under Virtual Interface
Interface vlanif100
IP address 192.168.10.254 255.255.255.0
DHCP Select Global
Verify the allocated address on the PC
PC1
PC2
We disconnect the PC2 network cable. If PC2 is not connected, verify that PC3 can obtain the IP address allocated to PC2 through DHCP.
Configuring DHCP for static binding on the core switch strictly limits Address Allocation