cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
15028
Views
0
Helpful
7
Replies

can't ping hosts over OSPF network

paquinjrm
Level 1
Level 1

Good evening,

 

  Trying to ping hosts over a simple OSPF network.

  • All hosts can ping their specific routers (1 host per router).
  • All routers can ping each other.
  • No hosts can ping each other across the network.

Shows:

R1#show ip ospf
 Routing Process "ospf 1" with ID 1.1.1.1
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
 Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
 Number of external LSA 0. Checksum Sum 0x000000
 Number of opaque AS LSA 0. Checksum Sum 0x000000
 Number of DCbitless external and opaque AS LSA 0
 Number of DoNotAge external and opaque AS LSA 0
 Number of areas in this router is 1. 1 normal 0 stub 0 nssa
 External flood list length 0
    Area BACKBONE(0)
        Number of interfaces in this area is 3
        Area has no authentication
        SPF algorithm executed 6 times
        Area ranges are
        Number of LSA 1. Checksum Sum 0x004845
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0

 

R1#show run
Building configuration...

Current configuration : 911 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R1

ip dhcp excluded-address 192.168.10.1
!
ip dhcp pool ALPHA
 network 192.168.10.0 255.255.255.0
 default-router 192.168.10.1
 dns-server 192.168.10.1
!
interface FastEthernet0/0
 ip address 192.168.10.1 255.255.255.0
 duplex auto
 speed auto
!
interface Serial0/0
 ip address 172.16.10.1 255.255.255.0
 encapsulation ppp
 ip ospf authentication
 ip ospf authentication-key cisco
!
interface Serial0/1
 ip address 172.16.30.2 255.255.255.0
 encapsulation ppp
 ip ospf authentication
 ip ospf authentication-key cisco
!
router ospf 1
 router-id 1.1.1.1
 log-adjacency-changes
 network 192.168.10.0 0.0.0.255 area 0
 network 172.16.0.0 0.0.255.255 area 0
!
ip classless

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

 

R2#show ip ospf
 Routing Process "ospf 1" with ID 2.2.2.2
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
 Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
 Number of external LSA 0. Checksum Sum 0x000000
 Number of opaque AS LSA 0. Checksum Sum 0x000000
 Number of DCbitless external and opaque AS LSA 0
 Number of DoNotAge external and opaque AS LSA 0
 Number of areas in this router is 1. 1 normal 0 stub 0 nssa
 External flood list length 0
    Area BACKBONE(0)
        Number of interfaces in this area is 1
        Area has no authentication
        SPF algorithm executed 1 times
        Area ranges are
        Number of LSA 1. Checksum Sum 0x009f26
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0

 

R2#show run
Building configuration...

Current configuration : 909 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R2
!
ip dhcp excluded-address 192.168.20.1
!
ip dhcp pool BRAVO
 network 192.168.20.0 255.255.255.0
 default-router 192.168.20.1
 dns-server 192.168.20.1
!
interface FastEthernet0/0
 ip address 192.168.20.1 255.255.255.0
 duplex auto
 speed auto
!
interface Serial0/0
 ip address 172.16.10.2 255.255.255.0
 encapsulation ppp
 ip ospf authentication
 ip ospf authentication-key cisco
!
interface Serial0/1
 ip address 172.16.20.1 255.255.255.0
 encapsulation ppp
 ip ospf authentication
 ip ospf authentication-key cisco
!
router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
 network 172.16.0.0 0.0.0.255 area 0
 network 192.168.20.0 0.0.0.255 area 0
!
ip classless
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
end

 

