Time for the next Junos post!
Here is our lab image for this post.
Ok, first thing we need to do is rollback to our rescue config so we start on a clean slate:
R4:
R4#configure replace flash:base.txt
J1:
[edit]
jfry@J1# rollback rescue
load complete
[edit]
jfry@J1# commit and-quit
commit complete
Exiting configuration mode
J2:
[edit]
jfry@J2# rollback rescue
load complete
[edit]
jfry@J2# commit and-quit
commit complete
Exiting configuration mode
J3:
[edit]
jfry@J3# rollback rescue
load complete
[edit]
jfry@J3# commit and-quit
commit complete
Exiting configuration mode
OK, time to configure Area 0 between J1, J2, and J3:
J1:
[edit]
jfry@J1# set protocols ospf area 0 interface ge-0/0/0
[edit]
jfry@J1# set protocols ospf area 0 interface fe-0/0/2
[edit]
jfry@J1# set protocols ospf area 0 interface lo0.0 passive
[edit]
jfry@J1# commit and-quit
Ok, J2 time:
[edit]
jfry@J2# set protocols ospf area 0 interface lo0.0 passive
[edit]
jfry@J2# set protocols ospf area 0 interface ge-0/0/0
[edit]
jfry@J2# set protocols ospf area 0 interface ge-0/0/1
[edit]
jfry@J2# commit and-quit
And now J3:
[edit]
jfry@J3# set protocols ospf area 0 interface lo0.0 passive
[edit]
jfry@J3# set protocols ospf area 0 interface fe-0/0/1
[edit]
jfry@J3# set protocols ospf area 0 interface fe-0/0/2
[edit]
jfry@J3# commit and-quit
Now if we look at our ospf neighbors, we should be all neighbored up!
jfry@J1> show ospf neighbor
Address Interface State ID Pri Dead
192.168.13.3 fe-0/0/2.0 Full 3.3.3.3 128 33
192.168.12.2 ge-0/0/0.0 Full 2.2.2.2 128 39
jfry@J1>
Good, now we need to configure J1 fe-0/0/7 in Area 1 and R4 in Area 1.
R4 first:
R4(config)#router ospf 1
R4(config-router)#net 192.168.14.4 0.0.0.0 a 1
R4(config-router)#net 4.4.4.4 0.0.0.0 a 1
R4(config-router)#
And now J1:
[edit]
jfry@J1# set protocols ospf area 1 interface fe-0/0/7
[edit]
jfry@J1# commit and-quit
And now R4 should be able to ping R3 loopback:
R4#p 3.3.3.3 so l0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2 seconds:
Packet sent with a source address of 4.4.4.4
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/1/4 ms
R4#
Good! That is multi-area OSPF!
Time to configure Area 1 as a Stub area!
R4 up first!
R4(config)#router ospf 1
R4(config-router)#area 1 stub
R4(config-router)#
And now J1:
[edit]
jfry@J1# set protocols ospf area 1 stub
[edit]
jfry@J1# commit and-quit
And there you have it, stub configured!
Ok, now time to make area 1 a NSSA area.
First, we need to create an exit point from R4, for this we will add a static null route for 200.0.0.0/8.
R4#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R4(config)#ip route 200.0.0.0 255.0.0.0 null 0
Now we need to remove the STUB command from OSPF
R4(config)#router ospf 1
R4(config-router)#no area 1 stub
And now make it a NSSA area
R4(config-router)#area 1 nssa
And then redistribute our static subnets
R4(config-router)#redistribute static subnets
R4(config-router)#^Z
R4#
Ok, now we need to make the change on J1:
[edit]
jfry@J1# set protocols ospf area 1 nssa
[edit]
jfry@J1# commit and-quit
Ok, now J3 should have a route to 200.0.0.0/8
jfry@J3> show route 200.0.0.0/8
inet.0: 12 destinations, 12 routes (12 active, 0 holddown, 0 hidden)
+ = Active Route, – = Last Active, * = Both
200.0.0.0/8 *[OSPF/150] 00:00:14, metric 20, tag 0
> to 192.168.13.1 via fe-0/0/2.0
There we go!