单臂路由和DHCP综合应用

本文档详细介绍了如何配置交换机SWA和路由器R1以实现VLAN划分和DHCP服务。交换机SWA设置了两个VLAN,并将接口分配给相应VLAN。路由器R1配置了两个子接口,分别对应VLAN10和VLAN20,为每个VLAN分配了IP地址并启用DHCP服务,提供DNS服务器地址和网络范围。
摘要由CSDN通过智能技术生成

 

交换机SWA配置:

Switch>ena

Switch#conf t

Switch(config)#host SWA

SWA(config)#vlan 10

SWA(config-vlan)#vlan 20

SWA(config-vlan)#int f0/1

SWA(config-if)#sw acc vlan 10

SWA(config-if)#int f0/2

SWA(config-if)#sw acc vlan 20

SWA(config-if)#int g0/1

SWA(config-if)#sw mo tr

SWA(config-if)#end

SWA#wr

路由器R1配置:

Router>ena

Router#conf t

Router(config)#host R1

R1(config)#int g0/0

R1(config-if)#no sh

R1(config-if)#int g0/0.10

R1(config-subif)#encapsulation dot1Q 10

R1(config-subif)#ip add 192.168.10.254 255.255.255.0

R1(config-subif)#int g0/0.20

R1(config-subif)#encapsulation dot1Q 20

R1(config-subif)#ip add 192.168.20.254 255.255.255.0

R1(config-subif)#exi

R1(config)#ser

R1(config)#service dhcp

R1(config)#ip dhcp pool vlan10

R1(dhcp-config)#network 192.168.10.0 255.255.255.0

R1(dhcp-config)#default-router 192.168.10.254

R1(dhcp-config)#dns-server 8.8.8.8

R1(dhcp-config)#ip dhcp pool vlan20

R1(dhcp-config)#network 192.168.20.0 255.255.255.0

R1(dhcp-config)#default-router 192.168.20.254

R1(dhcp-config)#dns-server 8.8.8.8

R1(dhcp-config)#end

R1#wr

验证:

 

 

评论 1
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

北方的流星

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

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

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

打赏作者

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

抵扣说明:

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

余额充值