华为eNSP——DHCP中继实验

实验步骤

SW1

<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>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
<Huawei>u t m
Info: Current terminal monitor is off.    
<Huawei>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
<Huawei>u t m
Info: Current terminal monitor is off.    
<Huawei>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
<Huawei>u t m
Info: Current terminal monitor is off.
<Huawei>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

总结:

PC机之间全部互通

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值