R3#show ip ospf
 Routing Process "ospf 1" with ID 3.3.3.3
 Supports only single TOS(TOS0) routes
 Supports opaque LSA
 SPF schedule delay 5 secs, Hold time between two SPFs 10 secs
 Minimum LSA interval 5 secs. Minimum LSA arrival 1 secs
 Number of external LSA 0. Checksum Sum 0x000000
 Number of opaque AS LSA 0. Checksum Sum 0x000000
 Number of DCbitless external and opaque AS LSA 0
 Number of DoNotAge external and opaque AS LSA 0
 Number of areas in this router is 1. 1 normal 0 stub 0 nssa
 External flood list length 0
    Area BACKBONE(0)
        Number of interfaces in this area is 1
        Area has no authentication
        SPF algorithm executed 1 times
        Area ranges are
        Number of LSA 1. Checksum Sum 0x00ad06
        Number of opaque link LSA 0. Checksum Sum 0x000000
        Number of DCbitless LSA 0
        Number of indication LSA 0
        Number of DoNotAge LSA 0
        Flood list length 0

 

R3#show run
Building configuration...

Current configuration : 911 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname R3

ip dhcp excluded-address 192.168.30.1
!
ip dhcp pool CHARLIE
 network 192.168.30.0 255.255.255.0
 default-router 192.168.30.1
 dns-server 192.168.30.1
!
interface FastEthernet0/0
 ip address 192.168.30.1 255.255.255.0
 duplex auto
 speed auto
!
interface Serial0/0
 ip address 172.16.20.2 255.255.255.0
 encapsulation ppp
 ip ospf authentication
 ip ospf authentication-key cisco
!
interface Serial0/1
 ip address 172.16.30.1 255.255.255.0
 encapsulation ppp
 ip ospf authentication
 ip ospf authentication-key cisco
!
router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes
 network 172.16.0.0 0.0.0.255 area 0
 network 192.168.30.0 0.0.0.255 area 0
!
ip classless
!
line con 0
!
line aux 0
!
line vty 0 4
 login
!
end

 

 

Where's my mistake?

7 Replies 7

pankaj kumar
Level 1
Level 1

Dude you have given wrong network command in router ospf

give following commands

 

R2

router ospf 1
 router-id 2.2.2.2
 log-adjacency-changes
 no network 172.16.0.0 0.0.0.255 area 0
no network 192.168.20.0 0.0.0.255 area 0
net 172.16.10.2 0.0.0.0 area 0
net 172.16.20.1 0.0.0.0 area 0
net 192.168.20.1 0.0.0.0 area 0

 

R3


router ospf 1
 router-id 3.3.3.3
 log-adjacency-changes
no  network 172.16.0.0 0.0.0.255 area 0
 network 192.168.30.0 0.0.0.255 area 0
 network 172.16.0.0 0.0.255.255 area 0

 

Do not forgot to Rate the Helpful post

topsdntopsdn

 

Thanks for the reply but that didn't solve it.

 

It's my understanding that advertising a network in ospf is done like so:  

a 172.16.20.1 ip on a s0/0 interface is set up as "network 172.16.20.0 0.0.0.255 area 0" and any other interface in the same manner.

 

Am I wrong?

the ospf neighbor ship is not comming up because you have given wrong network command

there is no other mistake.

and no the advertisment can aslo be done like

network 172.168.16.1 0.0.0.0 area 0

this means that we are very specific for the interface on which we are going to send the hello packet.the above command tell the device to send the hello,update,find ospf neighbors... on the interface whose ip is 172,168.16.1 it does not mean that we are advertising the network

Not sure if anyone is still checking this thread. I'm having exactly the same problem. For the purposes of this thread, R2 = Router1, and R1=Router 0.

 

R1 config:

interface FastEthernet0/0
 bandwidth 1
 ip address 172.16.40.10 255.255.255.248
 ip ospf authentication
 ip ospf authentication-key cisco
 duplex auto
 speed auto
!
interface FastEthernet0/1
 bandwidth 1
 ip address 172.16.40.33 255.255.255.240
 duplex auto
 speed auto
!
interface Serial0/0/0
 no ip address
 shutdown
 clock rate 2000000
!
interface Serial0/0/1
 no ip address
 shutdown
 clock rate 2000000
