首页
学习
活动
专区
圈层
工具
发布
首页
学习
活动
专区
圈层
工具
MCP广场
社区首页 >问答首页 >网络问题

网络问题
EN

Network Engineering用户
提问于 2015-05-25 08:57:23
回答 2查看 217关注 0票数 -1

我的关系网出了问题。我有一个路由器( R1 )连接到另一个路由器(R2),R1连接到交换机。R1交换机有两台PC与其相连。PC IP分别为128.107.35.10和192.31.7.10。默认网关为198.133.220.1。当我从R1 PC上点击时,请求超时。当我从R2个人电脑上点击时,我得到了无法到达的目标主机。我在两个路由器上都有OSPF和RIP v2。有人知道为什么会这样吗?

显示ip路由R1

代码语言:javascript
运行
复制
  10.0.0.0/8 is variably subnetted, 3 subnets, 2 masks

R       10.0.0.0/8 [120/1] via 198.133.219.1, 00:00:09, Serial0/0/0

O       10.255.1.0/30 [110/192] via 198.133.219.1, 00:19:49, Serial0/0/0

O       10.255.1.4/30 [110/128] via 198.133.219.1, 00:19:49, Serial0/0/0

     192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks
R       192.168.20.0/24 [120/1] via 198.133.219.1, 00:00:09, Serial0/0/0

O       192.168.20.0/30 [110/128] via 198.133.219.1, 00:19:49, Serial0/0/0

     192.168.21.0/30 is subnetted, 1 subnets
O       192.168.21.0 [110/256] via 198.133.219.1, 00:19:49, Serial0/0/0

     198.133.219.0/24 is variably subnetted, 2 subnets, 2 masks
C       198.133.219.0/30 is directly connected, Serial0/0/0

C       198.133.219.1/32 is directly connected, Serial0/0/0

     198.133.220.0/27 is subnetted, 1 subnets
C       198.133.220.0 is directly connected, FastEthernet0/1

为R2

显示IP路由

代码语言:javascript
运行
复制
     10.0.0.0/8 is variably subnetted, 5 subnets, 4 masks

C       10.10.10.64/27 is directly connected, FastEthernet0/1

R       10.10.10.96/28 [120/1] via 10.255.1.2, 00:00:20, Serial0/1/0

C       10.255.1.0/30 is directly connected, Serial0/1/0

C       10.255.1.4/30 is directly connected, Serial0/0/0

C       10.255.1.5/32 is directly connected, Serial0/0/0
     192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks
R       192.168.20.0/24 [120/1] via 10.255.1.5, 00:00:28, Serial0/0/0

O       192.168.20.0/30 [110/128] via 10.255.1.5, 00:28:51, Serial0/0/0
     192.168.21.0/30 is subnetted, 1 subnets
O       192.168.21.0 [110/128] via 10.255.1.2, 00:28:51, Serial0/1/0

     198.133.219.0/24 is variably subnetted, 2 subnets, 2 masks
R       198.133.219.0/24 [120/1] via 10.255.1.5, 00:00:28, Serial0/0/0

O       198.133.219.0/30 [110/128] via 10.255.1.5, 00:24:26, Serial0/0/0

     198.133.220.0/24 is variably subnetted, 2 subnets, 2 masks
R       198.133.220.0/24 [120/2] via 10.255.1.5, 00:00:28, Serial0/0/0

O IA    198.133.220.0/27 [110/129] via 10.255.1.5, 00:24:16, Serial0/0/0

R1

启动配置

代码语言:javascript
运行
复制
!
version 12.4

no service timestamps log datetime msec

no service timestamps debug datetime msec

no service password-encryption
!

hostname internet

!
!
!
enable secret 5 REMOVED

enable password REMOVED

!
!
!
!
!
!
no ip cef

no ipv6 cef

!
!
!
!
!
!
!
!
!
!
no ip domain-lookup

!
!
spanning-tree mode pvst

!
!
!
!
!
!
interface FastEthernet0/0

 no ip address

 duplex auto

 speed auto

 shutdown
!
interface FastEthernet0/1

 ip address 198.133.220.1 255.255.255.224

 duplex auto

 speed auto

!
interface Serial0/0/0

 ip address 198.133.219.2 255.255.255.252

 encapsulation ppp

!
interface Serial0/0/1

 no ip address

 clock rate 2000000

 shutdown

!
interface Serial0/1/0

 no ip address

 clock rate 2000000

 shutdown

!

interface Serial0/1/1

 no ip address

 clock rate 2000000

 shutdown

!
interface Vlan1
 no ip address
 shutdown
