DHCPv4 relay scenario 1

In this scenario, DHCP relay on the server enables two hosts to obtain their IP addresses from a DHCP server on a different subnet. The physical topology of the network looks like this:

Procedure
  1. DHCP relay is enabled by default. If it was previously disabled, enable it.
    switch#configswitch(config)#dhcp-relay
  2. Define an IPv4 helper address on interfaces1/1/1and1/1/2.
    switch(config)#interface 1/1/1switch(config-if)#ip地址192.168.2.11/24switch(config-if)#ip helper-address 192.168.1.1switch(config-if)#interface 1/1/2switch(config-if)#ip地址192.168.2.12/24switch(config-if)#ip helper-address 192.168.1.1switch(config-if)#quit
  3. 验证DHCP中继配置。
    switch#show dhcp-relayDHCP Relay Agent : Enabled DHCP Request Hop Count Increment : Enabled L2VPN Clients : Disabled Option 82 : Disabled Source-Interface : Disabled Response Validation : Disabled Option 82 Handle Policy : replace Remote ID : mac DHCP Relay Statistics: Valid Requests Dropped Requests Valid Responses Dropped Responses -------------- ---------------- --------------- ----------------- 60 10 60 10 DHCP Relay Option 82 Statistics: Valid Requests Dropped Requests Valid Responses Dropped Responses -------------- ---------------- --------------- ----------------- 50 8 50 8
    switch#show ip helper-addressIP Helper Addresses Interface: 1/1/1 IP Helper Address VRF ----------------- ----------------- 192.168.1.1 default Interface: 1/1/2 IP Helper Address VRF ----------------- ----------------- 192.168.1.1 default