首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >在这种情况下,我如何使它走浮动路线而不是主要静态路线?

在这种情况下,我如何使它走浮动路线而不是主要静态路线?
EN

Network Engineering用户
提问于 2022-08-21 02:49:02
回答 1查看 55关注 0票数 0

在这个拓扑中,我已经用这样的方式配置了设备:

R1:

代码语言:javascript
复制
Building configuration...

Current configuration : 916 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2811/K9 sn FTX1017U862-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 192.168.1.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 10.1.1.1 255.255.255.252
 duplex auto
 speed auto
 shutdown
!
interface FastEthernet1/0
 ip address 10.1.1.5 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet1/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
ip classless
ip route 172.16.3.0 255.255.255.0 10.1.1.2 
ip route 172.16.3.0 255.255.255.0 10.1.1.6 5
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
 logging synchronous
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

R2:

代码语言:javascript
复制
Building configuration...

Current configuration : 714 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R2
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2811/K9 sn FTX101723IN-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 10.1.1.2 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 10.1.1.9 255.255.255.252
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
ip classless
ip route 172.16.3.0 255.255.255.0 10.1.1.10 
ip route 192.168.1.0 255.255.255.0 10.1.1.1 
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

R3:

代码语言:javascript
复制
Building configuration...

Current configuration : 715 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R3
!
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2811/K9 sn FTX1017BW6O-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 10.1.1.6 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 10.1.1.13 255.255.255.252
 duplex auto
 speed auto
!
interface Vlan1
 no ip address
 shutdown
!
ip classless
ip route 172.16.3.0 255.255.255.0 10.1.1.14 
ip route 192.168.1.0 255.255.255.0 10.1.1.5 
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

R4:

代码语言:javascript
复制
Building configuration...

Current configuration : 889 bytes
!
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R4
!
!
!
!
!
!
!
!
no ip cef
no ipv6 cef
!
!
!
!
license udi pid CISCO2811/K9 sn FTX1017OPU6-
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 172.16.3.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 10.1.1.10 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet1/0
 ip address 10.1.1.14 255.255.255.252
 duplex auto
 speed auto
!
interface FastEthernet1/1
 no ip address
 duplex auto
 speed auto
 shutdown
!
interface Vlan1
 no ip address
 shutdown
!
ip classless
ip route 192.168.1.0 255.255.255.0 10.1.1.9 
ip route 192.168.1.0 255.255.255.0 10.1.1.13 5
!
ip flow-export version 9
!
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

当我从PC1切换到PC2时,从PC1到PC2的路径如下:

但是返回,从PC2到PC1的方式如下:(导致数据包被丢弃)

问题:

如何使返回路由,即从PC2到PC1的返回路由如下所示,即,虽然通过上静态路由的路径是活动的,但它经过较低的浮动静态路由?

数据包跟踪器文件如下:https://www.mediafire.com/file/3dvgy683vestflg/Static_Routes.pkt/file

EN

回答 1

Network Engineering用户

发布于 2022-08-22 05:08:14

R4以错误的方式将其发送到R2,因此您需要获得路由器4将其发送到R3,这是您需要修复的R4中的两行

代码语言:javascript
复制
ip route 192.168.1.0 255.255.255.0 10.1.1.9 
ip route 192.168.1.0 255.255.255.0 10.1.1.13 5

使R3的度量具有更高的优先级,更低的度量--我倾向于在所有相关的路由上使用度量,所以很明显,我考虑了它--将上面的行替换为

代码语言:javascript
复制
ip route 192.168.1.0 255.255.255.0 10.1.1.9 10
ip route 192.168.1.0 255.255.255.0 10.1.1.13 5
票数 2
EN
页面原文内容由Network Engineering提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

https://networkengineering.stackexchange.com/questions/79730

复制
相关文章

相似问题

领券
问题归档专栏文章快讯文章归档关键词归档开发者手册归档开发者手册 Section 归档