DHCP experiment (3)
DHCP experiment (3)
I. Experimental Topology
2. Experimental requirements
Use a router to simulate a DHCP server
Configure the dhcp server to assign addresses to the pc of vlan10 and vlan20
Vlan10 is 192.168.10.xbin24, Vlan20 is 192.168.20.x/24.
Third, experimental configuration
Configure the trunk and access of the switch, and divide the vlan
DHCPserver:
Ip pool vlan10 / / vlan10 address pool
Gateway-list 192.168.10.1
Network 192.168.10.0 mask 255.255.255.0
Dns-list 8.8.8.8
Ip pool vlan20 / / vlan20 address pool
Gateway-list 192.168.20.1
Network 192.168.20.0 mask 255.255.255.0
Dns-list 8.8.8.8
Interface GigabitEthernet0/0/0
Ip address 192.168.255.2 255.255.255.0
Dhcp select global
Core switch sw1:
Interface Vlanif10 / / enter the svi interface of vlan10
Ip address 192.168.10.1 255.255.255.0
Dhcp select relay / / dhcp Select relay
Dhcp relay server-ip 192.168.255.2 / configure a relay address that translates to a unicast address 192.168.255.2 when the interface receives a dhcp request
Interface Vlanif20
Ip address 192.168.20.1 255.255.255.0
Dhcp select relay
Dhcp relay server-ip 192.168.255.2
IV. Experimental verification