There is more than one possible solution for this challenge. Feel free to post your proposed answer in the comments section. We will try to keep comments hidden from public view, so that the fun isn’t spoiled for others. Also, don’t feel bad if the answer(s) aren’t immediately apparent. A number of very bright people have been puzzled by this scenario. Answers will be posted on Friday, September 18th.
Scenario:
R1 and R2 are configured with their FastEthernet interfaces on the same subnet. R1 will be forming an OSPF neighbor adjacency to R2 over the FastEthernet interface, and will also be advertising some loopback networks into OSPF.
R1′s Relevant Configuration:
interface Loopback1 ip address 1.1.1.1 255.255.255.255 interface Loopback11 ip address 11.11.11.11 255.255.255.255 interface Loopback111 ip address 111.111.111.111 255.255.255.255 interface FastEthernet0/0 ip address 150.10.12.1 255.255.255.0 no shut
R2′s Relevant Configuration:
interface FastEthernet0/0 ip address 150.10.12.2 255.255.255.0 no shut router ospf 1 network 150.10.12.0 0.0.0.255 area 0
Challenge:
Your task is to configure R1 while meeting all of the following criteria for requirements and restrictions:
- R2 should see the networks 1.1.1.1/32, 11.11.11.11/32, and 111.111.111.111/32 as OSPF routes in R2′s routing table, but they should not appear as IA, E2, or E1.
- The output of “show ip ospf neighbor” on R2 should show 11.11.11.11 as the Neighbor ID for the adjacency to R1, even if R1 is reloaded. No other Neighbor IDs should show up on R2.
- You are not allowed to use the “router-id” command on R1.
- You are not permitted to shut down any interfaces on R1, or remove any of the existing configuration on R1.
- No additional configuration may be added to R2, all configuration for this challenge is done on R1.
About INE Instructor:
You can leave a response, or trackback from your own site.
58 Responses to “Have you seen my Router ID?”
Leave a Reply


