神州路由器DHCP中继服务配置

配置如下

R1配置:

Router#conf

Router_config#hostname R1

R1_config#int g0/1

R1_config_g0/1#ip add 192.168.10.1 255.255.255.252

R1_config_g0/1#no sh

R1_config_g0/1#int g0/0

R1_config_g0/0#no sh

R1_config_g0/0#int g0/0.10

R1_config_g0/0.10#encapsulation dot1Q 10

R1_config_g0/0.10#ip add 172.16.10.1 255.255.255.0

R1_config_g0/0.10#no sh

R1_config_g0/0.10#int g0/0.20

R1_config_g0/0.20#encapsulation dot1Q 20

R1_config_g0/0.20#ip add 172.16.20.1 255.255.255.0

R1_config_g0/0.20#no sh

R1_config_g0/0.20#exit

R1_config#router ospf 1

R1_config_ospf_1#network 192.168.10.0 255.255.255.252 area 0

R1_config_ospf_1#network 172.16.10.0 255.255.255.0 area 0  

R1_config_ospf_1#network 172.16.20.0 255.255.255.0 area 0

R1_config_ospf_1#exit

R1_config#ip forward-protocol udp bootps

R1_config#int g0/0.10

R1_config_g0/0.10#ip helper-address 192.168.10.2

R1_config_g0/0.10#int g0/0.20                  

R1_config_g0/0.20#ip helper-address 192.168.10.2

R1_config_g0/0.20#end

R1#wr

R2配置:

Router#conf

Router_config#hostname R2

R2_config#int g0/1

R2_config_g0/1#ip add 192.168.10.2 255.255.255.252

R2_config_g0/1#no sh

R2_config_g0/1#exit

R2_config#router ospf 1

R2_config_ospf_1#network 192.168.10.0 255.255.255.252 area 0

R2_config_ospf_1#exit

R2_config#ip dhcpd enable

R2_config#ip dhcpd pool 10

R2_config_dhcp#network 172.16.10.0 255.255.255.0

R2_config_dhcp#default-router 172.16.10.1

R2_config_dhcp#range 172.16.10.2 172.16.10.254

R2_config_dhcp#dns 8.8.8.8

R2_config_dhcp#lease 8 0 0

R2_config_dhcp#exit

R2_config#ip dhcpd pool 20  

R2_config_dhcp#network 172.16.20.0 255.255.255.0

R2_config_dhcp#default-router 172.16.20.1

R2_config_dhcp#range 172.16.20.2 172.16.20.254

R2_config_dhcp#dns 8.8.8.8

R2_config_dhcp#lease 8 0 0

R2_config_dhcp#end

R2#wr

SWA配置:

DCWS-6028#conf

DCWS-6028(config)#hostname SWA

SWA(config)#vlan 10;20

SWA(config)#int e1/0/1

SWA(config-if-ethernet1/0/1)#sw acc vlan 10

SWA(config-if-ethernet1/0/1)#int e1/0/2

SWA(config-if-ethernet1/0/2)#sw acc vlan 20

SWA(config)#int e1/0/24

SWA(config-if-ethernet1/0/24)#sw mo tr

SWA(config-if-ethernet1/0/24)#end

SWA#wr

验证PC1PC2自动获取IP地址:

PC1获取的IP

PC2获取的IP

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

北方的流星

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

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

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

打赏作者

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

抵扣说明:

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

余额充值