DHCP中继配置详解

这篇博客展示了如何配置华为设备,包括设置VLAN、RIP路由协议以及DHCP服务。在LSW1交换机上创建了VLAN10和20,并配置接口接入VLAN。R3路由器配置了两个接口的IP地址,启用RIP版本2并通告网络,同时配置了DHCP中继代理。R2和R1路由器同样进行了RIP配置和DHCP服务的开启。
摘要由CSDN通过智能技术生成

今天的学习成果,巩固一下。

 

LSW1
<Huawei>sy	
[Huawei]vlan batch 10 20
[Huawei]int gig0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access 
[Huawei-GigabitEthernet0/0/1]port default vlan 10
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int gig 0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access 
[Huawei-GigabitEthernet0/0/2]port default vlan 10	
[Huawei-GigabitEthernet0/0/2]int gig 0/0/3
[Huawei]int gig 0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access 
[Huawei-GigabitEthernet0/0/3]port default vlan 10
[Huawei-GigabitEthernet0/0/3]q
[Huawei]int gig 0/0/4
[Huawei-GigabitEthernet0/0/4]port link-type access
[Huawei-GigabitEthernet0/0/4]port default vlan 20
[Huawei-GigabitEthernet0/0/4]q
[Huawei]int gig 0/0/5
[Huawei-GigabitEthernet0/0/5]port link-type access
[Huawei-GigabitEthernet0/0/5]port default vlan 20
[Huawei-GigabitEthernet0/0/5]q
[Huawei]int gig 0/0/6
[Huawei-GigabitEthernet0/0/6]port link-type access
[Huawei-GigabitEthernet0/0/6]port default vlan 20
[Huawei-GigabitEthernet0/0/6]q
[Huawei]int gig 0/0/7
[Huawei-GigabitEthernet0/0/7]port link-type trunk 	
[Huawei-GigabitEthernet0/0/7]port trunk allow-pass vlan all
R3
<Huawei>sy
[Huawei]int gig0/0/0	
[Huawei-GigabitEthernet0/0/0]ip address 1.0.0.2 24
[Huawei-GigabitEthernet0/0/0]int gig0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 2.0.0.1 24
[Huawei-GigabitEthernet0/0/1]q
[Huawei]rip 1
[Huawei-rip-1]version 2
[Huawei-rip-1]network 1.0.0.0	
[Huawei-rip-1]network 2.0.0.0
[Huawei-rip-1]q
[Huawei]dhcp enable
[Huawei]int gig0/0/0.10
[Huawei-GigabitEthernet0/0/0.10]ip address 1.1.10.1 24
[Huawei-GigabitEthernet0/0/0.10]dot1q termination vid 10	
[Huawei-GigabitEthernet0/0/0.10]arp broadcast enable 
[Huawei-GigabitEthernet0/0/0.10]dhcp select relay
[Huawei-GigabitEthernet0/0/0.10]dhcp relay server-ip 3.0.0.2
[Huawei-GigabitEthernet0/0/0.10]int gig0/0/0.20
[Huawei-GigabitEthernet0/0/0.20]dot1q termination vid 20	
[Huawei-GigabitEthernet0/0/0.20]ip address 1.1.20.1 24
[Huawei-GigabitEthernet0/0/0.20]arp broadcast enable 
[Huawei-GigabitEthernet0/0/0.20]dhcp select relay 	
[Huawei-GigabitEthernet0/0/0.20]dhcp relay server-ip 3.0.0.2
R2
<Huawei>sy
[Huawei]int gig0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 2.0.0.2 24
[Huawei-GigabitEthernet0/0/0]int gig0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 3.0.0.1 24
[Huawei-GigabitEthernet0/0/1]q
[Huawei]rip 1
[Huawei-rip-1]version 2
[Huawei-rip-1]network 2.0.0.0	
[Huawei-rip-1]network 3.0.0.0
[Huawei]dhcp enable 
[Huawei]int gig0/0/0	
[Huawei-GigabitEthernet0/0/0]dhcp select relay 
[Huawei-GigabitEthernet0/0/0]dhcp relay server-ip 3.0.0.2
R1
<Huawei>sy
[Huawei]int gig0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 3.0.0.2 24
[Huawei-GigabitEthernet0/0/0]q
[Huawei]rip 1	
[Huawei-rip-1]version 2	
[Huawei-rip-1]network 3.0.0.0
[Huawei-rip-1]q	
[Huawei]dhcp enable 	
[Huawei]interface gig0/0/0	
[Huawei-GigabitEthernet0/0/0]dhcp select global 
[Huawei-GigabitEthernet0/0/0]q
[Huawei]ip pool vlan10	
[Huawei-ip-pool-vlan10]network 1.1.10.1 mask 24	
[Huawei-ip-pool-vlan10]gateway-list 1.1.10.1	
[Huawei-ip-pool-vlan10]dns-list 8.8.8.8
[Huawei-ip-pool-vlan10]q
[Huawei]ip pool vlan20
[Huawei-ip-pool-vlan20]network 1.1.20.1 mask 24
[Huawei-ip-pool-vlan20]gateway-list 1.1.20.1
[Huawei-ip-pool-vlan20]dns-list 8.8.8.8

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

乌拉乌拉尔

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值