DHCP简单拓扑图演示

DHCP ip自动分配

  • 作图思路
    • LSW1配置
    • R1配置
      • R2配置
        • PC机测试

DHCP简单拓扑图演示_第1张图片

作图思路

DHCP简单拓扑图演示_第2张图片

LSW1配置

undo terminal monitor
sys
[Huawei]sys LS1
[LS1]user-interface console 0
[LS1-ui-console0]idle-timeout 0 0
[LS1-ui-console0]q
[LS1]v b 10 20
[LS1]int e0/0/1
[LS1-Ethernet0/0/1]p l a
[LS1-Ethernet0/0/1]p d v 10
[LS1-Ethernet0/0/1]un sh
[LS1-Ethernet0/0/1]int e0/0/2
[LS1-Ethernet0/0/2]p l a
[LS1-Ethernet0/0/2]p d v 20
[LS1-Ethernet0/0/2]un sh
[LS1-Ethernet0/0/2]int e0/0/3
[LS1-Ethernet0/0/3]p l a
[LS1-Ethernet0/0/3]p d v 10
[LS1-Ethernet0/0/3]un sh
[LS1-Ethernet0/0/3]int e0/0/4
[LS1-Ethernet0/0/4]p l a
[LS1-Ethernet0/0/4]p d v 20
[LS1-Ethernet0/0/4]un sh
[LS1-Ethernet0/0/4]q
[LS1]int g0/0/1
[LS1-GigabitEthernet0/0/1]p l t
[LS1-GigabitEthernet0/0/1]p t a v a
[LS1-GigabitEthernet0/0/1]un sh

R1配置

undo terminal monitor
sys
[Huawei]sys R1
[R1]user-interface console 0
[R1-ui-console0]idle-timeout 0 0
[R1-ui-console0]q
[R1]dhcp enable
[R1]int g0/0/1.10
[R1-GigabitEthernet0/0/1.10]dot1q termination vid 10
[R1-GigabitEthernet0/0/1.10]ip add 192.168.10.1 24
[R1-GigabitEthernet0/0/1.10]arp broadcast enable
[R1-GigabitEthernet0/0/1.10]dhcp select interface
[R1-GigabitEthernet0/0/1.10]dhcp server dns-list 2.2.2.2 8.8.8.8
[R1-GigabitEthernet0/0/1.10]un sh
[R1-GigabitEthernet0/0/1.10]int g0/0/1.20
[R1-GigabitEthernet0/0/1.20]dot1q termination vid 20
[R1-GigabitEthernet0/0/1.20]ip add 192.168.20.1 24
[R1-GigabitEthernet0/0/1.20]arp broadcast enable
[R1-GigabitEthernet0/0/1.20]dhcp select interface
[R1-GigabitEthernet0/0/1.20]dhcp server dns-list 2.2.2.2 8.8.8.8
[R1-GigabitEthernet0/0/1.20]un sh
[R1-GigabitEthernet0/0/1.20]q
[R1]ip route-static 15.0.0.0 24 12.0.0.2
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 12.0.0.1 24
[R1-GigabitEthernet0/0/0]un sh

R2配置

undo terminal monitor
sys
[Huawei]sys R2
[R2]user-interface console 0
[R2-ui-console0]idle-timeout 0 0
[R2-ui-console0]q
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.0.0.2 24
[R2-GigabitEthernet0/0/0]un sh
[R2]dhcp enable
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]dhcp select globa
[R2-GigabitEthernet0/0/1]ip pool DHCP15
[R2-ip-pool-DHCP15]network 15.0.0.0 mask 24
[R2-ip-pool-DHCP15]gateway-list 15.0.0.1
[R2-ip-pool-DHCP15]dns-list 8.8.8.8 2.2.2.2
[R2-ip-pool-DHCP15]q
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 15.0.0.1 24
[R2-GigabitEthernet0/0/1]un sh
[R2-GigabitEthernet0/0/1]q
[R2]ip route-static 192.168.10.0 24 12.0.0.1
[R2]ip route-static 192.168.20.0 24 12.0.0.1

PC机测试

DHCP简单拓扑图演示_第3张图片
命令行 > ping ipconfig /renew 获取ip
Ping ipconfg /release 释放ip

全网通即为OK

################################

喜欢的话点个赞吧

你可能感兴趣的:(DHCP)