为了给出一些上下文,下面是我的设置:
----(10.0.0.1 - S0/0/0) R1 (S0/1/0 - 10.0.1.1)----
| |
| |
| |
(10.0.0.2 - S0/0/0) (10.0.1.2 - S0/0/0)
R3 R2
(172.16.0.1 - FE0/0)
|
|
|
S1
|
|
(172.16.0.2)
PC1如果我尝试从PC1切换到R3,那么它可以很好地传递172.16.0.1和10.0.0.2;但是如果我尝试从PC1切换10.0.0.1,它就不能工作。
以下是一些吐露:
R3接口:
interface FastEthernet0/0
ip address 172.16.0.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/0/0
ip address 10.0.0.2 255.255.255.0
!
ip forward-protocol nd
no ip http server
no ip http secure-serverR3路线:
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is 10.0.0.1 to network 0.0.0.0
S* 0.0.0.0/0 [1/0] via 10.0.0.1
10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 10.0.0.0/24 is directly connected, Serial0/0/0
L 10.0.0.2/32 is directly connected, Serial0/0/0
172.16.0.0/16 is variably subnetted, 2 subnets, 2 masks
C 172.16.0.0/24 is directly connected, FastEthernet0/0
L 172.16.0.1/32 is directly connected, FastEthernet0/0R1接口:
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial0/0/0
ip address 10.0.0.1 255.255.255.0
!
interface Serial0/1/0
ip address 10.0.1.1 255.255.255.0
!R1路线:
Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route, H - NHRP, l - LISP
+ - replicated route, % - next hop override
Gateway of last resort is not set
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.0.0.0/24 is directly connected, Serial0/0/0
L 10.0.0.1/32 is directly connected, Serial0/0/0
C 10.0.1.0/24 is directly connected, Serial0/1/0
L 10.0.1.1/32 is directly connected, Serial0/1/0发布于 2017-10-23 12:49:40
注意,R1没有通往PC1的路由。路由器通过三种方式学习路由:
由于R1没有连接到172.16.0.0/24网络,所以有两个选项:在R1中创建静态路由,或者在R3和R1之间运行路由协议,以宣传从R3到R1的路由。
在R1中静态配置的路由如下所示:
ip route 172.16.0.0 255.255.255.0 10.0.0.2发布于 2017-10-23 12:49:04
从R1's路由表中,我可以看到R1没有到172.16.0.0网络的路由。换句话说,R1不知道如何将数据包转发到PC1。您需要添加一个路由到R1's表,要么使用静态路由,要么配置路由协议。
https://networkengineering.stackexchange.com/questions/45178
复制相似问题