!
router ospf 1
 router-id 1.1.1.1
 redistribute connected
 network 172.16.0.0 0.0.255.255 area 0
 default-information originate
!
ip forward-protocol nd
ip http server
no ip http secure-server

R1# sh ip ro

Gateway of last resort is not set

      172.16.0.0/16 is variably subnetted, 5 subnets, 3 masks
O        172.16.40.0/29 [110/65536] via 172.16.40.9, 00:14:34, FastEthernet0/0
C        172.16.40.8/29 is directly connected, FastEthernet0/0
L        172.16.40.10/32 is directly connected, FastEthernet0/0
C        172.16.40.32/28 is directly connected, FastEthernet0/1
L        172.16.40.33/32 is directly connected, FastEthernet0/1

 

R2 config:

interface FastEthernet0/0
 ip address 172.16.40.2 255.255.255.248
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 172.16.40.9 255.255.255.248
 ip ospf authentication
 ip ospf authentication-key cisco
 duplex auto
 speed auto
!
interface Serial0/0/0
 no ip address
 shutdown
!
router ospf 1
 router-id 2.2.2.2
 redistribute connected
 network 172.16.0.0 0.0.255.255 area 0


R2# sh ip ro

Gateway of last resort is not set

      172.16.0.0/16 is variably subnetted, 4 subnets, 2 masks
C        172.16.40.0/29 is directly connected, FastEthernet0/0
L        172.16.40.2/32 is directly connected, FastEthernet0/0
C        172.16.40.8/29 is directly connected, FastEthernet0/1
L        172.16.40.9/32 is directly connected, FastEthernet0/1

 

I cannot ping from endpoint to server and vice versa, but the routers can all ping both interfaces on the others. I'm trying to see what I'm missing here.

 

Try using wild cards

like

network 172.16.40.0 0.0.0.7

network 172.16.40.8 0.0.0.7

What you are missing is a route on R2 for the 172.16.40.32/28 subnet.

Is fa0/1 on R1 up/up ?

Also you don't need "redistribute connected" under your OSPF configuration as your network statement of 172.16.0.0 0.0.255.255 covers all the interface IPs.

Jon

You can configure the network statement a number of ways but the key thing to understand with IGPs such as RIP/EIGRP/OSPF is the network statement is not used to tell the routing protocol which networks to actually advertise.

It is used to tell the routing protocol which interfaces to start the routing protocol on. Once it starts on that interface it will then use the subnet mask associated with that interface in it's advertisement.

If you look at your original OSPF outputs you can see that R1 has 3 interfaces in area 0 but R2 and R3 only have one each and this, as pointed out, is because you have configured your network statements incorrectly ie. -

1) R2 has two serial interfaces -

172.16.10.0/24 and 172.16.20.0/24

your network statement is 172.16.0.0 0.0.0.255 which is actually 172.16.0.0/24 which covers neither of R2's serial interfaces.

2) R3 again has two interfaces -

172.16.20.0/24 and 172.16.30/24

you have the same issue because your network statement is covering 172.16.0.0/24.

So you need to ensure that your network statements cover the interface IP. You can do this by -

network 172.16.x.x 0.0.0.0 area 0 

network 172.16.x.0 0.0.0.255 area 0

or you could cover all of them with -

network 172.16.0.0 0.0.255.255 area 0

or any other summary address that covered all the ranges. All of the above would work.

Remember with the network command you are simply telling the IGP which interfaces to run. Once it is has started on that interface it will then use the subnet mask configured on the interface.

Which you use depends on how granular you want to be ie. -

1) the first example matches the specific interface IP

2) the second example would match any interfaces in the 172.16.x.0/24 range

3) the last example given would cover any interface with a 172.16.x.x address

There may be times when you have multiple 172.16.x.x interfaces but you only wanted to start the IGP on some of them.

Finally just for completeness when you use the network command under BGP unlike the IGPs, you are actually telling BGP which networks to advertise.

Jon

Review Cisco Networking for a $25 gift card