!
router ospf 1

 log-adjacency-changes

 network 198.133.219.0 0.0.0.3 area 0

 network 10.255.1.4 0.0.0.3 area 0

 network 10.255.1.0 0.0.0.3 area 0

 network 192.168.20.0 0.0.0.3 area 0

 network 192.168.21.0 0.0.0.3 area 0

 network 10.10.10.0 0.0.0.3 area 0

 network 10.255.0.0 0.0.0.3 area 0

 network 10.10.10.64 0.0.0.15 area 51

 network 10.10.10.96 0.0.0.15 area 51

 network 10.10.10.0 0.0.0.15 area 51

 network 198.133.220.0 0.0.0.15 area 51

!
router rip

 version 2

 network 10.0.0.0

 network 192.168.20.0

 network 192.168.21.0

 network 198.133.219.0

 network 198.133.220.0

!
ip classless

!
ip flow-export version 9

!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end

R2

启动配置

代码语言:javascript
运行
复制
!
version 12.4

no service timestamps log datetime msec

no service timestamps debug datetime msec

service password-encryption
!
hostname south
!
!
!
enable secret 5 REMOVED

enable password 7 REMOVED

!
!
ip dhcp excluded-address 10.10.10.65

!
ip dhcp pool South

 network 10.10.10.64 255.255.255.224

 default-router 10.10.10.65

ip dhcp pool LAN

 network 10.10.10.64 255.255.255.224

 default-router 10.10.10.65

!

!
!
no ip cef
no ipv6 cef
!
!
!
!
!
!
!
!
!
!
no ip domain-lookup

!
!
spanning-tree mode pvst

!
!
!
!
!
!
interface FastEthernet0/0

 no ip address

 duplex auto

 speed auto

 shutdown

!
interface FastEthernet0/1

 ip address 10.10.10.65 255.255.255.224

 duplex auto

 speed auto

!
interface Serial0/0/0

 ip address 10.255.1.6 255.255.255.252

 encapsulation ppp

 clock rate 128000

!
interface Serial0/0/1

 no ip address

 clock rate 2000000

 shutdown

!
interface Serial0/1/0

 ip address 10.255.1.1 255.255.255.252

 clock rate 128000

!
interface Serial0/1/1

 no ip address

 clock rate 2000000

!
interface Vlan1

 no ip address

 shutdown

!
router ospf 1

 log-adjacency-changes

 network 10.255.1.0 0.0.0.3 area 0

 network 198.133.219.0 0.0.0.3 area 0

 network 192.168.20.0 0.0.0.3 area 0

 network 10.255.1.4 0.0.0.3 area 0

 network 10.255.0.0 0.0.0.3 area 0

 network 10.10.10.0 0.0.0.15 area 51

 network 198.133.220.0 0.0.0.15 area 51

!
router rip

 version 2

 network 10.0.0.0

 network 192.168.20.0

 network 198.133.219.0

 network 198.133.220.0

!
ip classless

!
ip flow-export version 9

!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
!
!
end
EN

回答 2

Network Engineering用户

发布于 2015-05-28 07:11:12

这里的信息不多,但这是.

您不能让IP地址为128.107.33.10的PC和IP地址为192.31.7.10的PC使用198.133.220.1/27的默认网关。大多数操作系统会抱怨默认网关与PC不在同一网络中,但我对您的PC上的网络掩码一无所知。您有两个简单的选项(不更改R2上的配置或使用包含两台PC的大规模子网掩码):

备选案文1:

如果你一定要在电脑上保留相同的IP地址.您可以将FastEthernet 1接口上的主IP地址更改为与第一台PC位于同一网络中,并向FastEthernet 1中添加一个辅助IP地址,以匹配在第二台PC上定义的网络。然后,您需要将这些网络添加到RIP和/或OSPF中,以便将它们分发给R2 (如果两者都使用,则OSPF路由将显示出来,RIP路由将被忽略,但这仍然可以)。

备选案文2:

你把个人电脑改为198.133.220.2到198.133.220.14之间的网络掩码255.255.255.224。您还需要向RIP和/或OSPF添加一个网络语句来为198.133.220.0/27网络做广告。

您还最好更改连接在R1和R2之间的串行接口,使双方位于同一个子网中(尽管如此,神奇的PPP可能会使这一工作变得更好,但不推荐它,跟踪器看起来也会很奇怪)。我也不会运行两个路由协议,没有真正的理由,我会整理整件事情(它需要一个网络重新设计!),但我假设有很好的理由这样做。

-本

票数 1
EN

Network Engineering用户

发布于 2015-05-25 22:03:20

你的路由器上没有接口?它们应该出现在节目中运行或写入术语输出。在任何情况下,都需要在静态路由中启用路由协议或代码。这是一个路由问题。我没有看到在您的输出中配置了RIP。如果愿意,请配置RIPv2。文件在线。

试着添加

无自动汇总

再分配连接

http://www.cisco.com/c/en/us/td/docs/ios/12_2/ip/配置/指南/fipr_C/1 cfrip.html

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

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

复制
相关文章

相似问题

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