I was labbing some NSSA today and I was wondering how the OSPF ASBR chose the forward address since it seem to appear on the opposite side of traffic flow. Example:
R3----SW1----R6
SW1 is the ASBR (redistributing it's loopback). Traffic was flowing through R6, but the address pointing to R3 was the "forward address". It doesn't really matter as long as the link is in OSPF but it can impact metric calculations since SW1's interface cost to R3 will be included.
I did a short search on GS and RFC2328 but could not find anything. I had a guess it was the lowest IP in OSPF on the router and it turns out that is right:
SW1#show run | sec router ospf
router ospf 1
router-id 11.11.11.11
log-adjacency-changes
area 2 nssa
redistribute connected metric-type 1 subnets route-map con2ospf
network 2.0.0.1 0.0.0.0 area 2
network 192.168.37.7 0.0.0.0 area 2
network 192.168.67.7 0.0.0.0 area 2
SW1#show ip int bri
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.37.7 YES manual up up
FastEthernet2/0 192.168.67.7 YES manual up up
Loopback2 2.0.0.1 YES manual up up
Loopback100 100.100.100.100 YES manual up up
SW1#show ip ospf database external
OSPF Router with ID (11.11.11.11) (Process ID 1)
SW1#show ip ospf database ns
SW1#show ip ospf database nssa-external
OSPF Router with ID (11.11.11.11) (Process ID 1)
Type-7 AS External Link States (Area 2)
LS age: 243
Options: (No TOS-capability, Type 7/5 translation, DC)
LS Type: AS External Link
Link State ID: 100.100.100.100 (External Network Number )
Advertising Router: 11.11.11.11
LS Seq Number: 80000009
Checksum: 0x8EBF
Length: 36
Network Mask: /32
Metric Type: 1 (Comparable directly to link state metric)
TOS: 0
Metric: 20
Forward Address: 2.0.0.1
External Route Tag: 0
SW1#
Showing posts with label nssa. Show all posts
Showing posts with label nssa. Show all posts
Tuesday, November 25, 2008
Sunday, June 15, 2008
OSPF - when you should suppress forward address in type7/5 translation
This topic really piqued my curiosity. You can see from my previous post that I know how to do this but could not think of an example of when it would be necessary. Well now I have found one. After reading a bunch of cisco doc's I came up with this scenario:

R2 ---> R5 in area 25
R5 ---> R4 in area 0
R4 ---> R3 in area 345
Area 25 is an NSSA.
R2 is an ASBR redistruting a static route to R1's Loopback into OSPF:
R2#show run | section router ospf|ip route
router ospf 1
log-adjacency-changes
area 25 nssa
redistribute connected subnets
redistribute static subnets
network 172.12.25.0 0.0.0.255 area 25
ip route 1.1.1.1 255.255.255.255 172.12.123.1
ip route 192.168.254.0 255.255.255.0 Null0
R2#ping 1.1.1.1
Translating "1.1.1.1"
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/31/84 ms
R2 generates a type 7 LSA for this route:
R2#show ip ospf database nssa-external 1.1.1.1
OSPF Router with ID (2.2.2.5) (Process ID 1)
Type-7 AS External Link States (Area 25)
LS age: 114
Options: (No TOS-capability, Type 7/5 translation, DC)
LS Type: AS External Link
Link State ID: 1.1.1.1 (External Network Number )
Advertising Router: 2.2.2.5
LS Seq Number: 80000002
Checksum: 0x337F
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 172.12.25.2
External Route Tag: 0
R5 converts this to a type 5 LSA and eventually winds up in area 345 on R3:
R3#show ip ospf database external 1.1.1.1
OSPF Router with ID (3.3.3.3) (Process ID 1)
Type-5 AS External Link States
LS age: 69
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 1.1.1.1 (External Network Number )
Advertising Router: 5.5.5.5
LS Seq Number: 80000004
Checksum: 0x7B36
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 172.12.25.2
External Route Tag: 0
Notice the forwarding address for this LSA is 172.12.25.2. This address is being filtered on R4 as follows:
R4(config)#ip prefix-list BLOCK25 deny 172.12.25.0/24
R4(config)#ip prefix-list BLOCK25 permit 0.0.0.0/0 le 32
R4(config)#router ospf 1
R4(config-router)#area 345 filter-list prefix BLOCK25 in
R3#show ip ospf data summ 172.12.25.0
OSPF Router with ID (3.3.3.3) (Process ID 1)
R3#show ip route 1.1.1.1
% Network not in table
R3#
R3 cannot put this route in the route table if it does not have an LSA for the forwarding address. The only way to let R3 install this route is to make the forward address of the type 5 LSA for 1.1.1.1 to 0.0.0.0. This way R3 will forward traffic to the advertising router.
Let's try it:
R5(config)#router ospf 1
R5(config-router)#area 25 nssa translate type7 suppress-fa
Now let's look on R3:
R3#show ip ospf data ex 1.1.1.1
OSPF Router with ID (3.3.3.3) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA
LS age: 326
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 1.1.1.1 (External Network Number )
Advertising Router: 5.5.5.5
LS Seq Number: 80000007
Checksum: 0x176B
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
R3#show ip route 1.1.1.1
Routing entry for 1.1.1.1/32
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 65599
Redistributing via eigrp 1
Advertised by eigrp 1
Last update from 172.12.34.4 on FastEthernet0/1, 00:00:06 ago
Routing Descriptor Blocks:
* 172.12.34.4, from 5.5.5.5, 00:00:06 ago, via FastEthernet0/1
Route metric is 20, traffic share count is 1
Ta-da!

R2 ---> R5 in area 25
R5 ---> R4 in area 0
R4 ---> R3 in area 345
Area 25 is an NSSA.
R2 is an ASBR redistruting a static route to R1's Loopback into OSPF:
R2#show run | section router ospf|ip route
router ospf 1
log-adjacency-changes
area 25 nssa
redistribute connected subnets
redistribute static subnets
network 172.12.25.0 0.0.0.255 area 25
ip route 1.1.1.1 255.255.255.255 172.12.123.1
ip route 192.168.254.0 255.255.255.0 Null0
R2#ping 1.1.1.1
Translating "1.1.1.1"
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 1.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/31/84 ms
R2 generates a type 7 LSA for this route:
R2#show ip ospf database nssa-external 1.1.1.1
OSPF Router with ID (2.2.2.5) (Process ID 1)
Type-7 AS External Link States (Area 25)
LS age: 114
Options: (No TOS-capability, Type 7/5 translation, DC)
LS Type: AS External Link
Link State ID: 1.1.1.1 (External Network Number )
Advertising Router: 2.2.2.5
LS Seq Number: 80000002
Checksum: 0x337F
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 172.12.25.2
External Route Tag: 0
R5 converts this to a type 5 LSA and eventually winds up in area 345 on R3:
R3#show ip ospf database external 1.1.1.1
OSPF Router with ID (3.3.3.3) (Process ID 1)
Type-5 AS External Link States
LS age: 69
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 1.1.1.1 (External Network Number )
Advertising Router: 5.5.5.5
LS Seq Number: 80000004
Checksum: 0x7B36
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 172.12.25.2
External Route Tag: 0
Notice the forwarding address for this LSA is 172.12.25.2. This address is being filtered on R4 as follows:
R4(config)#ip prefix-list BLOCK25 deny 172.12.25.0/24
R4(config)#ip prefix-list BLOCK25 permit 0.0.0.0/0 le 32
R4(config)#router ospf 1
R4(config-router)#area 345 filter-list prefix BLOCK25 in
R3#show ip ospf data summ 172.12.25.0
OSPF Router with ID (3.3.3.3) (Process ID 1)
R3#show ip route 1.1.1.1
% Network not in table
R3#
R3 cannot put this route in the route table if it does not have an LSA for the forwarding address. The only way to let R3 install this route is to make the forward address of the type 5 LSA for 1.1.1.1 to 0.0.0.0. This way R3 will forward traffic to the advertising router.
Let's try it:
R5(config)#router ospf 1
R5(config-router)#area 25 nssa translate type7 suppress-fa
Now let's look on R3:
R3#show ip ospf data ex 1.1.1.1
OSPF Router with ID (3.3.3.3) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA
LS age: 326
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 1.1.1.1 (External Network Number )
Advertising Router: 5.5.5.5
LS Seq Number: 80000007
Checksum: 0x176B
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
R3#show ip route 1.1.1.1
Routing entry for 1.1.1.1/32
Known via "ospf 1", distance 110, metric 20, type extern 2, forward metric 65599
Redistributing via eigrp 1
Advertised by eigrp 1
Last update from 172.12.34.4 on FastEthernet0/1, 00:00:06 ago
Routing Descriptor Blocks:
* 172.12.34.4, from 5.5.5.5, 00:00:06 ago, via FastEthernet0/1
Route metric is 20, traffic share count is 1
Ta-da!
OSPF - Type 5 and Type 7 LSA Comparison
R2 --- R5 is in standard area 25.
R5 is and ABR connected to area 0 as well.
R2 is redistributing connected interfaces.
These show up as E2 routes on R5.
Here is how he type LSA for R2's loopback 2.2.2.2:
R5# show ip ospf database external 2.2.2.2
OSPF Router with ID (5.5.5.5) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA
LS age: 121
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 2.2.2.2 (External Network Number )
Advertising Router: 2.2.2.5
LS Seq Number: 80000001
Checksum: 0x3D50
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
Now Let's convert area 25 to an nssa area:
R5(config)#router ospf 1
R5(config-router)#area 25 nssa
R2(config)#router ospf 1
R2(config-router)#area 25 nssa
Here is how the type 7 LSA looks, can you see the difference?
R2#show ip ospf database nssa-external 2.2.2.2
OSPF Router with ID (2.2.2.5) (Process ID 1)
Type-7 AS External Link States (Area 25)
LS age: 85
Options: (No TOS-capability, Type 7/5 translation, DC)
LS Type: AS External Link
Link State ID: 2.2.2.2 (External Network Number )
Advertising Router: 2.2.2.5
LS Seq Number: 80000001
Checksum: 0x7A8
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 172.12.25.2
External Route Tag: 0
R5 converts this to a type 5 LSA before flooding to area 0. Here's how it looks now:
R5# show ip ospf database external 2.2.2.2
OSPF Router with ID (5.5.5.5) (Process ID 1)
Type-5 AS External Link States
LS age: 100
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 2.2.2.2 (External Network Number )
Advertising Router: 5.5.5.5
LS Seq Number: 80000001
Checksum: 0x535D
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 172.12.25.2
External Route Tag: 0
Notice that the forwarding address is listed as 0.0.0.0 in the first example. After area 25 was changed to a nssa, then the forwarding address appeared in the type 7 lsa and in the translated type 5 lsa.
Also notice the type 7 lsa has an advertising router of 2.2.2.5 (R2's router-id) but the type is advertised by R5 for flooding into area 0 and beyond. In the original type 5 lsa the advertising router was 2.2.2.5 throughout the ospf domain. Take a look below at R3 in a distant area 345.
When area 25 is standard area:
R3#show ip osp database external 2.2.2.2 | inc Advertising
Advertising Router: 2.2.2.5
When area 25 is nssa:
R3#show ip osp database external 2.2.2.2 | inc Advertising
Advertising Router: 5.5.5.5
We can also supress the advertisement of the forwarding address with this command on R5, the ABR:
R5(config-router)#are 25 nssa translate type7 suppress-fa
R3#show ip osp database external 2.2.2.2 | inc Forward
Forward Address: 0.0.0.0
Why would we do this? not exactl sure right now, but I have read the when the forward address is 0.0.0.0 then the router sends the packet to the advertising router...it seems this would have happened anyway...right?
I remember running into problems with type7/5 translation when I was doing labs studying for the CCNP routing exam. There were some interesting issues and I'll do some more research. This was just a quick lab to see what happens to external lsa depending on the type of area.
Here's a link that explains more:
When to Suppress OSPF Forwarding Address in Translated Type-5 LSAs
R5 is and ABR connected to area 0 as well.
R2 is redistributing connected interfaces.
These show up as E2 routes on R5.
Here is how he type LSA for R2's loopback 2.2.2.2:
R5# show ip ospf database external 2.2.2.2
OSPF Router with ID (5.5.5.5) (Process ID 1)
Type-5 AS External Link States
Routing Bit Set on this LSA
LS age: 121
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 2.2.2.2 (External Network Number )
Advertising Router: 2.2.2.5
LS Seq Number: 80000001
Checksum: 0x3D50
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 0.0.0.0
External Route Tag: 0
Now Let's convert area 25 to an nssa area:
R5(config)#router ospf 1
R5(config-router)#area 25 nssa
R2(config)#router ospf 1
R2(config-router)#area 25 nssa
Here is how the type 7 LSA looks, can you see the difference?
R2#show ip ospf database nssa-external 2.2.2.2
OSPF Router with ID (2.2.2.5) (Process ID 1)
Type-7 AS External Link States (Area 25)
LS age: 85
Options: (No TOS-capability, Type 7/5 translation, DC)
LS Type: AS External Link
Link State ID: 2.2.2.2 (External Network Number )
Advertising Router: 2.2.2.5
LS Seq Number: 80000001
Checksum: 0x7A8
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 172.12.25.2
External Route Tag: 0
R5 converts this to a type 5 LSA before flooding to area 0. Here's how it looks now:
R5# show ip ospf database external 2.2.2.2
OSPF Router with ID (5.5.5.5) (Process ID 1)
Type-5 AS External Link States
LS age: 100
Options: (No TOS-capability, DC)
LS Type: AS External Link
Link State ID: 2.2.2.2 (External Network Number )
Advertising Router: 5.5.5.5
LS Seq Number: 80000001
Checksum: 0x535D
Length: 36
Network Mask: /32
Metric Type: 2 (Larger than any link state path)
TOS: 0
Metric: 20
Forward Address: 172.12.25.2
External Route Tag: 0
Notice that the forwarding address is listed as 0.0.0.0 in the first example. After area 25 was changed to a nssa, then the forwarding address appeared in the type 7 lsa and in the translated type 5 lsa.
Also notice the type 7 lsa has an advertising router of 2.2.2.5 (R2's router-id) but the type is advertised by R5 for flooding into area 0 and beyond. In the original type 5 lsa the advertising router was 2.2.2.5 throughout the ospf domain. Take a look below at R3 in a distant area 345.
When area 25 is standard area:
R3#show ip osp database external 2.2.2.2 | inc Advertising
Advertising Router: 2.2.2.5
When area 25 is nssa:
R3#show ip osp database external 2.2.2.2 | inc Advertising
Advertising Router: 5.5.5.5
We can also supress the advertisement of the forwarding address with this command on R5, the ABR:
R5(config-router)#are 25 nssa translate type7 suppress-fa
R3#show ip osp database external 2.2.2.2 | inc Forward
Forward Address: 0.0.0.0
Why would we do this? not exactl sure right now, but I have read the when the forward address is 0.0.0.0 then the router sends the packet to the advertising router...it seems this would have happened anyway...right?
I remember running into problems with type7/5 translation when I was doing labs studying for the CCNP routing exam. There were some interesting issues and I'll do some more research. This was just a quick lab to see what happens to external lsa depending on the type of area.
Here's a link that explains more:
When to Suppress OSPF Forwarding Address in Translated Type-5 LSAs
Subscribe to:
Posts (Atom)