16.静态路由rip路由vlan练习

题目:实现全网通信

image-20230724173536255

vlan区域配置

image-20230725113425587

  • 给设备配置ip

pc端默认网关192.168.1.254(很重要)

image-20230724201235731

LSW1

		//LSW1:e0/0/2
vlan batch 10 30 20
interface e0/0/2
port link-type hybrid
port hybrid pvid vlan 10
port hybrid untagged vlan 30 10	
		//LSW1:e0/0/3
interface e0/0/3
port link-type hybrid
port hybrid pvid vlan 20
port hybrid untagged vlan 30 20
		//LSW1:e0/0/1
interface e0/0/1
port link-type hybrid
port hybrid tagged vlan 30 20 10
display vlan

image-20230724202352272

LSW4

		//LSW4:e0/0/2
vlan batch 10 30 20
interface e0/0/2
port link-type hybrid
port hybrid pvid vlan 20
port hybrid untagged vlan 30 20	
		//LSW4:e0/0/1
interface e0/0/1
port link-type hybrid
port hybrid pvid vlan 10
port hybrid untagged vlan 30 10
		//LSW1:e0/0/3
interface e0/0/3
port link-type hybrid
port hybrid tagged vlan 30 20 10
display vlan

image-20230724202550616

LSW3

		//LSW3:g0/0/2
vlan batch 10 30 20
interface g0/0/2
port link-type hybrid
port hybrid pvid vlan 30
port hybrid untagged vlan 30 10	20
		//LSW1:g0/0/3
interface g0/0/3
port link-type hybrid
port hybrid tagged vlan 30 20 10
		//LSW1:g0/0/4
interface g0/0/4
port link-type hybrid
port hybrid tagged vlan 30 20 10
		//LSW1:g0/0/1
interface g0/0/1
port link-type hybrid
port hybrid untagged vlan 30 20 10
display vlan

image-20230724202934398

检验vlan配置

image-20230724203133651

image-20230724203158084

image-20230724203218879

image-20230724203248119

路由配置

R6

interface g0/0/1
ip address 192.168.1.254 24
q
interface g3/0/0
ip address 24.1.1.2 24
q
interface g0/0/0
ip address 23.1.1.2 24
q
ip route-static 16.1.1.0 24 23.1.1.1
ip route-static 17.3.3.0 24 23.1.1.1
ip route-static 18.4.4.0 24 23.1.1.1 
ip route-static 19.2.2.0 24 23.1.1.1
ip route-static 10.2.1.0 24 23.1.1.1 
ip route-static 10.3.1.0 24 23.1.1.1 
ip route-static 25.6.6.0 24 23.1.1.1 
ip route-static 26.1.1.0 24 23.1.1.1 
ip route-static 16.1.1.0 24 24.1.1.1
ip route-static 17.3.3.0 24 24.1.1.1
ip route-static 18.4.4.0 24 24.1.1.1 
ip route-static 19.2.2.0 24 24.1.1.1
ip route-static 10.2.1.0 24 24.1.1.1 
ip route-static 10.3.1.0 24 24.1.1.1 
ip route-static 25.6.6.0 24 24.1.1.1 
ip route-static 26.1.1.0 24 24.1.1.1 
display ip routing-table

image-20230725114856442

image-20230725114916833

R5

interface g0/0/0
ip address 19.2.2.2 24
q
interface g0/0/1
ip address 18.4.4.3 24
q
interface g0/0/2
ip address 23.1.1.1 24
q
interface g4/0/0
ip address 24.1.1.1 24
q
ip route-static 10.2.1.0 24 19.2.2.1
ip route-static 10.3.1.0 24 19.2.2.1
ip route-static 16.1.1.0 24 19.2.2.1
ip route-static 17.3.3.0 24 18.4.4.2  
ip route-static 25.6.6.0 24 18.4.4.2 
ip route-static 26.1.1.0 24 18.4.4.2  
ip route-static 192.168.1.0 24 23.1.1.2
ip route-static 192.168.1.0 24 24.1.1.2
display ip routing-table

image-20230725115025685

R3

