DHCP non-relay configuration experiment [detailed code]

topology

insert image description here
Topology description:
Configuring DHCP is mainly to configure the router as a DHCP server, but why is there a switch in the topology?
Because in a strict networking, the switch is at the access layer, of course, the switch is connected to the terminal device.

configuration

DHCP server configuration

Configure the interface IP address

int g/0/0/0
ip add 192.168.0.254 24

Enable DHCP

dhcp enable
network 192.168.0.0 mask 24
gateway-list 192.168.0.254

interface call

int g/0/0/0
dhcp select global

detection

command line detection

ping 192.168.0.254
insert image description here

view multicast

Check whether the source IP is assigned an IP address in the PC1 multicast window.
insert image description here
Leave a message if you have any questions! ! !

Guess you like

Origin blog.csdn.net/qq_48330132/article/details/128328414