cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
3135
Views
15
Helpful
8
Replies

Nat routing problem between Cisco c2691 routers

Naeem_Khan
Level 1
Level 1

Hello. I am working on a school project and I am very new to networking in general. I have a small network simulation made in GNS 3 with 3 routers (Cisco c2691) connected to each other. Here is the set up below:

 

4d1d7119d1737605b109ff21b014ed02

My problem is that I am getting Internet on R1 but not on R2 and R3. I cannot even ping 8.8.8.8 from R2 but doing so from R1 works. All of them are routed through OSPF. Here are the configurations of R1 and R2 respectively:

 

R1:

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R1
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
! 
!
!
!
!
interface FastEthernet0/0
 ip address dhcp
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.0.254 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
!
interface FastEthernet1/1
!
interface FastEthernet1/2
!
interface FastEthernet1/3
!
interface FastEthernet1/4
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Vlan1
 no ip address
!
router ospf 1
 log-adjacency-changes
 area 1 virtual-link 192.168.0.1
 area 2 virtual-link 192.168.0.2
 network 192.168.0.0 0.0.0.255 area 0
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end

R2:

!

!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname R2
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
no ip domain lookup
ip auth-proxy max-nodata-conns 3
ip admission max-nodata-conns 3
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
! 
!
!
!
!
interface FastEthernet0/0
 ip address 192.168.0.1 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.1.254 255.255.255.0
 duplex auto
 speed auto
!
interface FastEthernet1/0
!
interface FastEthernet1/1
!
interface FastEthernet1/2
!
interface FastEthernet1/3
!
interface FastEthernet1/4
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Vlan1
 no ip address
!
router ospf 1
 log-adjacency-changes
 area 1 virtual-link 192.168.0.254
 network 192.168.0.0 0.0.0.255 area 0
 network 192.168.1.0 0.0.0.255 area 1
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end

I tried doing NAT on R1 as follows:

R1(config)# int f0/0
R1(config-if)# ip nat outside
R1(config-if)# ex
R1(config)# int f0/1
R1(config-if)# ip nat inside
R1(config-if)# ex

R1(config)# access-list 100 remark
R1(config)# access-list 100 permit ip 192.168.0.0 0.0.0.255 any
R1(config)# ip nat inside source list 100 interface f0/0 overload

But that did not help either. Is there any way to get internet traffic in R2/R3 and every other network connected to it? Any help would be really appreciated as I have tried every possible way I know of.

1 Accepted Solution

Accepted Solutions

Hello,

 

Paul's suggestion does the trick, the 'default-information originate always' sends the default route to the other routers. For the sake of completeness, if you do want to use different areas, below are the configs you could use (I added loopback which are typically used as router IDs for OSPF, and an IOS DHCP server to R2 for your VPCS client):

 

R1

 

hostname R1
!
interface Loopback 1
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address dhcp
ip nat outside
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.0.254 255.255.255.0
ip nat inside
duplex auto
speed auto
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 192.168.0.0 0.0.0.255 area 0
default-information originate always
!
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 dhcp
!
ip nat inside source list 1 interface FastEthernet0/0 overload
!
access-list 1 permit 192.168.0.0 0.0.255.255

 

R2

 

hostname R2
!
ip dhcp excluded-address 192.168.1.254
!
ip dhcp pool LAN
network 192.168.1.0 255.255.255.0
default-router 192.168.1.254
dns-server 8.8.8.8 8.8.4.4
!
interface Loopback 2
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.0.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.1.254 255.255.255.0
duplex auto
speed auto
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 192.168.0.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 1

 

R3

 

hostname R3
!
interface Loopback 3
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.0.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.2.254 255.255.255.0
duplex auto
speed auto
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 192.168.0.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 2

 

 

View solution in original post

8 Replies 8

Hello,

 

remove all the virtual links from all 3 routers.

Hello. That did not work for me. I still do not have access to the internet
on R2 or R3.

Hello,

 

can you ping the WAN IP address of R1 from R2 and R3 ?

I can ping f0/1 of R1 from R2, R3 and PC1, but not f0/0 of R1. Is that the
issue?

Hello,

 

on R1, add a static default route:

 

ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 dhcp

Hello

R1
router ospf 1
network 192.168.0.1 0.0.0.0 area 0
default-information originate always

ip route 0.0.0.0 0.0.0.0 fa0/0 dhcp

access-list 1 permit 192.168.0.0 0.0.0.255
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 1 permit 192.168.2.0 0.0.0.255
ip nat inside source list 1 interface fa0/0 overload

 

R2
router ospf 1
network 192.168.0.1 0.0.0.0 area 0
network 192.168.1.254 0.0.0.0 area 0


R3
router ospf 1
network 192.168.0.2 0.0.0.0 area 0
network 192.168.2.254 0.0.0.0 area 0


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Hello,

 

Paul's suggestion does the trick, the 'default-information originate always' sends the default route to the other routers. For the sake of completeness, if you do want to use different areas, below are the configs you could use (I added loopback which are typically used as router IDs for OSPF, and an IOS DHCP server to R2 for your VPCS client):

 

R1

 

hostname R1
!
interface Loopback 1
ip address 1.1.1.1 255.255.255.255
!
interface FastEthernet0/0
ip address dhcp
ip nat outside
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.0.254 255.255.255.0
ip nat inside
duplex auto
speed auto
!
router ospf 1
router-id 1.1.1.1
log-adjacency-changes
network 192.168.0.0 0.0.0.255 area 0
default-information originate always
!
ip route 0.0.0.0 0.0.0.0 FastEthernet0/0 dhcp
!
ip nat inside source list 1 interface FastEthernet0/0 overload
!
access-list 1 permit 192.168.0.0 0.0.255.255

 

R2

 

hostname R2
!
ip dhcp excluded-address 192.168.1.254
!
ip dhcp pool LAN
network 192.168.1.0 255.255.255.0
default-router 192.168.1.254
dns-server 8.8.8.8 8.8.4.4
!
interface Loopback 2
ip address 2.2.2.2 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.0.1 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.1.254 255.255.255.0
duplex auto
speed auto
!
router ospf 1
router-id 2.2.2.2
log-adjacency-changes
network 192.168.0.0 0.0.0.255 area 0
network 192.168.1.0 0.0.0.255 area 1

 

R3

 

hostname R3
!
interface Loopback 3
ip address 3.3.3.3 255.255.255.255
!
interface FastEthernet0/0
ip address 192.168.0.2 255.255.255.0
duplex auto
speed auto
!
interface FastEthernet0/1
ip address 192.168.2.254 255.255.255.0
duplex auto
speed auto
!
router ospf 1
router-id 3.3.3.3
log-adjacency-changes
network 192.168.0.0 0.0.0.255 area 0
network 192.168.2.0 0.0.0.255 area 2

 

 

Thank you so much! I do need 3 different areas.

Review Cisco Networking for a $25 gift card