interface g0/0/1
ip address 18.4.4.2 24
q
interface g0/0/0
ip address 25.6.6.1 24
q
interface g0/0/2
ip address 17.3.3.4 24
q
rip
version 2
network 25.0.0.0
network 18.0.0.0
network 17.0.0.0
q
ip route-static 16.1.1.0 24 17.3.3.3  
ip route-static 10.2.1.0 24 17.3.3.3  
ip route-static 10.3.1.0 24 17.3.3.3 
ip route-static 19.2.2.0 24 18.4.4.3
ip route-static 23.1.1.0 24 18.4.4.3 
ip route-static 24.1.1.0 24 18.4.4.3 
ip route-static 192.168.1.0 24 18.4.4.3
display ip routing-table

image-20230725115106674

R8

interface g0/0/1
ip address 25.6.6.2 24
q
interface g0/0/0
ip address 26.1.1.1 24
q
rip
version 2
network 26.0.0.0
network 25.0.0.0
q
ip route-static 0.0.0.0 0 25.6.6.1
display ip routing-table

image-20230725115220839

R9

interface g0/0/0
ip address 26.1.1.2 24
q
rip
version 2
network 26.0.0.0
q
ip route-static 0.0.0.0 0 26.1.1.1
display ip routing-table

R2

interface g0/0/1
ip address 16.1.1.2 24
q
interface g0/0/0
ip address 19.2.2.1 24
q
ip route-static 10.2.1.0 24 16.1.1.1
ip route-static 10.3.1.0 24 16.1.1.1
ip route-static 17.3.3.0 24 19.2.2.2 
ip route-static 18.4.4.0 24 19.2.2.2  
ip route-static 23.1.1.0 24 19.2.2.2  
ip route-static 24.1.1.0 24 19.2.2.2  
ip route-static 25.6.6.0 24 19.2.2.2  
ip route-static 26.1.1.0 24 19.2.2.2  
ip route-static 192.168.1.0 24 19.2.2.2 
display ip routing-table

image-20230725115425120

R1

interface g0/0/0
ip address 10.2.1.2 24
q
interface g4/0/0
ip address 10.3.1.2 24
q
interface g0/0/1
ip address 16.1.1.1 24
q
interface g0/0/2
ip address 17.3.3.1 24
q
ip route-static 19.2.2.0 24 16.1.1.2
ip route-static 23.1.1.0 24 16.1.1.2 
ip route-static 24.1.1.0 24 16.1.1.2
ip route-static 25.6.6.0 24 16.1.1.2
ip route-static 26.1.1.0 24 16.1.1.2 
ip route-static 192.168.1.0 24 16.1.1.2 
ip route-static 25.6.6.0 24 17.3.3.4
ip route-static 26.1.1.0 24 17.3.3.4 
display ip routing-table

image-20230725115530132

R7

interface g0/0/0
ip address 10.2.1.1 24
q
interface g0/0/1
ip address 10.3.1.1 24
q
ip route-static 16.1.1.0 24 10.2.1.2 pre 100
ip route-static 17.3.3.0 24 10.2.1.2 pre 100
ip route-static 18.4.4.0 24 10.2.1.2 pre 100
ip route-static 19.2.2.0 24 10.2.1.2 pre 100
ip route-static 23.1.1.0 24 10.2.1.2 pre 100
ip route-static 24.1.1.0 24 10.2.1.2 pre 100
ip route-static 25.6.6.0 24 10.2.1.2 pre 100
ip route-static 26.1.1.0 24 10.2.1.2 pre 100
ip route-static 192.168.1.0 24 10.2.1.2 pre 100
ip route-static 16.1.1.0 24 10.3.1.2 
ip route-static 17.3.3.0 24 10.3.1.2 
ip route-static 18.4.4.0 24 10.3.1.2 
ip route-static 19.2.2.0 24 10.3.1.2
ip route-static 23.1.1.0 24 10.3.1.2 
ip route-static 24.1.1.0 24 10.3.1.2 
ip route-static 25.6.6.0 24 10.3.1.2 
ip route-static 26.1.1.0 24 10.3.1.2 
ip route-static 192.168.1.0 24 10.3.1.2 
display ip routing-table

image-20230725115613576

检验网络是否通畅

pc1 ->R9

image-20230725153554670

pc1 ->R7

image-20230725153640660

R7->pc3

image-20230725153726727

R9->pc4

image-20230725153811559

  • 1
    点赞
  • 1
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

打赏作者

§666§

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

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

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

打赏作者

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

抵扣说明:

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

余额充值