Sie sind auf Seite 1von 12

20 Labs OSPF

R4 creates LSA Type 7 for area 2 NSSA and LSA Type 5 for area 1 with the same Link
State ID or the same destination 5.5.5.0/24.
The LSA Type 7 is flooded in area 2 NSSA while the LSA Type 5 is flooded in all
areas except the area 2.
The RFC 3101 section 2.4 Originating Type-7 LSAs says:
When an NSSA border router originates both a Type-5 LSA and a Type-7
LSA for the same network, then the P-bit must be clear in the Type-7
LSA so that it isn't translated into a Type-5 LSA by another NSSA
border router.
According to the RFC 3101 R4 will clear the P-bit as a result R2 cannot translate
this LSA 7.
The output of the show ip ospf database nssa-external 5.5.5.0 command displays the
LSA Type 7 learned by R2 from R4 with P-bit cleared as mentioned by the line "No
Type 7/5 translation":
R2#show ip ospf database nssa-external 5.5.5.0
OSPF Router with ID (2.2.2.2) (Process ID 1)
Type-7 AS External Link States (Area 2)
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 344
Options: (No TOS-capability, No Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 5.5.5.0 (External Network Number )
Advertising Router: 4.4.4.4
LS Seq Number: 80000001
Checksum: 0x9EE0
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
R2#
Below we can see the LSA Type 5 received from R4 the ASBR through area 1:
R1#show ip ospf database external 5.5.5.0
OSPF Router with ID (1.1.1.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 243
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 5.5.5.0 (External Network Number )
Advertising Router: 4.4.4.4
LS Seq Number: 80000001
Checksum: 0xBAC6

20 Labs OSPF
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
R1#
Because R4 is originating LSA Type 5 in normal area 1, the ABR R3 advertises LSA
Type 4 with Link State ID 4.4.4.4 to tell to R1 how to reach the ASBR R4 with RID
4.4.4.4:
R1#show ip ospf database asbr-summary
OSPF Router with ID (1.1.1.1) (Process ID 1)
Summary ASB Link States (Area 0)
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 605
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
Link State ID: 4.4.4.4 (AS Boundary Router address)
Advertising Router: 3.3.3.3
LS Seq Number: 80000001
Checksum: 0xCC49
Length: 28
Network Mask: /0
MTID: 0
Metric: 10
R1#
Therefore R1 will receive the LSA 5 flooded by R4 in the area 1 and installs an
OE2 route through the path R3-R4:
R1#show ip route | inc 5.5.5.0
O E2
5.5.5.0 [110/20] via 13.0.0.3, 00:06:22, FastEthernet0/1
R1#
The traceroute shown that the packet goes through R3:
R1#tracer 5.5.5.5
Type escape sequence to abort.
Tracing the route to 5.5.5.5
VRF info: (vrf in name/id, vrf out name/id)
1 13.0.0.3 68 msec 80 msec 60 msec
2 34.0.0.4 92 msec 88 msec 84 msec
3 45.0.0.5 108 msec 124 msec 132 msec
R1#
Now if the Link R1-R3 fails, R1 will never learn the external route through R2
because R2 is not allowed to translate the LSA 7 learned through area 2 therefore
R1 loses the reachability to 5.5.5.0/24:
R1(config)#int fa0/1
R1(config-if)#shu
R1(config-if)#shutdown

20 Labs OSPF

R1#show ip route 5.5.5.0


% Network not in table
R1#
First possible solution: configure area 1 as NSSA:
R3(config)#router osp 1
R3(config-router)#area 1 nssa
R3(config)#router osp 1
R3(config-router)#area 1 nssa
What happen?
R4 creates two LSAs 7 for 5.5.5.0/24 network.
1-LSA 7 through area 2 with Forward Address "IP address of the interface's R4
connected to R2" 24.0.0.4 with P-bit set.
1-LSA 7 through area 1 with Forward Address "IP address of the interface's R4
connected to R3" 34.0.0.4 with P-bit set.
R4#show ip ospf database nss 5.5.5.0
OSPF Router with ID (4.4.4.4) (Process ID 1)
Type-7 AS External Link States (Area 1)
LS age: 82
Options: (No TOS-capability, Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 5.5.5.0 (External Network Number )
Advertising Router: 4.4.4.4
LS Seq Number: 80000001
Checksum: 0xD57B
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 34.0.0.4
External Route Tag: 0

Type-7 AS External Link States (Area 2)


LS age: 82
Options: (No TOS-capability, Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 5.5.5.0 (External Network Number )
Advertising Router: 4.4.4.4
LS Seq Number: 80000002
Checksum: 0x65F4
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 24.0.0.4

20 Labs OSPF
External Route Tag: 0
R4#

R2 and R3 translates the LSAs 7 received via area 2 and area 1 respectively.
1-R2 orignates an LSA 5 with the same FA 24.0.0.4 and floods this LSA 5 into
backbone area 0.
2-R3 orignates an LSA 5 with the same FA 34.0.0.4 and floods this LSA 5 into
backbone area 0.
R1 receives two LSAs Type 5 from R2 and R3 with two different Forward Addresses:
R1#show ip ospf database ext 5.5.5.0
OSPF Router with ID (1.1.1.1) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 226
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 5.5.5.0 (External Network Number )
Advertising Router: 2.2.2.2
LS Seq Number: 80000001
Checksum: 0x3835
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 24.0.0.4
External Route Tag: 0
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 211
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 5.5.5.0 (External Network Number )
Advertising Router: 3.3.3.3
LS Seq Number: 80000001
Checksum: 0x88D6
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 34.0.0.4
External Route Tag: 0
R1#
R1 looks the best inter-area route to reach the two Forward Addresses.
1- The cost to reach the FA 24.0.0.4 listed in the LSA 5's R2 is 110 (cost's link
R1-R2 + cost's link R2-R4 = 10+100).

20 Labs OSPF
R1#show ip route 24.0.0.0
Routing entry for 24.0.0.0/24, 1 known subnets
O IA
24.0.0.0 [110/110] via 12.0.0.2, 00:15:19, FastEthernet0/0
R1#
2- The cost to reach the FA 34.0.0.4 listed in the LSA 5's R3 is 110 (cost's link
R1-R3 + cost's link R3-R4= 100+10).
R1#show ip route 34.0.0.0
Routing entry for 34.0.0.0/24, 1 known subnets
O IA
34.0.0.0 [110/110] via 13.0.0.3, 00:14:30, FastEthernet0/1
R1#
R1 finds that the costs to reach the two FA are identical and equal to 110
therefore it installs a load balancing through R2 and R3 to reach 5.5.5.0 network.
The forward metric 110 in the show ip route 5.5.5.0 output below represents the
cost to reach the Forward Addresses 24.0.0.4 and 34.0.0.4:
R1#show ip route 5.5.5.0
Routing entry for 5.5.5.0/24
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 110
Last update from 13.0.0.3 on FastEthernet0/1, 00:08:19 ago
Routing Descriptor Blocks:
13.0.0.3, from 3.3.3.3, 00:08:19 ago, via FastEthernet0/1
Route metric is 20, traffic share count is 1
* 12.0.0.2, from 2.2.2.2, 00:08:35 ago, via FastEthernet0/0
Route metric is 20, traffic share count is 1
R1#
Second possible solution: We tell to R2 to advertise a default route using the
default-information originate always command, and if the link R1-R3 fails, R1 can
use the default route via R2 to reach 5.5.5.0/24 network.
R3(config)#router osp 1
R3(config-router)#no area 1 nssa
R4(config)#router osp 1
R4(config-router)#no area 1 nssa
R2(config)#router ospf 1
R2(config-router)#default-information originate always
The routing table of R1 shown the default route installed:
R1#show ip route ospf | beg Gate
Gateway of last resort is 12.0.0.2 to network 0.0.0.0
O*E2
O E2
O IA
O IA
O E2
R1#

0.0.0.0/0 [110/1] via 12.0.0.2, 00:00:36, FastEthernet0/0


5.0.0.0/24 is subnetted, 1 subnets
5.5.5.0 [110/20] via 13.0.0.3, 00:01:34, FastEthernet0/1
24.0.0.0/24 is subnetted, 1 subnets
24.0.0.0 [110/110] via 12.0.0.2, 00:20:32, FastEthernet0/0
34.0.0.0/24 is subnetted, 1 subnets
34.0.0.0 [110/110] via 13.0.0.3, 00:18:31, FastEthernet0/1
45.0.0.0/24 is subnetted, 1 subnets
45.0.0.0 [110/20] via 13.0.0.3, 00:01:34, FastEthernet0/1

20 Labs OSPF
If the link R1-R3 fails, R1 can use the default route to reach 5.5.5.0/24 through
R2:
R1(config)#int fa0/1
R1(config-if)#shu
R1(config-if)#shutdown
R1(config-if)#
R1#ping 5.5.5.5
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 5.5.5.5, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 96/105/128 ms
R1#
R1#tracer 5.5.5.5
Type escape sequence to abort.
Tracing the route to 5.5.5.5
VRF info: (vrf in name/id, vrf out name/id)
1 12.0.0.2 244 msec 192 msec 28 msec
2 24.0.0.4 448 msec 296 msec 224 msec
3 45.0.0.5 272 msec 272 msec 244 msec
R1#
Let's remove the default-information originate always command:
R2(config)#router ospf 1
R2(config-router)#no default-information originate always
Let's see what happen for R2.
R2 will learn an LSA 7 from R4 through area 2 and and an LSA 5 from R4 through 0
as shown by the show ip ospf database external 5.5.5.0 and show ip ospf database
nssa-external 5.5.5.0 commands:
R2#show ip ospf database external 5.5.5.0
OSPF Router with ID (2.2.2.2) (Process ID 1)
Type-5 AS External Link States
LS age: 1269
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 5.5.5.0 (External Network Number )
Advertising Router: 4.4.4.4
LS Seq Number: 80000001
Checksum: 0xBAC6
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
R2#
R2#show ip ospf database nssa-external 5.5.5.0
OSPF Router with ID (2.2.2.2) (Process ID 1)

20 Labs OSPF

Type-7 AS External Link States (Area 2)


Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 344
Options: (No TOS-capability, No Type 7/5 translation, DC, Upward)
LS Type: AS External Link
Link State ID: 5.5.5.0 (External Network Number )
Advertising Router: 4.4.4.4
LS Seq Number: 80000001
Checksum: 0x9EE0
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
R2#
R2 has two ways or two paths to reach R4:
1-It can reach the ASBR R4 through the LSA Type 1 intra-area route advertised by
R4 via the NSSA area 2.
2-It can reach the ASBR R4 through the LSA Type 4 inter-area route advertised by
R3 via the area 0.
Since with OSPF, an intra-route is always preferred than an inter-area route
regardless the cost, therefore it installs the NSSA external route learned through
area 2 as shown by the show ip route command:
R2#show ip route | inc 5.5.5.0
O N2
5.5.5.0 [110/20] via 24.0.0.4, 00:11:43, FastEthernet0/1
R2#
Let's dissect the cost of the intra-area and inter-area routes:
For the path through the NSSA area 2:
1-R2 looks the LSA Type 1 advertised by R4 to locate the ASBR as shown by the show
ip ospf database router adv 4.4.4.4 command.
2-And R2 looks its LSA Type 1 to find the cost of 100 to reach the ASBR R4 as
shown by the show ip ospf data router self-originate | beg Area 2.
R2#show ip ospf database router adv 4.4.4.4
OSPF Router with ID (2.2.2.2) (Process ID 1)
Router Link States (Area 2)
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 1378
Options: (No TOS-capability, DC)
LS Type: Router Links
Link State ID: 4.4.4.4
Advertising Router: 4.4.4.4
LS Seq Number: 80000002
Checksum: 0x73FA
Length: 36
AS Boundary Router

20 Labs OSPF
Number of Links: 1
Link connected to: a Transit Network
(Link ID) Designated Router address: 24.0.0.4
(Link Data) Router Interface address: 24.0.0.4
Number of MTID metrics: 0
TOS 0 Metrics: 100

R2#
For the path through area 1:
1-R2 looks the cost 10 listed in the LSA Type 4 advertised by R3 as shown by the
show ip os data asbr-summary command.
2-R2 looks the cost 110 listed in the show ip ospf border-routers output and adds
this cost to the cost listed in the LSA Type 4's R3, 110+10=120.
R2#show ip os data asbr-summary
OSPF Router with ID (2.2.2.2) (Process ID 1)
Summary ASB Link States (Area 0)
LS age: 1305
Options: (No TOS-capability, DC, Upward)
LS Type: Summary Links(AS Boundary Router)
Link State ID: 4.4.4.4 (AS Boundary Router address)
Advertising Router: 3.3.3.3
LS Seq Number: 80000001
Checksum: 0xCC49
Length: 28
Network Mask: /0
MTID: 0
Metric: 10
R2#
R2#show ip ospf border-routers
OSPF Router with ID (2.2.2.2) (Process ID 1)

Base Topology (MTID 0)


Internal Router Routing Table
Codes: i - Intra-area route, I - Inter-area route
i 4.4.4.4 [100] via 24.0.0.4, FastEthernet0/1, ASBR, Area 2, SPF 3
i 3.3.3.3 [110] via 12.0.0.1, FastEthernet0/0, ABR, Area 0, SPF 11
R2#
So finally:
1-The cost to reach the ASBR R4 through area 2 (LSA Type 1) is 100.
2-The cost to reach the ASBR R4 through area 0 (LSA Type 4) is 120.
Remember that R2 prefers to reach the ASBR R4 through LSA Type 1 (intra-area
route) than LSA Type 4 (inter-area route) regardless the cost.
Let's confirm by increasing the cost toward R4 through area 2 to 65000:

20 Labs OSPF
R2(config)#int fa0/1
R2(config-if)#ip osp cost 65000
Now R2 has a cost of 65000 to reach R4 via the LSA Type 1 (area 2):
R2#show ip ospf data router self-originate | inc Area 2|Metric
TOS 0 Metrics: 10
Router Link States (Area 2)
TOS 0 Metrics: 65000
R2#
R2#show ip ospf border-routers
OSPF Router with ID (2.2.2.2) (Process ID 1)

Base Topology (MTID 0)


Internal Router Routing Table
Codes: i - Intra-area route, I - Inter-area route
i 4.4.4.4 [65000] via 24.0.0.4, FastEthernet0/1, ASBR, Area 2, SPF 6
i 3.3.3.3 [110] via 12.0.0.1, FastEthernet0/0, ABR, Area 0, SPF 16
R2#
Finally we get the following costs of each path to reach the ASBR R4:
1-The cost to reach the ASBR R4 through area 2 (LSA Type 1) is 65000.
2-The cost to reach the ASBR R4 through area 0 (LSA Type 4) is 120.
Even if the cost of the inter-area route through area 0 is better than the cost of
the intra-route through area 2, R2 prefers always the intra-route and it installs
the NSSA external route through area 2 as shown by the show ip route command:
R2#show ip route | inc 5.5.5.0
O N2
5.5.5.0 [110/20] via 24.0.0.4, 00:50:06, FastEthernet0/1
R2#
Let's reconfigure the fa0/1 interface with a cost 100:
R2(config)#int fa0/1
R2(config-if)#ip osp cost 100
Now let's confirm with another way by changing the RFC implemented by R2.
By default R2 uses the RFC 3101 for the path selection of external prefix as shown
by the show ip ospf command:
R2#show ip ospf | inc RFC
Supports NSSA (compatible with RFC 3101)
R2#
RFC 3101 says:
If the current LSA is functionally the same as an
installed LSA (i.e., same destination, cost and non-zero
forwarding address) then apply the following priorities in
deciding which LSA is preferred:
1. A Type-7 LSA with the P-bit set.

10

20 Labs OSPF

2. A Type-5 LSA.
3. The LSA with the higher router ID.
We can from the RFC 3101 that the ON2 route is preferred than the OE2 route if
they have same destination and cost.
Now let's see what RFC 1587 says:
When a type-5 LSA and a type-7 LSA are found to have the
same type and an equal distance, the following priorities
apply (listed from highest to lowest) for breaking the tie.
a. Any type 5 LSA.
b. A type-7 LSA with the P-bit set and the forwarding
address non-zero.
c. Any other type-7 LSA.
We can see from RFC 1587 that the OE2 route is preferred than the ON2 route if
they have the same cost toward the ASBR:
Now we change the compatible RFC 3101 et use the older RFC 1587 and configure the
cost of fa0/1 interface's R2 to 120:
R2(config)#int fa0/1
R2(config-if)#ip osp cost 120
R2#show ip ospf data router self-originate | inc Area 2|Metric
TOS 0 Metrics: 10
Router Link States (Area 2)
TOS 0 Metrics: 120
R2#
R2#show ip ospf border-routers
OSPF Router with ID (2.2.2.2) (Process ID 1)

Base Topology (MTID 0)


Internal Router Routing Table
Codes: i - Intra-area route, I - Inter-area route
i 4.4.4.4 [120] via 24.0.0.4, FastEthernet0/1, ASBR, Area 2, SPF 4
i 3.3.3.3 [110] via 12.0.0.1, FastEthernet0/0, ABR, Area 0, SPF 4
R2#
We have the same cost to reach the ASBR R4 through area 2 and area 0:
1-The cost to reach the ASBR R4 through area 2 (LSA Type 1) is 120.
2-The cost to reach the ASBR R4 through area 0 (LSA Type 4) is 120.
Now let's enable the RFC 1587 on R2:
R2(config)#router ospf 1
R2(config-router)#compatible rfc1587
R2#show ip ospf | inc RFC

11

20 Labs OSPF
Supports NSSA (compatible with RFC 1587)
R2#
Even if R2 is running RFC 1587 (LSA 5 or OE2 route is preferred than LSA 7 or ON2
route), it prefers still the ON2 route (or the LSA Type 7), because the intra-area
route (LSA Type 1) is always preferred than the inter-area route (LSA Type 4):
R2#show ip route | inc 5.5.5.0
O N2
5.5.5.0 [110/20] via 24.0.0.4, 00:03:22, FastEthernet0/1
R2#
What about R3?
R3 learns an LSA Type 5 from R4 through Area 1 only, it will not learn the LSA
Type 5 through area 0 since R2 cannot translate the LSA 7 into LSA 5, therefore R3
installs the path to R4 directly:
R3#show ip ospf database external 5.5.5.0
OSPF Router with ID (3.3.3.3) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA in topology Base with MTID 0
LS age: 1307
Options: (No TOS-capability, DC, Upward)
LS Type: AS External Link
Link State ID: 5.5.5.0 (External Network Number )
Advertising Router: 4.4.4.4
LS Seq Number: 80000001
Checksum: 0xBAC6
Length: 36
Network Mask: /24
Metric Type: 2 (Larger than any link state path)
MTID: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
R3#
R3#show ip osp data ex adv 2.2.2.2
OSPF Router with ID (3.3.3.3) (Process ID 1)
R3#
R3#show ip route | inc 5.5.5.0
O E2
5.5.5.0 [110/20] via 34.0.0.4, 00:23:25, FastEthernet0/1
R3#

12

Das könnte Ihnen auch gefallen