08-04-2008 07:05 PM - edited 03-06-2019 12:36 AM
Hi Experts,
I need help in my ospf config.
RouterA-FE0<--->FE0-RouterB-FE1<--->FE0-RouterC-FE1
RouterA
!
interface fastethernet0
ip address 192.168.0.1 255.255.255.252
!
router ospf 1
log-adjacency-changes
network 192.168.0.0 0.0.0.3 area 1
RouterB
!
interface fastethernet0
ip address 192.168.0.2 255.255.255.252
ip nat outside
!
interface fastethernet1
ip address 192.168.0.5 255.255.255.252
ip nat inside
!
router ospf 1
log-adjacency-changes
network 192.168.0.0 0.0.0.3 area 1
network 192.168.0.4 0.0.0.3 area 1
!
ip nat inside source static 192.168.1.1 172.16.1.1
ip nat inside source static 192.168.1.2 172.16.1.2
ip nat inside source static 192.168.1.3 172.16.1.3
RouterC
!
interface fastethernet0
ip address 192.168.0.6 255.255.255.252
!
interface fastethernet1
ip address 192.168.1.1 255.255.255.0
!
router ospf 1
log-adjacency-changes
network 192.168.0.4 0.0.0.3 area 1
network 192.168.1.0 0.0.0.255 area 1
RouterA suppose to have...
ip route 172.16.1.2 255.255.255.255 192.168.0.2
ip route 172.16.1.3 255.255.255.255 192.168.0.2
ip route 172.16.1.4 255.255.255.255 192.168.0.2
However, RouterA doesn't want to put the static route. How can I make RouterA see 172.16.1.2, 172.16.1.3, and 172.16.1.4 route with a default gateway of 192.168.0.2?
Should I add this in RouterB config?
!
interface null0
!
router ospf 1
redistribute static subnets
!
ip route 172.16.1.2 255.255.255.255 null0
ip route 172.16.1.3 255.255.255.255 null0
ip route 172.16.1.4 255.255.255.255 null0
GT
Solved! Go to Solution.
08-05-2008 12:23 AM
Hi Gilbert,
Yes, the routes would be installed in router A as below:
O E2 172.16.1.4 [110/20] via 192.168.0.2, 00:03:19, FastEthernet0/0
O E2 172.16.1.3 [110/20] via 192.168.0.2, 00:03:19, FastEthernet0/0
O E2 172.16.1.2 [110/20] via 192.168.0.2, 00:03:19, FastEthernet0/0
I haven't checked the NAT bit though.
HTH,
~Vaibhav
08-05-2008 01:25 AM
NAT is going to work as well. If any one from RouterA tries to reach any of the three 172.16.1.0 IPs:
RouterB#sh ip nat trans
Pro Inside global Inside local Outside local Outside global
--- 172.16.1.1 192.168.1.1 --- ---
icmp 172.16.1.2:11 192.168.1.2:11 192.168.0.1:11 192.168.0.1:11
--- 172.16.1.2 192.168.1.2 --- ---
icmp 172.16.1.3:12 192.168.1.3:12 192.168.0.1:12 192.168.0.1:12
icmp 172.16.1.3:13 192.168.1.3:13 192.168.0.1:13 192.168.0.1:13
--- 172.16.1.3 192.168.1.3 --- ---
However, I have one doubt. You have static routes pointing to null0 for
172.16.1.2
172.16.1.3
172.16.1.4
But the static NAT statements are for
172.16.1.1
172.16.1.2
172.16.1.3
Was 172.16.1.1 included by mistake? Should it be 172.16.1.4 ?
If this was a typo, you may include the correct network and it would work just as you thought.
HTH,
~Vaibhav
08-04-2008 07:30 PM
do u have any thing connect with router B contain those address i mea 172.16.1.0/24 ?
if not creat loopback address like
interface loopbak 0
ip address 172.16.1.2 255.255.255.0
interface loopbak 1
ip address 172.16.1.3 255.255.255.0
also change the area number on router B and A to (0)
also add
ip route 172.16.1.2 255.255.255.255 192.168.0.2
ip route 172.16.1.3 255.255.255.255 192.168.0.2
ip route 172.16.1.4 255.255.255.255 192.168.0.2
good luck
please, rate if helpful
08-04-2008 10:10 PM
Hi,
Thank you for your reply.
I can't make changes to RouterA since its not manage by me. Also, the admin of RouterA doesn't want to make any changes (or addition) to RouterA configuration.
As mentioned, if I managed routerA it should routed there as;
ip route 172.16.1.2 255.255.255.255 192.168.0.2
ip route 172.16.1.3 255.255.255.255 192.168.0.2
ip route 172.16.1.4 255.255.255.255 192.168.0.2
Now, how to make the route apear in RouterA via OSPF Area 1 in RouterB and make sure NAT works?
I think about the Null/Redistribute solution but I can't test it - no equipment to test them :(
GT
08-04-2008 10:23 PM
now what can i see is that router A only advertising the subnet between B and A
so if router A has a network connected to any other interface and not included in router a advertised network
what happen
the packet will come to u, but from router B it will dose not know how to get back to that network because it is not advertised
so if u know he has network and u dont want router a do any more changes
just maked a static route on router B to that network useing router A as a next hope
then redistribute it in ospf
08-05-2008 12:23 AM
Hi Gilbert,
Yes, the routes would be installed in router A as below:
O E2 172.16.1.4 [110/20] via 192.168.0.2, 00:03:19, FastEthernet0/0
O E2 172.16.1.3 [110/20] via 192.168.0.2, 00:03:19, FastEthernet0/0
O E2 172.16.1.2 [110/20] via 192.168.0.2, 00:03:19, FastEthernet0/0
I haven't checked the NAT bit though.
HTH,
~Vaibhav
08-05-2008 01:25 AM
NAT is going to work as well. If any one from RouterA tries to reach any of the three 172.16.1.0 IPs:
RouterB#sh ip nat trans
Pro Inside global Inside local Outside local Outside global
--- 172.16.1.1 192.168.1.1 --- ---
icmp 172.16.1.2:11 192.168.1.2:11 192.168.0.1:11 192.168.0.1:11
--- 172.16.1.2 192.168.1.2 --- ---
icmp 172.16.1.3:12 192.168.1.3:12 192.168.0.1:12 192.168.0.1:12
icmp 172.16.1.3:13 192.168.1.3:13 192.168.0.1:13 192.168.0.1:13
--- 172.16.1.3 192.168.1.3 --- ---
However, I have one doubt. You have static routes pointing to null0 for
172.16.1.2
172.16.1.3
172.16.1.4
But the static NAT statements are for
172.16.1.1
172.16.1.2
172.16.1.3
Was 172.16.1.1 included by mistake? Should it be 172.16.1.4 ?
If this was a typo, you may include the correct network and it would work just as you thought.
HTH,
~Vaibhav
08-05-2008 02:23 AM
Hi Vaibhav,
Thank you for your reply.
Yes the 172.16.1.1 supposed to be 172.1.1.4 (typo error). Here is the corrected NAT config
ip nat inside source static 192.168.1.2 172.16.1.2
ip nat inside source static 192.168.1.3 172.16.1.3
ip nat inside source static 192.168.1.4 172.16.1.4
Thank you for testing it. After seeing your reply, I configure it in a production network and all is working as expected.
GT
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide