cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
307
Views
5
Helpful
3
Replies

default route ospf

p3tter123
Level 1
Level 1

Hello i have some problems with the default route distribution in ospf.

i can see that the default route is learned trough ospf, but i cant ping the gateway, or anything beyond the router connected to ISP.

here is my configuration:

R1 to ISP this router have full network access
!
interface FastEthernet0/0
 ip address 192.168.5.5 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.1.1 255.255.255.0
 ip ospf 1 area 0
 duplex auto
 speed auto
!
router ospf 1
 router-id 5.5.5.5
 network 192.168.1.0 0.0.0.255 area 0
 default-information originate always
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!         
!
ip route 0.0.0.0 0.0.0.0 192.168.5.1

!
control-plane
!

line con 0
line aux 0
line vty 0 4
 login
 transport input all
!
scheduler allocate 20000 1000
end

---------------------------------------------------------------------------

R2: this router does not have access to 192.168.5.1.


interface FastEthernet0/0
 ip address 192.168.1.5 255.255.255.0
 ip ospf priority 0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.2.1 255.255.255.0
 ip ospf 1 area 1
 duplex auto
 speed auto
!

router ospf 1
 router-id 2.2.2.2
 network 192.168.1.0 0.0.0.255 area 0
 network 192.168.2.0 0.0.0.255 area 0
!
ip forward-protocol nd
no ip http server
no ip http secure-server

!
line con 0
line aux 0
line vty 0 4
 login
 transport input all
!

----------------------------------------------------------------

R2 sh ip route:

Router#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
       + - replicated route, % - next hop override

Gateway of last resort is 192.168.1.1 to network 0.0.0.0

O*E2  0.0.0.0/0 [110/1] via 192.168.1.1, 00:13:57, FastEthernet0/0
      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
C        192.168.1.0/24 is directly connected, FastEthernet0/0
L        192.168.1.5/32 is directly connected, FastEthernet0/0

----------------------------------------------------------------------------------------------

Router#ping 192.168.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.5.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms
Router#

----------------------------------------------------------------------------------------------

Router#ping 192.168.5.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.5.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)
Router#

----------------------------------------------------------------------------------------------

Router#sh ip ospf neighbor 

Neighbor ID     Pri   State           Dead Time   Address         Interface
5.5.5.5           1   FULL/DR         00:00:35    192.168.1.1     FastEthernet0/0
Router#

--------------------------------------------------------------------------------------------------

Router#sh ip ospf database 

            OSPF Router with ID (2.2.2.2) (Process ID 1)

                Router Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         952         0x80000002 0x0072D4 1
5.5.5.5         5.5.5.5         953         0x80000003 0x0059D6 1

                Net Link States (Area 0)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.1.1     5.5.5.5         953         0x80000001 0x00514D

                Router Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum Link count
2.2.2.2         2.2.2.2         977         0x80000006 0x00FA33 0
5.5.5.5         5.5.5.5         2010        0x80000004 0x0057D7 1

                Net Link States (Area 1)

Link ID         ADV Router      Age         Seq#       Checksum
192.168.1.1     5.5.5.5         2015        0x80000001 0x00514D
          
                Type-5 AS External Link States

Link ID         ADV Router      Age         Seq#       Checksum Tag
0.0.0.0         5.5.5.5         301         0x80000002 0x00A2FA 1

---------------------------------------------------------------------------------------------------

what is wrong with my configuration?

 

 

 

1 Accepted Solution

Accepted Solutions

John Blakley
VIP Alumni
VIP Alumni

I don't think there's anything wrong outside of possibly needing to configure NAT on the router that connects to the ISP. The problem I believe is that the ISP device doesn't know anything about the 192.168.1.x subnet. If you configure NAT on R1, you should see the return traffic. Try this:

 

interface FastEthernet0/0
ip nat outside
!
interface FastEthernet0/1
ip nat inside

access-list 100 permit ip 192.168.1.0 0.0.0.255 any
access-list 100 permit ip 192.168.2.0 0.0.0.255 any

ip nat inside source list 100 interfac f0/0 overload

 

I'm assuming that the interface 192.168.5.5 is directly connected to the ISP's equipment? If that's the case try the above and see if it works.

 

HTH,

John

HTH, John *** Please rate all useful posts ***

View solution in original post

3 Replies 3

John Blakley
VIP Alumni
VIP Alumni

I don't think there's anything wrong outside of possibly needing to configure NAT on the router that connects to the ISP. The problem I believe is that the ISP device doesn't know anything about the 192.168.1.x subnet. If you configure NAT on R1, you should see the return traffic. Try this:

 

interface FastEthernet0/0
ip nat outside
!
interface FastEthernet0/1
ip nat inside

access-list 100 permit ip 192.168.1.0 0.0.0.255 any
access-list 100 permit ip 192.168.2.0 0.0.0.255 any

ip nat inside source list 100 interfac f0/0 overload

 

I'm assuming that the interface 192.168.5.5 is directly connected to the ISP's equipment? If that's the case try the above and see if it works.

 

HTH,

John

HTH, John *** Please rate all useful posts ***

sorry missed that one, working now:)

Awesome :) Thanks for letting me know!

HTH, John *** Please rate all useful posts ***
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: