12-04-2014 06:05 AM - edited 03-07-2019 09:46 PM
Hello everybody,
So I have this question:
I have two routers connected together with two serial cables (networks
192.168.1.0/30 and 192.168.2.0/30), where on each router is loopback for
testing purposes.
This is my initial setting:
Router1:
Gateway of last resort is not set
192.168.1.0/30 is subnetted, 1 subnets
C 192.168.1.0 is directly connected, Serial2/0
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.0 is directly connected, Serial3/0
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
S 192.168.10.0/24 [200/0] via 192.168.2.2
O 192.168.10.1/32 [110/65] via 192.168.1.2, 00:02:24, Serial2/0
C 192.168.20.0/24 is directly connected, Loopback0
Router2:
Gateway of last resort is not set
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.0 is directly connected, Serial3/0
C 192.168.10.0/24 is directly connected, Loopback0
192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks
S 192.168.20.0/24 [200/0] via 192.168.2.1
O 192.168.20.1/32 [110/65] via 192.168.2.1, 00:00:08, Serial3/0
Router2(config)#
I issue this command on router1:
Router1(config)#ip route 192.168.10.0 255.255.255.0 192.168.2.2 200
and this one on router2:
Router2(config)#ip route 192.168.20.0 255.255.255.0 192.168.2.1 200
after that I wanna test if it behaves correctly, that is. when 192.168.1.0/30
is up, it should route packets through it and only through it. If it is down,
it should route packets through 192.168.2.0/30.
Now, when I turn one of the serial ports 192.168.1.0/30 down, ospf will learn
about loopback on other network correctly through the 192.168.2.0/30:
Router1:
Gateway of last resort is not set
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.0 is directly connected, Serial3/0
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
S 192.168.10.0/24 [200/0] via 192.168.2.2
O 192.168.10.1/32 [110/65] via 192.168.2.2, 00:00:03, Serial3/0
C 192.168.20.0/24 is directly connected, Loopback0
Router2:
Gateway of last resort is not set
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.0 is directly connected, Serial3/0
C 192.168.10.0/24 is directly connected, Loopback0
192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks
S 192.168.20.0/24 [200/0] via 192.168.2.1
O 192.168.20.1/32 [110/65] via 192.168.2.1, 00:00:08, Serial3/0
Router2(config)#
But when I turn it back up, for some reason, it still uses 192.168.2.0/30
serial, although that way has administratively set higher Administrative
distance (less trustful):
Router 1:
Gateway of last resort is not set
192.168.1.0/30 is subnetted, 1 subnets
C 192.168.1.0 is directly connected, Serial2/0
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.0 is directly connected, Serial3/0
192.168.10.0/24 is variably subnetted, 2 subnets, 2 masks
S 192.168.10.0/24 [200/0] via 192.168.2.2
O 192.168.10.1/32 [110/65] via 192.168.2.2, 00:01:40, Serial3/0
C 192.168.20.0/24 is directly connected, Loopback0
Router(config)#
Router 2:
Gateway of last resort is not set
192.168.1.0/30 is subnetted, 1 subnets
C 192.168.1.0 is directly connected, Serial2/0
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.0 is directly connected, Serial3/0
C 192.168.10.0/24 is directly connected, Loopback0
192.168.20.0/24 is variably subnetted, 2 subnets, 2 masks
S 192.168.20.0/24 [200/0] via 192.168.2.1
O 192.168.20.1/32 [110/65] via 192.168.2.1, 00:01:46, Serial3/0
Router2(config)#
My question is: what am I doing wrong?
I want only 192.168.1.0/30 network to be used, and the second one only in the
case of failure, but when the 192.168.1.0/30 network is up and running,
second one should not be used at all. Why is it using it even after the
1.0/30 was restored?
EDIT:// For a completeness sake, I should add I am doing this in Packet Tracer (it is not always behaving correctly, as real hardware would, to my knowledge. Yes, i have the newest version of Packet Tracer (6.1.1.0001) ).
Solved! Go to Solution.
12-09-2014 12:18 PM
Hello
Router 1
delete all static routes and remove ospf
no ip route xxxx xxxx etc..
no ip router ospf 10
interface Loopback0
ip address 192.168.20.1 255.255.255.0
interface Serial2/0
ip address 192.168.1.1 255.255.255.252
interface Serial3/0
ip address 192.168.2.1 255.255.255.252
router ospf 10
network 0.0.0.0 0.0.0.0 area 0 ( this will advertise all interfaces in ospf)
Router 2
delete all static routes and remove ospf
no ip route xxxx xxxx etc..
no ip router ospf 10
interface Loopback0
ip address 192.168.10.1 255.255.255.0
interface Serial2/0
ip address 192.168.1.2 255.255.255.252
interface Serial3/0
ip address 192.168.2.2 255.255.255.252
router ospf 10
network 0.0.0.0 0.0.0.0 area 0 ( this will advertise all interfaces in ospf)
At this point if you do
sh ip route
you should now see two paths on either roruter to the loopback address of the other router
Now to make ser2/0 from each router to take precedence.
on both routers apply...
interface Serial3/0
ip ospf cost 1000
Now when you do sh ip route there will be only one path towards the loopbacks on either router and this will be via ser2/0.
Lastly if you shutdown ser2/0 then the path will change to go via ser3/0
res
Paul
12-05-2014 02:01 AM
Hello
It should work, can you post your config for both routers.
The other option without even using static addressing is to enable ospf on both serial interfaces and then you just increase the opsf cost on ser3/0 of each router, this way preffered path will be se2/0 and backup will be ser3/0.
res
Paul
12-06-2014 07:24 AM
Hello Paul,
Dang, You´re right - I should have made the 192.168.1.0/30 learned through OSPF, then it should work.
EDIT:// You know, I am trying to make the primary route learned through OSPF and I changed the secondary route Admin. dist to 200 so it would be less trustful, so that it would be used only in case the primary would stop working.
And for all the tea in China I cannot get it working.
By config you mean output of show running-config? Here it is:
12-06-2014 02:10 PM
Hello
So try this: both routers{
12-07-2014 09:20 AM
I am sorry, Paul,
Can you write me step by step instructions?
I have tried several combinations, none of them are working, I am at a loss here :(
12-07-2014 11:49 AM
hello
So try this: both routers{
ip ospf network point-to-point
3) no router ospf 10
router ospf 10
network 0.0.0.0 0.0.0.0 area 0
12-08-2014 01:08 PM
Hello
Thanks for the rating - were you able to follow my instructions and if so were you sucessfull
Please close post as answered so it my help others in the future
res
Paul
12-09-2014 10:00 AM
Hello Paul,
I apologize for later reply.
I was able to follow them, but I haven´t been able to work this out.
I tried to put that solution in the very same way as you describe, then also on a restarted routers - no luck.
Thing I don´t understand is why would I need to delete the static routes? I
mean, if I do that, those routers are not able to communicate with each other, because there are no IP´s on a serial ports.
Also, when i enable OSPF (router ospf 10) and add only network 0.0.0.0 0.0.0.0 + my primary network, it will propagate OSPF only through them and if I disable the primary network, it won´t propagate it through secondary route.
But when I add also secondary network to OSPF, again, when I shut down primary route, it will use the secondary, but when I turn it back again, it will still use the secondary, even when OSPF cost was set to 100. :(
Damn, I really have no idea what am I doing wrong.
12-09-2014 12:18 PM
Hello
Router 1
delete all static routes and remove ospf
no ip route xxxx xxxx etc..
no ip router ospf 10
interface Loopback0
ip address 192.168.20.1 255.255.255.0
interface Serial2/0
ip address 192.168.1.1 255.255.255.252
interface Serial3/0
ip address 192.168.2.1 255.255.255.252
router ospf 10
network 0.0.0.0 0.0.0.0 area 0 ( this will advertise all interfaces in ospf)
Router 2
delete all static routes and remove ospf
no ip route xxxx xxxx etc..
no ip router ospf 10
interface Loopback0
ip address 192.168.10.1 255.255.255.0
interface Serial2/0
ip address 192.168.1.2 255.255.255.252
interface Serial3/0
ip address 192.168.2.2 255.255.255.252
router ospf 10
network 0.0.0.0 0.0.0.0 area 0 ( this will advertise all interfaces in ospf)
At this point if you do
sh ip route
you should now see two paths on either roruter to the loopback address of the other router
Now to make ser2/0 from each router to take precedence.
on both routers apply...
interface Serial3/0
ip ospf cost 1000
Now when you do sh ip route there will be only one path towards the loopbacks on either router and this will be via ser2/0.
Lastly if you shutdown ser2/0 then the path will change to go via ser3/0
res
Paul
12-10-2014 08:54 AM
"At this point if you do
sh ip route
you should now see two paths on either roruter to the loopback address of the other router"
No, this is what I see when I did exactly what you described (+ turned on the serial interfaces, otherwise only loopbacks have been seen):
Router1(config)#do show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
192.168.1.0/30 is subnetted, 1 subnets
C 192.168.1.0 is directly connected, Serial2/0
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.0 is directly connected, Serial3/0
C 192.168.20.0/24 is directly connected, Loopback0
Router1(config)#
Router2(config)#do show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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
Gateway of last resort is not set
192.168.1.0/30 is subnetted, 1 subnets
C 192.168.1.0 is directly connected, Serial2/0
192.168.2.0/30 is subnetted, 1 subnets
C 192.168.2.0 is directly connected, Serial3/0
C 192.168.10.0/24 is directly connected, Loopback0
Router2(config)#
So, since the path to other router is not propagated, I tried also this:
I went to each port and applied ip ospf network point-to-point to both loobacks only (still the same output as the one above), then I went to all serial ports on both routers and applied the same - still the same output as the one before.
Then I went and retyped on both routers
router ospf 10
network 0.0.0.0 0.0.0.0 area 0
again, the same result.
12-10-2014 04:44 PM
Hello Paul,
After debating this problem with my classmate, I found out it is enough for us to do one OSPF route (primary) and one static route (secondary), simply because we do not have yet the knowledge to do what I thought we should do (both OSPF, one as a backup).
And what we needed to do is not so far away from my former configuration – I was missing point-to-point commands on ports + we actually, to my surprise, had to use admin. distance (which I thought was wrong), instead of cost for the secondary route.
And now I feel really bad because you tried to help me all along and I realized I am asking the wrong question :/
I apologize for that.
So that I would not feel that bad now, I´m leaving here my working configuration to my actual problem, because it might still help somebody else.
hostname Router1
int loop0
ip address 192.168.20.1 255.255.255.0
ip ospf network point-to-point
exit
int s2/0
ip address 192.168.1.1 255.255.255.252
no shut
exit
int s3/0
ip address 192.168.2.1 255.255.255.252
no shut
exit
router ospf 10
network 192.168.1.0 0.0.0.3 area 0
network 192.168.20.0 0.0.0.255 area 0
exit
ip route 192.168.10.0 255.255.255.0 192.168.2.2 200
hostname Router2
int loop0
ip address 192.168.10.1 255.255.255.0
ip ospf network point-to-point
exit
int s2/0
ip address 192.168.1.2 255.255.255.252
no shut
exit
int s3/0
ip address 192.168.2.2 255.255.255.252
no shut
exit
router ospf 10
network 192.168.1.0 0.0.0.3 area 0
network 192.168.10.0 0.0.0.255 area 0
exit
ip route 192.168.20.0 255.255.255.0 192.168.2.1 200
exit
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: