cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
955
Views
0
Helpful
8
Replies

Routers Can Ping Each other, Hosts cant ping across routers

tas241
Level 1
Level 1

Hello,

I have 3 routers connected directly like so 3--2--1. Using OSPF, all routers see each other's networks, and can ping the interfaces, but the hosts connected to each router cannot ping across the routers. 

R1#sh run
Building configuration...

Current configuration : 3731 bytes
!
! Last configuration change at 22:39:02 UTC Thu May 25 2023
!
version 15.9
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
enable secret 9 $9$DSWhK3/gOymsQz$QTN9r.CS8Z1zHKwwbR4D5o8oGJlNoMjDmXsDp5Oz7MU
!
no aaa new-model
!
!
!
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
no ip icmp rate-limit unreachable
!
!
!
ip dhcp excluded-address 192.168.1.1
ip dhcp excluded-address 192.168.1.2
!
ip dhcp pool Windows
network 192.168.1.0 255.255.255.192
domain-name R1
dns-server 192.168.1.1
default-router 192.168.1.1
!
!
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
redundancy
!
no cdp log mismatch duplex
!
ip tcp synwait-time 5
!
!
!
!
interface Loopback0
ip address 1.1.1.1 255.255.255.0
!
interface GigabitEthernet0/0
ip address 192.168.1.118 255.255.255.252
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/1
ip address 192.168.1.1 255.255.255.192
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/2
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/3
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
router ospf 10
network 192.168.1.0 0.0.0.63 area 0
network 192.168.1.116 0.0.0.3 area 0
!
ip default-gateway 192.168.1.1
ip forward-protocol nd
!
!
no ip http server
!
ipv6 ioam timestamp
!
!
!
control-plane

R2#sh run
Building configuration...

Current configuration : 3539 bytes
!
! Last configuration change at 22:14:28 UTC Thu May 25 2023
!
version 15.9
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
enable secret 9 $9$glB7Oe.bP4bg1T$/eELWzGSJfo1hGMgMzV7YkM304.Qg74zPFtcLi8g3Z2
!
no aaa new-model
!
!
!
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
no ip icmp rate-limit unreachable
!
!
!
!
!
!
no ip domain lookup
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
redundancy
!
no cdp log mismatch duplex
!
ip tcp synwait-time 5
!
!
!
!
interface GigabitEthernet0/0
ip address 192.168.1.117 255.255.255.252
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/1
ip address 192.168.1.114 255.255.255.252
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/2
no ip address
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/3
ip address 192.168.1.97 255.255.255.240
duplex auto
speed auto
media-type rj45
!
router ospf 10
network 192.168.1.96 0.0.0.15 area 0
network 192.168.1.112 0.0.0.3 area 0
network 192.168.1.116 0.0.0.3 area 0
!
ip default-gateway 192.168.1.97
ip forward-protocol nd
!
!
no ip http server
!
ipv6 ioam timestamp
!
!
!
control-plane

R3(config)#do sh run
Building configuration...

Current configuration : 3652 bytes
!
! Last configuration change at 22:24:54 UTC Thu May 25 2023
!
version 15.9
service timestamps debug datetime msec
service timestamps log datetime msec
service password-encryption
!
hostname R3
!
boot-start-marker
boot-end-marker
!
!
enable secret 9 $9$dgcmTVynV1vFYz$Iw74hEvPykrwn34J8Rm5vegz7JQaLUpr4nsNJoWlppE
!
no aaa new-model
!
!
!
mmi polling-interval 60
no mmi auto-configure
no mmi pvc
mmi snmp-timeout 180
!
!
!
!
!
no ip icmp rate-limit unreachable
!
!
!
!
ip dhcp pool R3 LAN
network 192.168.1.64 255.255.255.224
domain-name R3
dns-server 192.168.1.65
default-router 192.168.1.65
!
ip dhcp pool excluded-address 192.168.1.65
!
!
!
ip cef
no ipv6 cef
!
multilink bundle-name authenticated
!
!
!
redundancy
!
no cdp log mismatch duplex
!
ip tcp synwait-time 5
!
!
!
!
interface GigabitEthernet0/0
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/1
ip address 192.168.1.113 255.255.255.252
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/2
ip address 192.168.1.65 255.255.255.224
duplex auto
speed auto
media-type rj45
!
interface GigabitEthernet0/3
no ip address
shutdown
duplex auto
speed auto
media-type rj45
!
router ospf 10
network 192.168.1.64 0.0.0.31 area 0
network 192.168.1.112 0.0.0.3 area 0
!
ip default-gateway 192.168.1.65
ip forward-protocol nd
!
!
no ip http server
!
ipv6 ioam timestamp
!
!
!
control-plane

Thanks in advance,

My proposed topology is as follows

NameNetwork AddressSlash
R1192.168.1.0/26
R3192.168.1.64/27
R2192.168.1.96/28
2-3 Link192.168.1.116/30
1-2 Link192.168.1.112

/30

 

8 Replies 8

check the IP and subnet you use between router, 
to make sure draw your topology and add IP and subnet to draw
there is something not clear in subnet and subnet mask 
if you connect Router to each other you must see same subnet in each router (subnet of interface interconnect the router)

Hi

 The configuration seems fairly right. I would double check the PCs and make sure they got the IP addeess properly.

 From the router, you can also use extended ping to test the packet leaving the LAN interface.

