Skip to main content
2 of 3
Additional info

Can ping gateway, but can't reach a host on gateway's network. Can't ping the management IP of Switch.

My topology is:

Topology

I am logged in to R1. I can ping 10.0.0.2 on R2 and 198.51.100.1 on R2, but can't ping the management IP of sw3(198.51.100.2). What am I doing wrong?

R1#sh ip arp
Protocol  Address          Age (min)  Hardware Addr   Type   Interface
Internet  10.0.0.1                -   0cc1.8f5a.c102  ARPA   GigabitEthernet0/2
Internet  10.0.0.2               11   0cc1.8fc5.c701  ARPA   GigabitEthernet0/2
Internet  10.0.0.5                -   0cc1.8f5a.c101  ARPA   GigabitEthernet0/1
Internet  10.0.0.6               11   0cc1.8f0b.af00  ARPA   GigabitEthernet0/1
Internet  192.0.2.1               -   0cc1.8f5a.c100  ARPA   GigabitEthernet0/0
Internet  192.0.2.2              11   0cc1.8fe9.8001  ARPA   GigabitEthernet0/0
R1#sh ip route
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
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C        10.0.0.0/30 is directly connected, GigabitEthernet0/2
L        10.0.0.1/32 is directly connected, GigabitEthernet0/2
C        10.0.0.4/30 is directly connected, GigabitEthernet0/1
L        10.0.0.5/32 is directly connected, GigabitEthernet0/1
      192.0.2.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.0.2.0/24 is directly connected, GigabitEthernet0/0
L        192.0.2.1/32 is directly connected, GigabitEthernet0/0
S     198.51.100.0/24 [1/0] via 10.0.0.2
R1#ping 198.51.100.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 198.51.100.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 6/13/16 ms
R1#ping 198.51.100.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 198.51.100.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

Update: I can ping a host connected through sw2, but not sw2 itself

Well, i tried adding a Virtual PC through sw2 and assigning it an IP address of 198.51.100.5/24 with a gateway of 198.51.100.1. Turns out I can ping it from R1 and vice versa, but R1 still can't ping the management IP of sw2. Can we not ping the management IP of a switch from outside the subnet?

R1#ping 198.51.100.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 198.51.100.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 9/21/37 ms
R1#ping 198.51.100.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 198.51.100.2, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

Here are the running configs for each device:

R1:

R1#sh run | s net0/2
interface GigabitEthernet0/2
 description Connected to R2
 ip address 10.0.0.1 255.255.255.252
 duplex auto
 speed auto
 media-type rj45
R1#sh ip int br
Interface                  IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0         192.0.2.1       YES manual up                    up
GigabitEthernet0/1         10.0.0.5        YES manual up                    up
GigabitEthernet0/2         10.0.0.1        YES manual up                    up
GigabitEthernet0/3         unassigned      YES unset  administratively down down

R2:

R2#ping 198.51.100.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 198.51.100.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/16/23 ms
R2#sh run | s net0/0
interface GigabitEthernet0/0
 description Connected to sw2
 ip address 198.51.100.1 255.255.255.0
 duplex auto
 speed auto
 media-type rj45
R2#sh run | s net0/1
interface GigabitEthernet0/1
 description Connected to R1
 ip address 10.0.0.2 255.255.255.252
 duplex auto
 speed auto
 media-type rj45
R2#sh ip int br
Interface                  IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0         198.51.100.1    YES manual up                    up
GigabitEthernet0/1         10.0.0.2        YES manual up                    up
GigabitEthernet0/2         unassigned      YES unset  administratively down down
GigabitEthernet0/3         unassigned      YES unset  administratively down down
R2#sh ip route
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
       a - application route
       + - replicated route, % - next hop override, p - overrides from PfR

Gateway of last resort is not set

      10.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C        10.0.0.0/30 is directly connected, GigabitEthernet0/1
L        10.0.0.2/32 is directly connected, GigabitEthernet0/1
      198.51.100.0/24 is variably subnetted, 2 subnets, 2 masks
C        198.51.100.0/24 is directly connected, GigabitEthernet0/0
L        198.51.100.1/32 is directly connected, GigabitEthernet0/0

sw2:

sw2#sh run | s net0/0
interface GigabitEthernet0/0
 description Connected to R2
 media-type rj45
 negotiation auto
sw2#sh run | s vlan
vlan internal allocation policy ascending
sw2#sh run | s Vlan
interface Vlan1
 ip address 198.51.100.2 255.255.255.0
sw2#sh ip int br
Interface              IP-Address      OK? Method Status                Protocol
GigabitEthernet0/0     unassigned      YES unset  up                    up
GigabitEthernet0/1     unassigned      YES unset  administratively down down
GigabitEthernet0/2     unassigned      YES unset  administratively down down
GigabitEthernet0/3     unassigned      YES unset  administratively down down
Vlan1                  198.51.100.2    YES manual up                    up