华为eNSP——DHCP中继实验

实验步骤

华为eNSP——DHCP中继实验_第1张图片

SW1

u t m
Info: Current terminal monitor is off.
system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname SW1
[SW1]v b 10 20
Info: This operation may take a few seconds. Please wait for a moment...done.
[SW1]int e0/0/1
[SW1-Ethernet0/0/1]p l a
[SW1-Ethernet0/0/1]p d v 10
[SW1-Ethernet0/0/1]un sh
Info: Interface Ethernet0/0/1 is not shutdown.
[SW1-Ethernet0/0/1]int e0/0/2
[SW1-Ethernet0/0/2]p l a
[SW1-Ethernet0/0/2]p d v 20
[SW1-Ethernet0/0/2]un sh
Info: Interface Ethernet0/0/2 is not shutdown.
[SW1-Ethernet0/0/2]int e0/0/3
[SW1-Ethernet0/0/3]p l a
[SW1-Ethernet0/0/3]p d v 10
[SW1-Ethernet0/0/3]un sh
Info: Interface Ethernet0/0/3 is not shutdown.
[SW1-Ethernet0/0/3]int e0/0/4
[SW1-Ethernet0/0/4]p l a
[SW1-Ethernet0/0/4]p d v 20
[SW1-Ethernet0/0/4]un sh
Info: Interface Ethernet0/0/4 is not shutdown.
[SW1-Ethernet0/0/4]int g0/0/1
[SW1-GigabitEthernet0/0/1]p l t
[SW1-GigabitEthernet0/0/1]p t a v 10 20
[SW1-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.

R1
u t m
Info: Current terminal monitor is off.    
system-view 
Enter system view, return user view with Ctrl+Z.    
[Huawei]sysname R1
[R1]int g0/0/1.10
[R1-GigabitEthernet0/0/1.10]ip add 192.168.10.1 24
[R1-GigabitEthernet0/0/1.10]un sh
Info: Interface GigabitEthernet0/0/1.10 is not shutdown.
[R1-GigabitEthernet0/0/1.10]d t v 10
[R1-GigabitEthernet0/0/1.10]a b e
[R1-GigabitEthernet0/0/1.10]dhcp select relay 
[R1-GigabitEthernet0/0/1.10]dhcp relay server-ip 14.0.0.2
[R1-GigabitEthernet0/0/1.10]q
[R1]int g0/0/1.20
[R1-GigabitEthernet0/0/1.20]ip add 192.168.20.1 24
[R1-GigabitEthernet0/0/1.20]un sh
Info: Interface GigabitEthernet0/0/1.20 is not shutdown.
[R1-GigabitEthernet0/0/1.20]d t v 20
[R1-GigabitEthernet0/0/1.20]a b e
[R1-GigabitEthernet0/0/1.20]dhcp select relay 
[R1-GigabitEthernet0/0/1.20]dhcp relay server-ip 14.0.0.2
[R1-GigabitEthernet0/0/1.20]q
[R1]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[R1]ip route-static 15.0.0.0 24 12.0.0.2
[R1]int g0/0/2
[R1-GigabitEthernet0/0/2]ip add 14.0.0.1 24
[R1-GigabitEthernet0/0/2]un sh
Info: Interface GigabitEthernet0/0/2 is not shutdown.
[R1-GigabitEthernet0/0/2]int g0/0/0
[R1-GigabitEthernet0/0/0]ip add 12.0.0.1 24
[R1-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R1-GigabitEthernet0/0/0]q


R2
u t m
Info: Current terminal monitor is off.    
system-view 
Enter system view, return user view with Ctrl+Z.    
[Huawei]sysname R2
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 12.0.0.2 24
[R2-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R2-GigabitEthernet0/0/0]q
[R2]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[R2]int g0/0/1
[R2-GigabitEthernet0/0/1]ip add 15.0.0.1 24
[R2-GigabitEthernet0/0/1]un sh
Info: Interface GigabitEthernet0/0/1 is not shutdown.
[R2-GigabitEthernet0/0/1]dhcp select  relay 
[R2-GigabitEthernet0/0/1]dhcp relay server-ip 14.0.0.2
[R2-GigabitEthernet0/0/1]q
[R2]ip route-static 0.0.0.0 0.0.0.0 12.0.0.1


R3
u t m
Info: Current terminal monitor is off.
system-view 
Enter system view, return user view with Ctrl+Z.
[Huawei]sysname R3    
[R3]dhcp enable 
Info: The operation may take a few seconds. Please wait for a moment.done.
[R3]int g0/0/0
[R3-GigabitEthernet0/0/0]ip add 14.0.0.2 24
[R3-GigabitEthernet0/0/0]un sh
Info: Interface GigabitEthernet0/0/0 is not shutdown.
[R3-GigabitEthernet0/0/0]dhcp select global 
[R3-GigabitEthernet0/0/0]q
[R3]ip pool DHCP15
Info: It's successful to create an IP address pool.
[R3-ip-pool-DHCP15]network 15.0.0.0 mask 25    
[R3-ip-pool-DHCP15]gateway-list 15.0.0.1
[R3-ip-pool-DHCP15]dns-list 8.8.8.8 2.2.2.2
[R3-ip-pool-DHCP15]q
[R3]ip pool DHCPvlan10
Info: It's successful to create an IP address pool.    
[R3-ip-pool-DHCPvlan10]network 192.168.10.0 mask 24    
[R3-ip-pool-DHCPvlan10]gateway-list 192.168.10.1
[R3-ip-pool-DHCPvlan10]dns-list 8.8.8.8 2.2.2.2
[R3-ip-pool-DHCPvlan10]q
[R3]ip pool DHCPvlan20
Info: It's successful to create an IP address pool.
[R3-ip-pool-DHCPvlan20]network 192.168.20.0 mask 24
[R3-ip-pool-DHCPvlan20]gateway-list 192.168.20.1
[R3-ip-pool-DHCPvlan20]dns-list 8.8.8.8 2.2.2.2
[R3-ip-pool-DHCPvlan20]q    
[R3]ip route-static 0.0.0.0 0.0.0.0 14.0.0.1
[R3-ip-pool-DHCP15]static-bind ip-address 15.0.0.88 mac-address 
5489-98A5-08F4
Error:The static-MAC is exist in this IP-pool.
[R3-ip-pool-DHCP15]static-bind ip-address 15.0.0.88 mac-address 5489-98A5-08F4
[R3-ip-pool-DHCP15]

每一台PC都需要在基础配置里选择DHCP,来自动获取IP地址,上面出错是需要将PC5的IP地址先释放出来,再重新获取,就可以配置自己想要的IP地址靓号了,例如:15.0.0.88
PC获取IP地址命令:ipconfig  /renew;释放IP地址命令:ipconfig  /renew

华为eNSP——DHCP中继实验_第2张图片

华为eNSP——DHCP中继实验_第3张图片

华为eNSP——DHCP中继实验_第4张图片

华为eNSP——DHCP中继实验_第5张图片

总结:

PC机之间全部互通

你可能感兴趣的:(DHCP中继实验)