Type ping and emder

It will ask the protocol, just confirm the IP

It will ask the target, put the IP of one remote PC or routers lan interface

Press enter útil It ask if you want extend ping. Put Y

Then it will as from which interface.  You fill out with rhe router lan interface

Keep pressing emter. 

At the enter the router will try to ping the destination usimg the lan IP, which siimulates one PC pinging each other.

 This way, if the problem were the PC, you will figure out.

BTW, unless you're using an old IOS, some additional ping options are available as command line options.  Often a tad less tedious then going through all of extended ping option prompts.

Johnnyconc
Level 1
Level 1

Hello,
I would start by drawing a topology as this can serve to have a much better visualization.
Your subnet seems to be the same for all devices so, I am thinking like the rest of the guys that it may be something with the PC. I suggest checking the ip and mask on the pc.

Joseph W. Doherty
Hall of Fame
Hall of Fame

Although a couple of things caught my notice glancing at your configs, like @Flavio Miranda , nothing jumped out as being "wrong".  I too suggest checking what your host IP settings are.

You can check whether all 3 routers have all 5 networks in their route tables.

You can check whether PCs can ping their gateway router's p2p IP.

From each edge router, you can check whether it can ping all other routers' interface IPs on non directly connected networks.

BTW, the other things I noticed. . .

Why are you using a default-gateway on routers?

Do you realize OSPF network statements do not advertise the network and mask in that statement?

Martin L
VIP
VIP

Can Host ping its directly connected router (aka default gateway)? Or do trace route to other host? Check IP settings on end hosts looking at default gateway and network/mask matches default gateway settings.  Check interface connections/links.

If this is CML lab, problem may be your Linux end host and its settings.  Check interface connections/links as those linux boxes come with 2 ports each.  Alternatively you could use another router as end host. To turn your rotuer into end-host use no ip routing and add ip default-gateway x.x.x commands.

Regards, ML
**Please Rate All Helpful Responses **

As others have noted I do not see any obvious issues in the posted configurations (other than the fact that ip default gateway command is ignored when ip routing is enabled - and that is more a cosmetic issue and does not impact operation of the routers). As a starting point in troubleshooting would you post the output of show ip route from each of the routers? Also would you post the output of show arp from each of the routers?

It is not clear what you are pinging.

- When you ping from a router are you pinging other router interfaces?

- From a router are you able to ping connected devices on other routers?

- From a device connected to R1 are you able to ping the Lan interface of R2 And what is the IP address of the connected device?

- From that device connected to R1 are you able to ping the Lan interface of R2?

- From that device connected to R1 are you able to ping a device connected to R2? What is the IP address of the device connected to R2?

HTH

Rick

". . . (other than the fact that ip default gateway command is ignored when ip routing is enabled - and that is more a cosmetic issue and does not impact operation of the routers)."

BTW, Rick is 100% correct, which is one reason I asked question I did, to OP, "Why are you using a default-gateway on routers?"  The other reason I asked, just wanted to insure it's purpose isn't confused with the default-network statement, which isn't just cosmetic on routers.  (Also BTW, rather than using a default-network, more likely one would use a static "default route" statement. [info])

Oh, and since I'm explaining a bit further about why I asked the two questions I asked, regarding OSPF network statements, all your routers would obtain the same results if you had just one OSPF network statement on them like:

network 192.168.1.0 0.0.0.127 area 0
or
network 192.168.1.0 0.0.0.255 area 0
or
network 0.0.0.0 255.255.255.255 area 0

or even these three OSPF statements

network 192.168.1.0 0.0.0.127 area 0
network 192.168.1.0 0.0.0.255 area 1
network 0.0.0.0 255.255.255.255 area 2

Again, same results, on your routers, but why the results would be the same requires understanding of the OSPF network statement.  Also BTW, behavior of these examples might provide very different results based on the interface IPs on the routers.

PS: (edit) addendum

Oh, if you want to match specific interfaces, e.g. for:

interface GigabitEthernet0/0
ip address 192.168.1.117 255.255.255.252

interface GigabitEthernet0/1
ip address 192.168.1.114 255.255.255.252

interface GigabitEthernet0/3
ip address 192.168.1.97 255.255.255.240

Rather than:

network 192.168.1.96 0.0.0.15 area 0
network 192.168.1.112 0.0.0.3 area 0
network 192.168.1.116 0.0.0.3 area 0

I suggest considering:

network 192.168.1.97 0.0.0.0 area 0
network 192.168.1.114 0.0.0.0 area 0
network 192.168.1.117 0.0.0.0 area 0

or (if supported on platform) rather than using OSPF network statements, consider:

interface GigabitEthernet0/0
ip address 192.168.1.117 255.255.255.252
ip ospf 10 area 0

interface GigabitEthernet0/1
ip address 192.168.1.114 255.255.255.252
ip ospf 10 area 0

interface GigabitEthernet0/3
ip address 192.168.1.97 255.255.255.240
ip ospf 10 area 0

And in either case, for your p2p interfaces, you might consider:

interface GigabitEthernet0/0
ip address 192.168.1.117 255.255.255.252
ip ospf network point-to-point

interface GigabitEthernet0/1
ip address 192.168.1.114 255.255.255.252
ip ospf network point-to-point

NB: If you add the above, ports on both sides of the link should use the same OSPF network type command.

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community:

Review Cisco Networking products for a $25 gift card