使用静态路由使得全网可达及浮动静态路由

拓扑图如下

要求:全网可达

 进行基础的IP配置

以R1为例:

[r1]interface g0/0/0
[r1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
May 30 2023 14:37:56-08:00 r1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP 
on the interface GigabitEthernet0/0/0 has entered the UP state. 
[r1]interface g0/0/1
[r1-GigabitEthernet0/0/1]ip address 192.168.2.1 24
May 30 2023 14:38:14-08:00 r1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP 
on the interface GigabitEthernet0/0/1 has entered the UP state. 
[r1]interface g0/0/2
[r1-GigabitEthernet0/0/2]ip address 192.168.3.1 24
May 30 2023 14:38:35-08:00 r1 %%01IFNET/4/LINK_STATE(l)[2]:The line protocol IP 
on the interface GigabitEthernet0/0/2 has entered the UP state. 

分别在每个路由上写静态并且注意优先级,以R1为例

[r1]ip route-static 192.168.4.0 24 192.168.2.2 preference 61
[r1]ip route-static 192.168.4.0 24 192.168.3.2
[r1]ip route-static 192.168.6.0 24 192.168.2.2 preference 61
[r1]ip route-static 192.168.6.0 24 192.168.3.2 

再查看路由表

 

 

结果略

 

 

 

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

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

抵扣说明:

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

余额充值