[small Business] DHCP services with different vlan configurations
Purpose: to obtain the IP address automatically by using DHCP service through pc * * SW1** to establish vlan10,vlan20 Vlan30 (command: [SW1] vlan batch 10 20 30) and add port G0UniUniG2G0OnOn0G0UniUniG4 to vlan10 20 30 and configure virtual gateway: int vlan10 IP add 192.168.10.254 255.255.255.0int vlan 20 ip add 192.168.20.254 255.255.255.0int vlan30 IP add 192.168.30.254 255.255.255.0 enter the vlan1 configuration IP address int vlan1 IP add 10. 10.10.2 255.255.255.0**R1**:G 0Unigamer 0 configure IP "10.10.10.1 255.255.255.0" configure static route: ip route-static 192.168.10.0 255.255.255.0 10.10.10.2ip route-static 192.168.20.0 255.255.255.0 10.10.10.2ip route-static 192.168.30.0 255.255.255.0 10.10 .10.2 then enable DHCP service for R1: [R1] dhcp enable enable data preservation (to prevent timely recovery after device failure repair): [R1] dhcp server database enable then configure address pool: ip pool 10gateway-list 192.168.10.254 (destination network gateway) network 192.168.10.0 mask 255.255.255.0 (network segment configuration) lease day 7 hour 0 minute 0 (configure lease period) Accurate to minutes) dns-list 8.8.8.8 (configure DNS address) excluded-ip-address 192.168.10.200 192.168.10.253 (this address is not assigned in 2001253) and then enter G 0 int 0 int g 0 dhcp select global (global mode on) SW1: [SW1] dhcp enableint vlan 10: dhcp select relaydhcp relay server-ip 10.10.10.1 (enable DHCP relay) int vlan 20: Dhcp select relaydhcp relay server-ip 10.10.10.1 int vlan 30: dhcp select relaydhcp relay server-ip 10.10.10.1
Success