首页
学习
活动
专区
圈层
工具
发布
社区首页 >问答首页 >PC不能平路由器2跳(家庭实验室)

PC不能平路由器2跳(家庭实验室)
EN

Network Engineering用户
提问于 2017-10-23 12:44:10
回答 2查看 2K关注 0票数 2

为了给出一些上下文,下面是我的设置:

代码语言:javascript
复制
  ----(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接口:

代码语言:javascript
复制
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-server

R3路线:

代码语言:javascript
复制
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/0

R1接口:

代码语言:javascript
复制
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路线:

代码语言:javascript
复制
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
EN

回答 2

Network Engineering用户

回答已采纳

发布于 2017-10-23 12:49:40

注意,R1没有通往PC1的路由。路由器通过三种方式学习路由:

  1. 直接连接网络
  2. 静态配置路由
  3. 通过路由协议

由于R1没有连接到172.16.0.0/24网络,所以有两个选项:在R1中创建静态路由,或者在R3和R1之间运行路由协议,以宣传从R3到R1的路由。

在R1中静态配置的路由如下所示:

代码语言:javascript
复制
ip route 172.16.0.0 255.255.255.0 10.0.0.2
票数 5
EN

Network Engineering用户

发布于 2017-10-23 12:49:04

从R1's路由表中,我可以看到R1没有到172.16.0.0网络的路由。换句话说,R1不知道如何将数据包转发到PC1。您需要添加一个路由到R1's表,要么使用静态路由,要么配置路由协议。

票数 2
EN
页面原文内容由Network Engineering提供。腾讯云小微IT领域专用引擎提供翻译支持
原文链接:

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

复制
相关文章

相似问题

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