单臂路由与三层交换机实例解析

目录

一.实验一拓扑图

1.实验步骤 

1.1配置pc1-pc4的IP地址、子网掩码及网关

1.2配置交换机与路由器的命令

1.3将相关命令配置好后ping看能否通信(以pc2为例)

二.实验二拓扑图

1.实验步骤

1.1按实验配置pc1-pc4及服务器的IP地址、子网掩码及网关

1.2配置交换机与路由器的命令

1.3将相关命令配置好后ping看能否通信(以pc2为例)


一.实验一拓扑图

1.实验步骤 

1.1配置pc1-pc4的IP地址、子网掩码及网关

1.2配置交换机与路由器的命令

sw2
vlan batch 10 20 30

int   e0/0/1
port link-type access(p l a)
port default vlan 10(p d v 10)

int    e0/0/2
port link-type access(p l a)
port default vlan 20(p d v 20)

int    e0/0/3
port link-type access(p l a)
port default vlan 30(p d v 30)
 
int     g0/0/1
port link-type trunk(p l t)
port trunk allow-pass vlan 2 to 4094(p t a v a)

sw1
vlan batch 10 20 30 100
 
int   g0/0/1
port link-type trunk(p l t)
port trunk allow-pass vlan 2 to 4094(p t a v a)

int g0/0/2
port link-type access(p l a)
port default vlan 100(p d v 100)

int  Vlanif10
ip address 192.168.1.254 24

int Vlanif20
ip address 192.168.2.254 24

int Vlanif30
ip address 192.168.3.254 24

int Vlanif100
ip address 192.168.4.1 24
ip route-static 192.168.5.0 24 192.168.4.2

ip route-static 172.16.1.0 24 10.1.11.1


R1    

int   g0/0/0
ip address 192.168.4.2 24

int   g0/0/1
ip address 192.168.5.254 24

ip route-static 0.0.0.0 0 192.168.4.1
 

1.3将相关命令配置好后ping看能否通信(以pc2为例)

二.实验二拓扑图

1.实验步骤

1.1按实验配置pc1-pc4及服务器的IP地址、子网掩码及网关

1.2配置交换机与路由器的命令

sw5

vlan 20

int e0/0/1
p l a
p d v 20
int e0/0/2
p l a
p d v 20
int g0/0/1
p l t
p t a v a

sw4

vlan 10
int e0/0/1
p l a
p d v 10
int e0/0/2
p l a
p d v 10
int g0/0/1
p l t
p t a v a

sw3

vlan batch 20 300

int g0/0/1
p l t
p t a v a
int g0/0/2
p l t
p t a v a
int vlanif 20
ip add 192.168.2.254 24
int vlanif 300
ip add 10.1.13.2 30
ip  route-static 192.168.1.0 24 10.1.13.1
ip route-static 172.16.1.0 24 10.1.13.1

sw2

vlan batch 10 200

int g0/0/2
p l t
p t a v a
int g0/0/1
p l t
p t a v a
int vlanif 10
ip add 192.168.1.254 24
int vlanif 200
ip add 10.1.12.2 30
ip route-static 192.168.2.0 24 10.1.12.1
ip route-static 172.16.1.0 24 10.1.12.1

sw1

vlan batch 100 200 300
int g0/0/1
p l a
p d v 100
int g0/0/2
p l t
p t a v a
int g0/0/3
p l t
p t a v a

int vlanif 100
ip add 10.1.11.2 30
int vlanif 200
ip add 10.1.12.1 30
int vlanif 300
ip add 10.1.13.1 30
ip route-static 192.168.1.0 24 10.1.12.2
ip route-static 192.168.2.0 24 10.1.13.2

R1    

int g0/0/0
ip add 10.1.11.1 30
int g0/0/1
ip add 172.16.1.254 24
ip route-static 0.0.0.0 0 10.1.11.2

1.3将相关命令配置好后ping看能否通信(以pc2为例)

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值