Configure on R1:
router ospf 1
router ospf 2
net 1.1.1.1 0.0.0.0 area 0
net 11.11.11.11 0.0.0.0 area 0
net 111.111.111.111 0.0.0.0 area 0
net 150.10.12.1 0.0.0.0 area 0
OSPF process 1 will take 111.111.111.111 as it’s router ID.
OSPF process 2 will take 11.11.11.11 as it’s router ID.
i think i havent broken the rules….
ip vrf OSPF_TEST
rd 1:1
route-target export 1:1
route-target import 1:1
!
!
interface Loopback1
ip vrf forwarding OSPF_TEST
ip address 1.1.1.1 255.255.255.255
!
interface Loopback11
ip address 1.1.1.1 255.255.255.255 secondary
ip address 111.111.111.111 255.255.255.255 secondary
ip address 11.11.11.11 255.255.255.255
!
interface Loopback111
ip vrf forwarding OSPF_TEST
ip address 111.111.111.111 255.255.255.255
!
!
router ospf 2 vrf OSPF_TEST
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
router ospf 1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.0 0.0.0.255 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.0 0.0.0.255 area 0
!
Erm, actually…. that OSPF process 2 wasnt needed. Was part of messin about
On R1:
router ospf 1
router ospf 2
network 150.10.12.0 0.0.0.255 area 0
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
Process # 1 will take 111.111.111.111 as RID. Process # 2 can’t use the same, so it uses 11.11.11.11…voilà!
Advertise the networks, but with the area command at the end of the statement into the same area as the main interfaces?
Create a separate OSPF instance first so that instance takes the 111.111.111.111 loopback address as it’s router id. Then the instance between R1 and R2 will use the next highest one being 11.11.11.11?
I am just taking a guess here, I am no where need my equipment to lab it up
LOL my first answer didn’t come out anywhere near the way I meant it. On my blackberry :/
Just make sure they are advertised into the same area as the main interfaces is what I wanted to say
They should just show up as OSPF routes.
My lab is 3 weeks away and my mind is scrambled…
!
router ospf 1
log-adjacency-changes
!
router ospf 2
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
On R1 you create multiple OSPF processes.
router ospf 1
this dummy process doesn’t have any configuration, it just consumes the highest numbered loopback address which is 111.111.111.111 as it’s router-id
router ospf 2
This process will use the 2nd highest loopback address which is 11.11.11.11 and is what we want the router-id to be. We will add our network commands under this process and put all 3 loopbacks and the fa0/0 into area 0 to ensure that R2 sees the loopbacks as intra-area routes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
net 150.10.12.1 0.0.0.0 area 0
r1
!
router ospf 1
!
router ospf 2
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.0 0.0.0.255 area 0
!
ospf 1 will take highest: 111.111.111.111
ospf 2 will take the next in line… which is 11.11.11.11
but…. do you think would ever this something like this on the lab?
Bring up lo11 first. Configure lo1 and lo111 with dampening and a restart penalty.
Just off the top of my head here, but how about something like this…
!
router ospf 10
network 1.2.3.0 0.0.0.255 area 0
!
router ospf 100
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.0 0.0.0.255 area 0
!
R1 loopback interfaces should be advertised into area 0 which is where the fastethernet links will be in. These network should be configured under a second OSPF process, to take on the second highest loopback interface as the router-id.
R1
!
Router ospf 1
!
Router ospf 2
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.1 0.0.0.0 area 0
!
I think the simplest solution is to configure to ospf processes, the idea is that each ospf process running on the router needs a unique Router ID. so the first process will choose interface loopback 111 as its router ID, and the second process will choose interface loopback 11 as its router ID.
! router R1 configuration
router ospf 2
exit
!
router ospf 1
network 150.10.12.0 0.0.0.255 area 0
network 1.1.1.1 255.255.255.255 area 0
network 11.11.11.11 255.255.255.255 area 0
network 111.111.111.111 255.255.255.255 area 0
!
R1#sho run | sec router ospf
router ospf 1
router-id 11.11.11.11
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.0 0.0.0.255 area 0
R2#sho ip r
*Mar 1 00:13:24.127: %SYS-5-CONFIG_I: Configured from console by consoleoute
Codes: 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
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/2] via 150.10.12.1, 00:03:30, FastEthernet0/0
111.0.0.0/32 is subnetted, 1 subnets
O 111.111.111.111 [110/2] via 150.10.12.1, 00:03:30, FastEthernet0/0
11.0.0.0/32 is subnetted, 1 subnets
O 11.11.11.11 [110/2] via 150.10.12.1, 00:03:30, FastEthernet0/0
150.10.0.0/24 is subnetted, 1 subnets
C 150.10.12.0 is directly connected, FastEthernet0/0
R2#sho ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
11.11.11.11 1 FULL/BDR 00:00:38 150.10.12.1 FastEthernet0/
0
R2#
My solution was to start 2 ospf processes on R1:
R1#sh run | b router ospf
router ospf 1
log-adjacency-changes
!
router ospf 2
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.0 0.0.0.255 area 0
R2#sh ip ospf ne
Neighbor ID Pri State Dead Time Address Interface
11.11.11.11 1 FULL/BDR 00:00:36 150.10.12.1 FastEthernet0/0
R2#sh ip ro ospf
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/2] via 150.10.12.1, 00:01:08, FastEthernet0/0
111.0.0.0/32 is subnetted, 1 subnets
O 111.111.111.111 [110/2] via 150.10.12.1, 00:01:08, FastEthernet0/0
11.0.0.0/32 is subnetted, 1 subnets
O 11.11.11.11 [110/2] via 150.10.12.1, 00:01:08, FastEthernet0/0
The quickest way is to add second ospf process on R1
router os 1
router os 2
net 150.10.12.0 0.0.0.255 ar 0
net 1.1.1.1 0.0.0.0 ar 0
net 11.11.11.11 0.0.0.0 ar 0
net 111.111.111.111 0.0.0.0 ar 0
–
As you see, first process id select highest loopback ,and because of RID must be unique, then second ospf process will get second highest loopback , which meets criteria
R1#sh ip os | in ID
Routing Process “ospf 2″ with ID 11.11.11.11
Routing Process “ospf 1″ with ID 111.111.111.111
Here is my solution, but it makes the assumption that there are 2 additional interfaces on R1, and that I am allowed to connect them to each other (then again, the various requirements never said anything about this _not_ being allowed
).
!!!Config to add to R1:
ip vrf YAY
!
interface Loopback111
ip vrf forwarding YAY
ip address 111.111.111.111 255.255.255.255
!
interface FastEthernet1/0
ip address 2.2.2.1 255.255.255.252
no shut
!
interface FastEthernet2/0
ip vrf forwarding YAY
ip address 2.2.2.2 255.255.255.252
no shut
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
router ospf 2 vrf YAY
network 0.0.0.0 255.255.255.255 area 0
!!!End of config
By doing this, lo111 is logically associated with the vrf, so the global table facing R2 will always present the 11.11.11.11 as the highest IP loopback on the device even after a reboot. Also, with the vrf of R1 connected directly to the global of R1, it can just be a “third” router that is also a part of the same area 0, and thus presents an intra-area route for 111.111.111.111.
No router-id command, all interfaces are up, and all config was done on R1…you just have to let me run the loop on additional R1 ports that I presumed I had
I’m looking forward to seeing the other, probably more direct solutions!
–Matt
Hi,
This is quite simple
So, basically we need to make Lo111 ip address invalid from the OSPF RID perspective. What options do we have?
-when you type in “router ospf x” command THE RID is automatically elected (if you have Loopbacks) the highest IP address from all Loopbacks, IF and ONLY IF that Loopback address is not already a RID for another OSPF process; if it is, the next available Loopback is checked and so on, you know the rest of it.
-make the Lo111 “invisible” from the router’s perspective, so here we have VRFs; still need to advertise it though, how can we do it?
We end up with 2 options, the last one having 3 flavours.
In the first case we create 2 OSPF processes, one that will take RID of Lo111 and second that will take the RID of Lo11. In order to make sure after reload, the RID’s are preserved the OSPF process ID which will have RID of Lo111 needs a lower number than the other OSPF process; this is because when router boots it parses the commands in the same order as from “show run”.The config:
!
router ospf 1
!
router ospf 2
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.20.1 0.0.0.0 area 0
!
In the second case, with VRF we have 3 sub-options:
– put Lo111 in VRF x and run OSPF in GRT
– put Lo111 in VRF x, the rest of interfaces in VRF y and run OSPF in vrf y
– leave Lo111 in GRT, the rest of interfaces in VRF y and run OSPF in VRF y
This way the ospf process will not see the Lo111. Hmmm, but we still need to advertise the Loo111 to R2. We create another Lo101 with same ip address and put this Lo101 in GRT/VRF y/ VRF y based on the 3 sub-options. OSPF will see the interface this time; to make sure the IP address of 111.111.111.111 is not elected as RID, we put it as secondary address, since RID CANNOT be a secondary address. here are the configs:
interface Loopback1
ip address 1.1.1.1 255.255.255.255
!
interface Loopback11
ip address 11.11.11.11 255.255.255.255
!
interface Loopback101
ip address 111.111.111.111 255.255.255.255 secondary
ip address 10.10.10.10 255.255.255.255
ip ospf 2 area 0
!
interface Loopback111
ip vrf forwarding 111
ip address 111.111.111.111 255.255.255.255
!
interface FastEthernet0/0
ip address 150.10.20.1 255.255.255.0
!
router ospf 1
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 150.10.20.1 0.0.0.0 area 0
ip vrf 11
rd 11:11
!
ip vrf 111
rd 111:111
!
interface Loopback1
ip vrf forwarding 11
ip address 1.1.1.1 255.255.255.255
!
interface Loopback11
ip vrf forwarding 11
ip address 11.11.11.11 255.255.255.255
!
interface Loopback101
ip vrf forwarding 11
ip address 111.111.111.111 255.255.255.255 secondary
ip address 10.10.10.10 255.255.255.255
ip ospf 2 area 0
!
interface Loopback111
ip vrf forwarding 111
ip address 111.111.111.111 255.255.255.255
!
interface FastEthernet0/0
ip vrf forwarding 11
ip address 150.10.20.1 255.255.255.0
!
router ospf 2 vrf 11
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 150.10.20.1 0.0.0.0 area 0
ip vrf 11
rd 11:11
!
interface Loopback1
ip vrf forwarding 11
ip address 1.1.1.1 255.255.255.255
!
interface Loopback11
ip vrf forwarding 11
ip address 11.11.11.11 255.255.255.255
!
interface Loopback101
ip vrf forwarding 11
ip address 111.111.111.111 255.255.255.255 secondary
ip address 10.10.10.10 255.255.255.255
ip ospf 2 area 0
!
interface Loopback111
ip address 111.111.111.111 255.255.255.255
!
interface FastEthernet0/0
ip vrf forwarding 11
ip address 150.10.20.1 255.255.255.0
!
router ospf 1 vrf 11
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 150.10.20.1 0.0.0.0 area 0
Why did we not change the IP addresses on Lo111 (make a primary x.x.x.x and 111.111.111.111 as secondary)? The task says NOT to remove any of the existing configurations.
Hey, what’s the award for it ?
Regards,
Cristian.
Hi
one solution would be configuring two ospf processes first one would become router-id from loopback1 and the second one the id from Loopback11.
Cheers Patrick
For example:
router ospf 1
network 1.1.1.1 255.255.255.255 area 0
router osfp 2
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.0 0.0.0.255 area 0
!R1
router ospf 1
!
router ospf 2
netw 150.10.12.1 0.0.0.0 area 0
netw 1.1.1.1 0.0.0.0 area 0
netw 11.11.11.11 0.0.0.0 area 0
netw 111.111.111.111 0.0.0.0 area 0
!Best regards Janno
Okay, here we go
I know that my solution maybe is not the right one, but it doesn’t violate any rules and the final result is achieved.
1. For the first task we must use the “ip ospf network point-to-point” in order to advertise loopbacks with /32 instead of /24
2. Regarding the router-id I did it by doing this:
interface Loopback1
ip address 1.1.1.1 255.255.255.255
ip ospf network point-to-point
!
interface Loopback11
backup interface Loopback111
ip address 111.111.111.111 255.255.255.255 secondary
ip address 11.11.11.11 255.255.255.255
ip ospf network point-to-point
!
interface Loopback111
ip address 111.111.111.111 255.255.255.255
ip ospf network point-to-point
ip ospf priority 0
!
So since the Lo111 is in standby mode (IT’s not administratively shutdown!!!) It can’t be selected as Router-ID because it’s not in “up up” state. Even though the Lo11 has address 111.111.111.111 which is the highest Loopback address, the IOS doesn’t select it as router-id because it’s configured as a secondary address.
So here is the final result:
A snipped from R2
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/2] via 150.10.12.1, 00:09:15, FastEthernet1/0
111.0.0.0/32 is subnetted, 1 subnets
O 111.111.111.111 [110/2] via 150.10.12.1, 00:09:15, FastEthernet1/0
11.0.0.0/32 is subnetted, 1 subnets
O 11.11.11.11 [110/2] via 150.10.12.1, 00:09:15, FastEthernet1/0
R2#show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
11.11.11.11 1 FULL/BDR 00:00:39 150.10.12.1 FastEthernet1/0
R2#show ip ospf data
R2#show ip ospf database
OSPF Router with ID (150.10.12.2) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
11.11.11.11 11.11.11.11 618 0×80000002 0×003923 4
Keep in that way!
All the best,
Dani Petrov
R1#sh run | sec ospf
router ospf 10
log-adjacency-changes
router ospf 11
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.0 0.0.0.255 area 0
R2#sh ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
11.11.11.11 1 FULL/BDR 00:00:30 150.10.12.1 FastEthernet0/0
R1
–
router ospf 1
exit
router ospf 2
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.1 0.0.0.0 area 0
exit
From R2
–
R2(config)#do sh ip os nei
Neighbor ID Pri State Dead Time Address Interface
11.11.11.11 1 FULL/BDR 00:00:31 150.10.12.1 FastEthernet0/0
I’m actually thinking why the requirement “they should not appear as IA, E2, or E1″ is added as is my solution I don’t have to do anything to “solve” it.
Could it be erm. If I put L11 and F0/0 into VRF and use import-map to import the global routing table into VRF.
For 1 question answer
advertise all the loopbacks and interface in area 0.
For 2nd question
create ospf 1; after creating this process loopback 111 will assign its ospf id. There after create ospf 2 process and advertise all the loopbacks and it will pick loopback11.
regards
shivlu jain
So far we have about 8 different proposed solutions submitted by readers, some of which were creative, but didn’t appear to work on the IOS version that I had available to test. There have been some correct answers so far, as well as some that were close but had errors in either commands or explanations.
R1: show running-config
router ospf 1
log-adjacency-changes
!
router ospf 2
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.1 0.0.0.0 area 0
R2:show ip route
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/2] via 150.10.12.1, 00:02:57, FastEthernet0/0
111.0.0.0/32 is subnetted, 1 subnets
O 111.111.111.111 [110/2] via 150.10.12.1, 00:02:57, FastEthernet0/0
11.0.0.0/32 is subnetted, 1 subnets
O 11.11.11.11 [110/2] via 150.10.12.1, 00:02:57, FastEthernet0/0
150.10.0.0/24 is subnetted, 1 subnets
C 150.10.12.0 is directly connected, FastEthernet0/0
R2:show ip ospf neighbor
11.11.11.11 1 FULL/BDR 00:00:36 50.10.12.1 FastEthernet0/0
nice challange!
here is my solution, I was really puzzled for a couple of hours ;-=)
on R1:
Even if R1 is reloaded, ospf process 1 always “consumes” lo 111 address as router-id, so ospf process 2 will use lo 11 …
Let’s check on R2:
hope my solution is correct..
I look forward for more challenges
Marco
Create two OSPF processes on R1 in the following order:
!
router ospf 2
!
then,
!
router ospf 1
network xxxx
!
As the process 2 kicks in before process 1, it would consume the RID from Loop111 so process 1 would be left with either 1.1.1.1 or 11.11.11.11 and it would obviously pick 11.11.11.11 because two processes cannot have the same RID.
Then under process-1 you can simply advertise networks using “network” command.
Usman Latif
CCIE # 20033
Ahhh, I was a little quick to the draw for this one, I didn’t read the configuration for router 2 properly. I see now that I was supposed to use process ID 1.
r1
!
router ospf 2
!
router ospf 1
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.0 0.0.0.255 area 0
!
ospf 2 will take highest: 111.111.111.111 (since it was started first)
ospf 1 will take the next in line… which is 11.11.11.11 (since it was started second)
on R1
1.create ospf process x, where x is not equal to 1. let this ospf process x took the highest loopback ip add as router-id, which is 111.111.111.111 .
2.create ospf process 1
since 111.111.111.111 already used by ospf process x, the next highest loopback ip add which is 11.11.11.11 will be used by ospf process 1.
reload R1 to confirmed it meets the requirements.
the configuration of R1:
interface Loopback1
ip address 1.1.1.1 255.255.255.255
!
interface Loopback11
ip address 11.11.11.11 255.255.255.255
ip ospf priority 255
!
interface Loopback111
ip address 111.111.111.111 255.255.255.255
!
interface FastEthernet0/0
ip address 150.10.12.1 255.255.255.0
duplex auto
speed auto
!
!
router ospf 111
!
router ospf 1
network 0.0.0.0 255.255.255.255 area 0
!
interface Loopback1
ip address 1.1.1.1 255.255.255.255
ip ospf 65535 area 0
!
interface Loopback11
ip address 11.11.11.11 255.255.255.255
ip ospf 65535 area 0
!
interface Loopback111
ip address 111.111.111.111 255.255.255.255
ip ospf 65535 area 0
!
interface FastEthernet0/0
ip address 150.10.12.1 255.255.255.0
ip ospf 65535 area 0
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
router ospf 65535
log-adjacency-changes
!
router ospf 1
log-adjacency-changes
———————————–
Two ospf processes, since router-id has to be unique for each process, process 1 will pick highest lo111 and next process will pick next highest lo11.
Hello,
I think I should disable the loopback 111 on R1 (shutdown or no ip address). Then I should configure the ip address 111.111.111.111 255.255.255.255 as secondary on loopback 11 (the primary is still 11.11.11.11/32).
Best regards,
Krzysztof
Yipi!!! I did it.
interface Loopback1
ip address 111.111.111.111 255.255.255.255 secondary
ip address 1.1.1.1 255.255.255.255
!
interface Loopback11
backup interface Loopback111
ip address 11.11.11.11 255.255.255.255
!
interface Loopback111
ip address 111.111.111.111 255.255.255.255
!
interface FastEthernet0/0
ip address 150.10.12.1 255.255.255.0
!
router ospf 1
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.1 0.0.0.0 area 0
Nice challenge! It made me think hard on the OSPF concepts…
Yipi! I did it
interface Loopback1
ip address 111.111.111.111 255.255.255.255 secondary
ip address 1.1.1.1 255.255.255.255
!
interface Loopback11
backup interface Loopback111
ip address 11.11.11.11 255.255.255.255
!
interface Loopback111
ip address 111.111.111.111 255.255.255.255
!
interface FastEthernet0/0
ip address 150.10.12.1 255.255.255.0
duplex auto
speed auto
!
router ospf 1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.1 0.0.0.0 area 0
Good challenge! it made me think hard on the OSPF concepts…
I enjoyed this challenge.
OSPF ignores secondary IPs for router-ids as well as interfaces in different VRFs.
Quick and dirty, but it works for me in dynamips:
ip vrf VRF1
rd 1:1
interface Loopback1
ip address 1.1.1.1 255.255.255.255
ip ospf 1 area 0
!
interface Loopback11
ip address 111.111.111.111 255.255.255.255 secondary
ip address 11.11.11.11 255.255.255.255
ip ospf 1 area 0
!
interface Loopback111
ip vrf forwarding VRF1
ip address 111.111.111.111 255.255.255.255
!
interface FastEthernet0/0
ip address 150.10.12.1 255.255.255.0
ip ospf 1 area 0
duplex auto
speed auto
router ospf 1
log-adjacency-changes
Okay, after reading your post, I decided to make another shoot. The logic is simple. On router R1 I configured this:
router ospf 1
log-adjacency-changes
!
router ospf 10
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.0 0.0.0.255 area 0
the remaining config is not changed
interface Loopback1
ip address 1.1.1.1 255.255.255.255
ip ospf network point-to-point
interface Loopback11
ip address 11.11.11.11 255.255.255.255
ip ospf network point-to-point
interface Loopback111
ip address 111.111.111.111 255.255.255.255
ip ospf network point-to-point
Since each OSPF process needs an unique IP address for a RID the first process will get the highest Lo address and the second process (ospf 10) will use the next available address (either Loopback as in this scenario or the highest non-loopback interface address)
This solution imo is clear enough and should fulfill your terms
All the best,
Dani Petrov
Here’s a config I tested that seems to work with 12.4(24)T AdvEnt. Can’t wait to see what others came up with!
R1:
interface Loopback1
ip address 1.1.1.1 255.255.255.255
shutdown
!
interface Loopback11
ip address 11.11.11.11 255.255.255.255
!
interface Loopback111
ip address 111.111.111.111 255.255.255.255
shutdown
!
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
!
kron policy-list NO_SHUT
cli “event manager run NO_SHUT”
!
kron occurrence EEM_STARTUP at 0:01 Sun recurring system-startup
policy-list NO_SHUT
!
!
event manager applet TRY
event none
action 1.0 cli command “en”
action 2.0 cli command “configure terminal”
action 3.0 cli command “interface Loopback1″
action 4.0 cli command “no shut”
action 5.0 cli command “interface Loopback111″
action 6.0 cli command “no shut”
!
!
** UPDATED TO INCLUDE A COMMAND AFTER EXITING CONFIG MODE **
Here’s a config I tested that seems to work with 12.4(24)T AdvEnt. Can’t wait to see what others came up with!
R1:
interface Loopback1
ip address 1.1.1.1 255.255.255.255
shutdown
!
interface Loopback11
ip address 11.11.11.11 255.255.255.255
!
interface Loopback111
ip address 111.111.111.111 255.255.255.255
shutdown
!
!
router ospf 1
log-adjacency-changes
network 0.0.0.0 255.255.255.255 area 0
!
!
kron policy-list NO_SHUT
cli “event manager run NO_SHUT”
!
kron occurrence EEM_STARTUP at 0:01 Sun recurring system-startup
policy-list NO_SHUT
!
!
event manager applet TRY
event none
action 1.0 cli command “en”
action 2.0 cli command “configure terminal”
action 3.0 cli command “interface Loopback1″
action 4.0 cli command “no shut”
action 5.0 cli command “interface Loopback111″
action 6.0 cli command “no shut”
!
!
end
event manager run NO_SHUT
It works creating 3 ospf processes in R1. Each one of the processes took his own router-id from each of the loopbacks.
After clearing all of the processes the router-ids remains the same.
cheers,
Diego.
I know, as a solution, it’s a very bad one.
R1#show runn | b ospf
router ospf 1
log-adjacency-changes
!
router ospf 2
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.1 0.0.0.0 area 0
R1 config
*************************************************************
interface Loopback1
ip address 1.1.1.1 255.255.255.255
!
interface Loopback11
ip address 11.11.11.11 255.255.255.255
!
interface Loopback111
ip address 111.111.111.111 255.255.255.255
!
interface FastEthernet0/0
ip address 150.10.12.1 255.255.255.0
duplex auto
speed auto
!
router ospf 10
log-adjacency-changes
!
router ospf 100
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.0 0.0.0.255 area 0
*************************************************************
R2 config
*************************************************************
interface FastEthernet0/0
ip address 150.10.12.2 255.255.255.0
duplex auto
speed auto
router ospf 1
log-adjacency-changes
network 150.10.12.0 0.0.0.255 area 0
*************************************************************
* First OSPF process i.e. OSPF 10 will use highest loopback address (loopback 111) and second OSPF process i.e. OSPF 100 will not use that loopback 111, so second highest loopback 11 will be used.
* To make these loopback ip addresses appear in adjacent routing table as OSPF routes, they should be in same area and come via LSA 1 or 2 only.
Hi
configuration on R1
first configure first ospf process, do not define any networks
router ospf 1
highest loopback address is chosen as router-id (111.111.111.111)
next configure next ospf process
router ospf 100
next highest loopback interface is selected as
router-id (11.11.11.11)
configure networks on ospf process 100
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.1 0.0.0.0 area 0
(two processes cannot use the same router-id)
Full configuration on 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
!
!
ip cef
!
!
interface Loopback1
ip address 1.1.1.1 255.255.255.255
!
interface Loopback11
ip address 11.11.11.11 255.255.255.255
!
interface Loopback111
ip address 111.111.111.111 255.255.255.255
!
interface Ethernet0/0
ip address 150.10.12.1 255.255.255.0
half-duplex
!
!
router ospf 1
log-adjacency-changes
!
router ospf 100
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.1 0.0.0.0 area 0
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
login
router ospf 1 must be defined before router ospf 100
R2#sh ip route
Codes: 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
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/11] via 150.10.12.1, 00:13:05, Ethernet0/0
111.0.0.0/32 is subnetted, 1 subnets
O 111.111.111.111 [110/11] via 150.10.12.1, 00:13:05, Ethernet0/0
11.0.0.0/32 is subnetted, 1 subnets
O 11.11.11.11 [110/11] via 150.10.12.1, 00:13:05, Ethernet0/0
150.10.0.0/24 is subnetted, 1 subnets
C 150.10.12.0 is directly connected, Ethernet0/0
R2#sh ip ospf ne
R2#sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
11.11.11.11 1 FULL/BDR 00:00:39 150.10.12.1 Ethernet0/0
R2#
Hi!
Solution:
Configure two routing processes on router 1. Upon creating the first routing process,(Call it OSPF 100) it will grab the 111.111.111.111 loopback as it’s router-id. Go ahead and create the second OSPF process(Call it OSPF 1) and it will grab the 11.11.11.11 as the router-id. Advertise the connected interface and all loopback interfaces into the second OSPF process via the network statement.
Erick B CCNA
Marvin, Is the solution dependent on IOS version, I have been trying to figure out the solution on 2500′s with 12.2(15)T, Is this a feature dependent solution, How do you override the default behavior of highest
loopback in ospf, If you are not using the router-id command, I would think this is the answer to the Challenge, I can say I do not know how do this, but I am guessing the answer is easy.
R1 :
interface Loopback1
ip address 1.1.1.1 255.255.255.255
!
interface Loopback11
ip address 11.11.11.11 255.255.255.255
!
interface Loopback111
ip address 111.111.111.111 255.255.255.255
!
interface FastEthernet0/0
ip address 150.10.12.1 255.255.255.0
!
router ospf 1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.0 0.0.0.255 area 0
!
router ospf 2
router-id 111.111.111.111
log-adjacency-changes
———————-
R2 :
interface FastEthernet0/0
ip address 150.10.12.2 255.255.255.0
!
router ospf 1
log-adjacency-changes
network 150.10.12.0 0.0.0.255 area 0
!
———————-
R2# sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
11.11.11.11 1 FULL/BDR 00:00:39 150.10.12.1 FastEthernet0/0
R2#sh ip route
Codes: 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
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/2] via 150.10.12.1, 00:02:15, FastEthernet0/0
111.0.0.0/32 is subnetted, 1 subnets
O 111.111.111.111 [110/2] via 150.10.12.1, 00:02:15, FastEthernet0/0
11.0.0.0/32 is subnetted, 1 subnets
O 11.11.11.11 [110/2] via 150.10.12.1, 00:02:15, FastEthernet0/0
150.10.0.0/24 is subnetted, 1 subnets
C 150.10.12.0 is directly connected, FastEthernet0/0
Wrong output on first try…
R1 :
interface Loopback1
ip address 1.1.1.1 255.255.255.255
!
interface Loopback11
ip address 11.11.11.11 255.255.255.255
!
interface Loopback111
ip address 111.111.111.111 255.255.255.255
!
interface FastEthernet0/0
ip address 150.10.12.1 255.255.255.0
!
router ospf 1
log-adjacency-changes
!
router ospf 2
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.0 0.0.0.255 area 0
———————-
R2 :
interface FastEthernet0/0
ip address 150.10.12.2 255.255.255.0
!
router ospf 1
log-adjacency-changes
network 150.10.12.0 0.0.0.255 area 0
!
———————-
R2# sh ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
11.11.11.11 1 FULL/BDR 00:00:39 150.10.12.1 FastEthernet0/0
R2#sh ip route
Codes: 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
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/2] via 150.10.12.1, 00:02:15, FastEthernet0/0
111.0.0.0/32 is subnetted, 1 subnets
O 111.111.111.111 [110/2] via 150.10.12.1, 00:02:15, FastEthernet0/0
11.0.0.0/32 is subnetted, 1 subnets
O 11.11.11.11 [110/2] via 150.10.12.1, 00:02:15, FastEthernet0/0
150.10.0.0/24 is subnetted, 1 subnets
C 150.10.12.0 is directly connected, FastEthernet0/0
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
interface Loopback11
ip address 11.11.11.11 255.255.255.255
!
interface Loopback111
ip address 111.111.111.111 255.255.255.255
!
interface FastEthernet0/0
ip address 150.10.12.1 255.255.255.0
duplex auto
speed auto
!
router ospf 2
router-id 111.111.111.111
log-adjacency-changes
!
router ospf 1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.1 0.0.0.0 area 0
!
ip http server
ip forward-protocol nd
!
!
!
the idea is to use the lo111 in another ospf process using the router-id command
Heres my take on it
Config on R1 :
int loop 0
descr bogus network for ospf 1 to run
ip address 2.2.2.2 255.255.255.255
interface Loopback1
ip address 1.1.1.1 255.255.255.255
interface Loopback11
ip address 11.11.11.11 255.255.255.255
interface Loopback111
ip address 111.111.111.111 255.255.255.255
interface FastEthernet0/0
ip address 150.10.12.1 255.255.255.0
no shut
Router ospf 1
network 2.2.2.0 0.0.0.255 area 0
Router ospf 10
netwo 150.10.12.0 0.0.0.255 area 0
netwo 1.1.1.0 0.0.0.255 area 0
netwo 11.11.11.0 0.0.0.255 area 0
netwo 111.111.111.0 0.0.0.255 area 0
!
Now, the ospf process 1 takes the 111.111.111.111 as its router-id.
and process 10, wich im using to form adjencencie with R2, is getting router-ID 11.11.11.11 as demanded.
The only buggah, is that on R2 is see the right addresses as /32 hosts pr. default, but Im also seeing the classfull bit 1.0.0.0/8.
It wasnt mentioned that this was NOT ok, so Im just leaving it there
Cool task! Thx – bring on some more please!!
/KelvinDam
This is what I found :
By configuring an additional ospf process, the 111.111.111.111 loopback address will not be available for the second ospf process. As a result, this process will then have the desired router-id of 11.11.11.11. The required routers are then simply advertised as intra-area router using the network command.
router ospf 1
log-adjacency-changes
!
router ospf 2
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.1 0.0.0.0 area 0
!
R2#sh ip ro
Codes: 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
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/11] via 150.10.12.1, 00:00:30, Ethernet0/0
111.0.0.0/32 is subnetted, 1 subnets
O 111.111.111.111 [110/11] via 150.10.12.1, 00:00:30, Ethernet0/0
11.0.0.0/32 is subnetted, 1 subnets
O 11.11.11.11 [110/11] via 150.10.12.1, 00:00:30, Ethernet0/0
150.10.0.0/24 is subnetted, 1 subnets
C 150.10.12.0 is directly connected, Ethernet0/0
R2#
R2#sh ip osp n
Neighbor ID Pri State Dead Time Address Interface
11.11.11.11 1 FULL/BDR 00:00:31 150.10.12.1 Ethernet0/0
R2#
First the confirmation:
r2#sh ip ospf nei
Neighbor ID Pri State Dead Time Address Interface
11.11.11.11 1 FULL/BDR 00:00:32 150.10.12.1 Ethernet0/0
r2#sh ip route ospf
1.0.0.0/32 is subnetted, 1 subnets
O 1.1.1.1 [110/11] via 150.10.12.1, 00:02:24, Ethernet0/0
111.0.0.0/32 is subnetted, 1 subnets
O 111.111.111.111 [110/11] via 150.10.12.1, 00:02:24, Ethernet0/0
11.0.0.0/32 is subnetted, 1 subnets
O 11.11.11.11 [110/11] via 150.10.12.1, 00:02:24, Ethernet0/0
Now the important parts of the R1 config:
interface Loopback1
ip address 1.1.1.1 255.255.255.255
!
interface Loopback11
ip address 11.11.11.11 255.255.255.255
!
interface Loopback111
ip address 111.111.111.111 255.255.255.255
!
interface Loopback888
ip vrf forwarding TEST
ip address 111.111.111.111 255.255.255.255
!
interface Vlan1
ip address 150.10.12.1 255.255.255.0
!
router ospf 2 vrf TEST
log-adjacency-changes
network 111.111.111.111 0.0.0.0 area 0
!
router ospf 1
log-adjacency-changes
network 1.1.1.1 0.0.0.0 area 0
network 11.11.11.11 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
network 150.10.12.0 0.0.0.255 area 0
As usual after hitting submit I found one line missing:
ip vrf TEST
okay, next attempt at an answer since when i labbed up the dampening thing it didn’t work. create a new ospf process 2 and have everything be a part of that process.
process 1 will use 111.111.111 and then process 2 will use 11.11.11.11 because router-id’s have to be unique.
-steve_m
On R1
Router ospf 1
network 11.11.11.11 0.0.0.0 area 0
network 1.1.1.1 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
passive-interface lo1
passive-interface lo111
R1
Router ospf 1
router-id 11.11.11.11
network 11.11.11.11 0.0.0.0 area 0
network 1.1.1.1 0.0.0.0 area 0
network 111.111.111.111 0.0.0.0 area 0
interface Loopback11
ip address 11.11.11.11 255.255.255.255
ip ospf priority 10
Rgrd, Ivo