![SNR S2940-8G-v2 Configuration Manual Download Page 225](http://html1.mh-extra.com/html/snr/s2940-8g-v2/s2940-8g-v2_configuration-manual_1310630225.webp)
SNR S2940-8G-v2 Switch Configuration Guide
DHCP Configuration
Switch(config)#ip dhcp pool A1
Switch(dhcp-A1-config)#host 10.16.1.210
Switch(dhcp-A1-config)#hardware-address 00-03-22-23-dc-ab
Switch(dhcp-A1-config)#exit
Usage Guide:
When a DHCP/BOOTP client is connected to a VLAN1 port of the switch,
the client can only get its address from 10.16.1.0/24 instead of 10.16.2.0/24. This is because the
broadcast packet from the client will be requesting the IP address in the same segment of the VLAN
interface after VLAN interface forwarding, and the VLAN interface IP address is 10.16.1.2/24,
therefore the IP address assigned to the client will belong to 10.16.1.0/24.
If the DHCP/BOOTP client wants to have an address in 10.16.2.0/24, the gateway forwarding
broadcast packets of the client must belong to 10.16.2.0/24. The connectivity between the client
gateway and the switch must be ensured for the client to get an IP address from the 10.16.2.0/24
address pool.
Scenario 2:
DHCP Server
10.1.1.10
DHCP Relay
E1/0/2
10.1.1.1
E1/0/1
192.168.1.1
DHCP Client
DHCP Client
DHCP Client
Figure 34.3: DHCP Relay Configuration
As shown in the above figure, route switch is configured as a DHCP relay. The DHCP server
address is 10.1.1.10, the configuration steps is as follows:
Switch(config)#service dhcp
Switch(config)#interface vlan 1
Switch(Config-if-Vlan1)#ip address 192.168.1.1 255.255.255.0
Switch(Config-if-Vlan1)#exit
Switch(config)#vlan 2
Switch(Config-Vlan-2)#exit
Switch(config)#interface Ethernet 1/0/2
Switch(Config-Erthernet1/0/2)#switchport access vlan 2
Switch(Config-Erthernet1/0/2)#exit
Switch(config)#interface vlan 2
Switch(Config-if-Vlan2)#ip address 10.1.1.1 255.255.255.0
Switch(Config-if-Vlan2)#exit
Switch(config)#ip forward-protocol udp bootps
Switch(config)#interface vlan 1
Switch(Config-if-Vlan1)#ip help-address 10.1.1.10
Switch(Config-if-Vlan1)#exit
225
Summary of Contents for S2940-8G-v2
Page 11: ...SNR S2940 8G v2 Switch Configuration Guide Part I Basic Management Configuration 11...
Page 46: ...SNR S2940 8G v2 Switch Configuration Guide Part II Port Configuration 46...
Page 123: ...SNR S2940 8G v2 Switch Configuration Guide Part III VLAN and MAC Table Configuration 123...
Page 164: ...SNR S2940 8G v2 Switch Configuration Guide Part IV MSTP Configuration 164...
Page 198: ...SNR S2940 8G v2 Switch Configuration Guide Part VI L3 Forward and ARP Configuration 198...
Page 218: ...SNR S2940 8G v2 Switch Configuration Guide Part VII DHCP Configuration 218...
Page 257: ...SNR S2940 8G v2 Switch Configuration Guide Part VIII Multicast Protocol 257...
Page 278: ...SNR S2940 8G v2 Switch Configuration Guide Part IX Security Function Configuration 278...
Page 376: ...SNR S2940 8G v2 Switch Configuration Guide Part X Reliability Configuration 376...
Page 395: ...SNR S2940 8G v2 Switch Configuration Guide Part XI Flow Monitor Configuration 395...
Page 403: ...SNR S2940 8G v2 Switch Configuration Guide Part XII Network Time Management Configuration 403...
Page 411: ...SNR S2940 8G v2 Switch Configuration Guide Part XIII Debugging and Diagnosis 411...