17 DHCP 配置
DHCP 静态地址分配 <H3C>system-view [H3C]sysname r1 [r1]interface gigabitethernet 0/0 [r1-GigabitEthernet0/0]ip address 192.168.10.1 24 [r1-GigabitEthernet0/0]quit [r1]dhcp enable [r1]dhcp server ip-pool caiwu [r1-dhcp-pool-caiwu]gateway-list 192.168.10.1 [r1-dhcp-pool-caiwu]network 192.168.10.0 mask255.255.255.0 [r1-dhcp-pool-caiwu]dns-list 114.114.114.114 8.8.8.8 [r1-dhcp-pool-caiwu]expired day 0 hour 12 minute 0 second0 [r1-dhcp-pool-caiwu]forbidden-ip 192.168.10.1192.168.10.100 [r1-dhcp-pool-caiwu]static-bind ip-address 192.168.10.100hardware-address 001e-9098-a9bf [r1-dhcp-pool-caiwu]quit [r1]interface gigabitethernet 0/0 [r1-GigabitEthernet0/0]dhcp select server [r1]interface gigabitethernet 0/2 [r1-GigabitEthernet0/2]ip address 192.168.20.1 24 [r1-GigabitEthernet0/2]dhcp select server [r1-GigabitEthernet0/2]quit [r1]dhcp server ip-pool shichang [r1-dhcp-pool-shichang]gateway-list 192.168.20.1 [r1-dhcp-pool-shichang]network 192.168.20.0 mask255.255.255.0 [r1-dhcp-pool-shichang]dns-list 114.114.114.114 8.8.8.8 [r1-dhcp-pool-shichang]expired day 0 hour 12 minute 0 [r1-dhcp-pool-shichang]forbidden-ip 192.168.20.1 [r1-dhcp-pool-shichang]forbidden-ip-range 192.168.20.200192.168.20.254 [r1-dhcp-pool-shichang]static-bind ip-address192.168.20.100 hardware-address 1234-7654-9876 [r1-dhcp-pool-shichang]quit
R1 <H3C>system-view [H3C]sysname r1 [r1]interface gigabitethernet 0/0 [r1-GigabitEthernet0/0]ip address 172.16.12.1 24 [r1-GigabitEthernet0/0]dhcp select server [r1-GigabitEthernet0/0]quit [r1]dhcp enable [r1]dhcp server ip-pool dhcpserver [r1-dhcp-pool-dhcpserver]gateway-list 192.168.10.1 [r1-dhcp-pool-dhcpserver]network 192.168.10.0 mask255.255.255.0 [r1-dhcp-pool-dhcpserver]dns-list 114.114.114.114 8.8.8.8 [r1-dhcp-pool-dhcpserver]expired day 2 hour 2 minute 2second 2 [r1-dhcp-pool-dhcpserver]forbidden-ip 192.168.10.1192.168.10.100 [r1-dhcp-pool-dhcpserver]forbidden-ip-range192.168.10.200 192.168.10.254 [r1-dhcp-pool-dhcpserver]static-bind ip-address192.168.10.100 hardware-address 1212-3344-4552 [r1-dhcp-pool-dhcpserver]quit [r1]dhcp server ip-pool dhcpserver2 [r1-dhcp-pool-dhcpserver2]gateway-list 192.168.11.1 [r1-dhcp-pool-dhcpserver2]network 192.168.11.0 mask255.255.255.0 [r1-dhcp-pool-dhcpserver2]dns-list 114.114.114.1148.8.8.8 [r1-dhcp-pool-dhcpserver2]expired day 2 hour 2 minute 2second 2 [r1-dhcp-pool-dhcpserver2]forbidden-ip 192.168.11.1 192.168.11.100 [r1-dhcp-pool-dhcpserver2]static-bind ip-address192.168.11.100 hardware 3344-5544-3344 [r1-dhcp-pool-dhcpserver2]quit [r1]ip route-static 192.168.10.0 255.255.255.0172.16.12.2 [r1]ip route-static 192.168.11.0 255.255.255.0172.16.12.2
R2 <H3C>system-view [H3C]sysname r2 [r2]interface gigabitethernet 0/0 [r2-GigabitEthernet0/0]ip address 172.16.12.2 24 [r2-GigabitEthernet0/0]interface gigabitethernet 0/1 [r2-GigabitEthernet0/1]ip address 192.168.10.1 24 [r2-GigabitEthernet0/1]dhcp select relay [r2-GigabitEthernet0/1]dhcp relay server 172.16.12.1 [r2-GigabitEthernet0/1]quit [r2]interface gigabitethernet 0/2 [r2-GigabitEthernet0/2]ip address 192.168.11.1 24 [r2-GigabitEthernet0/2]dhcp select relay [r2-GigabitEthernet0/2]dhcp relay server 172.16.12.1 [r2-GigabitEthernet0/2]quit [r2]dhcp enable |