OSPFv3 Prefix Suppression

Prefix Suppression, as explained in this OSPFv2 lesson is a method to get rid of transit prefixes. Here’s a quick example:

Ospfv3 Transit Prefixes Example

Above we have three routers running OSPFv3. H1 and H2 are host devices, and the only thing we care about in this topology is having connectivity between these two hosts. This means R3 needs to know about prefix 2001:DB8:0:3::/64 and R3 about prefix 2001:DB8:0:1::/64.

We also have prefix 2001:DB8:0:12::/64 in between R1 and R2 and prefix 2001:DB8:0:23::/64 in between R2 and R3 but we don’t really need to have these prefixes in our routing tables, those are only transit prefixes. Unlike OSPFv2 where you do have to configure IP addresses on your transit links, OSPFv3 doesn’t need this. You only need link-local IPv6 addresses in order for OSPFv3 to establish a neighbor adjacency so we could just remove these two prefixes.

However, if you do have configured transit prefixes on your routers and you have a reason to keep them…you can still suppress them with prefix suppression.

Prefix suppression in OSPFv3 is much simpler than OSPFv2. In OSPFv2, prefixes are found in the router (type 1) LSA and the network (type 2) LSA.

OSPFv3 separates topology and prefix information. LSA type 1 and 2 are used for topology information and the new link (type 8) LSA and intra area prefix (type 9) LSA contain addressing information.

The link LSA associates a list of IPv6 addresses to a link and has a link-local flooding scope. The intra area prefix LSA associates a list of IPv6 addresses with a router by referencing a router LSA or with a broadcast/NBMA network by referencing a network LSA.

When the router refers a network LSA, the prefixes from the link LSA are copied into the intra area prefix LSA by the DR.

To hide prefixes, OSPFv3 removes information from the link LSA and intra area prefix LSA.

Configuration

To demonstrate OSPFv3 prefix suppression, I use the following topology:

Ospfv3 Prefix Suppression Topology

In the topology above, each router has a loopback interface. The goal is that each router should be able to ping any of the other loopback interfaces. I also added two transit prefixes:

  • 2001:DB8:0:123::/64 in between R1, R2 and R3
  • 2001:DB8:0:34::/64 in between R3 and R4

R1 and R2 will learn about 2001:DB8:0:34/64 and R4 will learn 2001:DB8:0:123::/64. Both prefixes are unnecessary.

Since R3 and R4 are only connected to each other, this link has been configured as an OSPF point-to-point network type.

Configurations

Want to take a look for yourself? Here you will find the startup configuration of each device.

R1

hostname R1
!
ipv6 unicast-routing
ipv6 cef
!
interface Loopback0
 ipv6 address 2001:DB8:1:1::1/128
 ipv6 ospf 1 area 0
!
interface GigabitEthernet0/1
 ipv6 address 2001:DB8:0:123::1/64
 ipv6 enable
 ipv6 ospf 1 area 0
!
ipv6 router ospf 1
 router-id 1.1.1.1
!
end

R2

hostname R2
!
ipv6 unicast-routing
ipv6 cef
!
interface Loopback0
 ipv6 address 2001:DB8:2:2::2/128
 ipv6 ospf 1 area 0
!
interface GigabitEthernet0/0
 ip address 10.255.2.72 255.255.0.0
!
interface GigabitEthernet0/1
 ipv6 address 2001:DB8:0:123::2/64
 ipv6 enable
 ipv6 ospf 1 area 0
!
ipv6 router ospf 1
 router-id 2.2.2.2
!
end

R3

hostname R3
!
ipv6 unicast-routing
ipv6 cef
!
interface Loopback0
 ipv6 address 2001:DB8:3:3::3/128
 ipv6 ospf 1 area 0
!
interface GigabitEthernet0/1
 ipv6 address 2001:DB8:0:123::3/64
 ipv6 enable
 ipv6 ospf 1 area 0
!
interface GigabitEthernet0/2
 ipv6 address 2001:DB8:0:34::3/64
 ipv6 enable
 ipv6 ospf 1 area 0
 ipv6 ospf network point-to-point
!
ipv6 router ospf 1
 router-id 3.3.3.3
!
end

R4

hostname R4
!
ipv6 unicast-routing
ipv6 cef
!
interface Loopback0
 ipv6 address 2001:DB8:4:4::4/128
 ipv6 ospf 1 area 0
!
interface GigabitEthernet0/1
 ipv6 address 2001:DB8:0:34::4/64
 ipv6 enable
 ipv6 ospf 1 area 0
 ipv6 ospf network point-to-point
!
ipv6 router ospf 1
 router-id 4.4.4.4
!
end

Prefix Suppression Disabled

Prefix suppression is disabled by default. Let’s take a look at the routing tables of R1, R2, and R4:

R1#show ipv6 route ospf 

O   2001:DB8:0:34::/64 [110/2]
     via FE80::F816:3EFF:FEE3:9BA6, GigabitEthernet0/1
O   2001:DB8:2:2::2/128 [110/1]
     via FE80::F816:3EFF:FE2A:1133, GigabitEthernet0/1
O   2001:DB8:3:3::3/128 [110/1]
     via FE80::F816:3EFF:FEE3:9BA6, GigabitEthernet0/1
O   2001:DB8:4:4::4/128 [110/2]
     via FE80::F816:3EFF:FEE3:9BA6, GigabitEthernet0/1
R2#show ipv6 route ospf 

O   2001:DB8:0:34::/64 [110/2]
     via FE80::F816:3EFF:FEE3:9BA6, GigabitEthernet0/1
O   2001:DB8:1:1::1/128 [110/1]
     via FE80::F816:3EFF:FEC6:CDB1, GigabitEthernet0/1
O   2001:DB8:3:3::3/128 [110/1]
     via FE80::F816:3EFF:FEE3:9BA6, GigabitEthernet0/1
O   2001:DB8:4:4::4/128 [110/2]
     via FE80::F816:3EFF:FEE3:9BA6, GigabitEthernet0/1

Above we see that R1 and R2 have learned 2001:DB8:0:34::/64. Here is R4:

R4#show ipv6 route ospf 

O   2001:DB8:0:123::/64 [110/2]
     via FE80::F816:3EFF:FE4A:6854, GigabitEthernet0/1
O   2001:DB8:1:1::1/128 [110/2]
     via FE80::F816:3EFF:FE4A:6854, GigabitEthernet0/1
O   2001:DB8:2:2::2/128 [110/2]
     via FE80::F816:3EFF:FE4A:6854, GigabitEthernet0/1
O   2001:DB8:3:3::3/128 [110/1]
     via FE80::F816:3EFF:FE4A:6854, GigabitEthernet0/1

R4 has 2001:DB8:0:123::/64 in its routing table.

Link LSA

Prefix information is stored in the link LSA and the intra area prefix LSA. Let’s look at R3, our DR (Designated Router) in this topology. First, we’ll take a look at the link LSA:

R3#show ipv6 ospf database link self-originate   

            OSPFv3 Router with ID (3.3.3.3) (Process ID 1)

                Link (Type-8) Link States (Area 0)

  LS age: 599
  Options: (V6-Bit, E-Bit, R-Bit, DC-Bit)
  LS Type: Link-LSA (Interface: GigabitEthernet0/2)
  Link State ID: 4 (Interface ID)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000003
  Checksum: 0xA820
  Length: 56
  Router Priority: 1
  Link Local Address: FE80::F816:3EFF:FE4A:6854
  Number of Prefixes: 1
  Prefix Address: 2001:DB8:0:34::
  Prefix Length: 64, Options: None

  LS age: 599
  Options: (V6-Bit, E-Bit, R-Bit, DC-Bit)
  LS Type: Link-LSA (Interface: GigabitEthernet0/1)
  Link State ID: 3 (Interface ID)
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000003
  Checksum: 0x9525
  Length: 56
  Router Priority: 1
  Link Local Address: FE80::F816:3EFF:FEE3:9BA6
  Number of Prefixes: 1
  Prefix Address: 2001:DB8:0:123::
  Prefix Length: 64, Options: None

Above we see the two transit prefixes. I highlighted the interesting part. Once prefix suppression is enabled, this will be removed from the link LSA. Below is R4:

R4#show ipv6 ospf database link self-originate 

            OSPFv3 Router with ID (4.4.4.4) (Process ID 1)

                Link (Type-8) Link States (Area 0)

  LS age: 646
  Options: (V6-Bit, E-Bit, R-Bit, DC-Bit)
  LS Type: Link-LSA (Interface: GigabitEthernet0/1)
  Link State ID: 3 (Interface ID)
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000003
  Checksum: 0x4C21
  Length: 56
  Router Priority: 1
  Link Local Address: FE80::F816:3EFF:FEAF:7D32
  Number of Prefixes: 1
  Prefix Address: 2001:DB8:0:34::
  Prefix Length: 64, Options: None

R4 shows information about 2001:DB8:0:34::/64. This information will be removed once prefix suppression is enabled.

Intra Area Prefix LSA

Let’s look at the intra area prefix LSA. Let’s take a look at R3, our DR:

R3#show ipv6 ospf database prefix self-originate 

            OSPFv3 Router with ID (3.3.3.3) (Process ID 1)

                Intra Area Prefix Link States (Area 0)

  LS age: 614
  LS Type: Intra-Area-Prefix-LSA
  Link State ID: 0
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000002
  Checksum: 0x54B5
  Length: 64
  Referenced LSA Type: 2001
  Referenced Link State ID: 0
  Referenced Advertising Router: 3.3.3.3
  Number of Prefixes: 2
  Prefix Address: 2001:DB8:3:3::3
  Prefix Length: 128, Options: LA, Metric: 0
  Prefix Address: 2001:DB8:0:34::
  Prefix Length: 64, Options: None, Metric: 1

  LS age: 614
  LS Type: Intra-Area-Prefix-LSA
  Link State ID: 3072
  Advertising Router: 3.3.3.3
  LS Seq Number: 80000001
  Checksum: 0xD0C2
  Length: 44
  Referenced LSA Type: 2002
  Referenced Link State ID: 3
  Referenced Advertising Router: 3.3.3.3
  Number of Prefixes: 1
  Prefix Address: 2001:DB8:0:123::
  Prefix Length: 64, Options: None, Metric: 0

Above we find information about 2001:DB8:0:34::/64 and 2001:DB8:0:123::/64. The information I highlighted will be removed by prefix suppression. Let’s also take a look at R4:

R4#show ipv6 ospf database prefix self-originate 

            OSPFv3 Router with ID (4.4.4.4) (Process ID 1)

                Intra Area Prefix Link States (Area 0)

  LS age: 683
  LS Type: Intra-Area-Prefix-LSA
  Link State ID: 0
  Advertising Router: 4.4.4.4
  LS Seq Number: 80000004
  Checksum: 0xB844
  Length: 64
  Referenced LSA Type: 2001
  Referenced Link State ID: 0
  Referenced Advertising Router: 4.4.4.4
  Number of Prefixes: 2
  Prefix Address: 2001:DB8:4:4::4
  Prefix Length: 128, Options: LA, Metric: 0
  Prefix Address: 2001:DB8:0:34::
  Prefix Length: 64, Options: None, Metric: 1

Once prefix suppression is enabled, you’ll see that the information about transit prefix 2001:DB8:0:34::/64 will be removed.

Prefix Suppression Enabled

Time to enable prefix suppression. I use the global command on all routers:

R1, R2, R3 & R4
(config)#ipv6 router ospf 1
(config-rtr)#prefix-suppression

That’s it.

You can also enable prefix suppression with the interface command ipv6 ospf prefix-suppression.

Let’s start by checking the routing tables of R1, R2, and R4:

We're Sorry, Full Content Access is for Members Only...

If you like to keep on reading, Become a Member Now! Here is why:

  • Learn any CCNA, CCNP and CCIE R&S Topic. Explained As Simple As Possible.
  • Try for Just $1. The Best Dollar You've Ever Spent on Your Cisco Career!
  • Full Access to our 655 Lessons. More Lessons Added Every Week!
  • Content created by Rene Molenaar (CCIE #41726)

561 Sign Ups in the last 30 days

satisfaction-guaranteed
100% Satisfaction Guaranteed!
You may cancel your monthly membership at any time.
No Questions Asked!

Tags:


Forum Replies

  1. Hi Rene, prefix-suppression command is not supported ospf /interface in GNS IOU …Do we need to go with some specific IOS version to support this feature

  2. Hello Vinod

    Prefix suppression commands, like any other commands, depend on the IOS being used. Because GNS uses reali IOS files, it should support any feature supported by the IOS in question. Make sure that the version you are using supports the commands you’re looking for.

    According to the following link, the prefix-suppression command was untridyced to the IOS from version 12.4(15)T and was integrated into Cisco IOS XE Release 2.6.

    ... Continue reading in our forum

  3. Hi,

    I would like to know if:

    router ospfv3 1
       prefix-suppression
    

    EQUALS

    ipv6 router ospf 1
       prefix-suppression
    

    or maybe only the 2nd option is valid?

  4. Hi,
    it should be equal, if you type “ipv6 router ospf 1” you are also creating ospfv3 process, just with old command, this does not support address families.
    However if you type “router ospfv3 1” you can enable prefix suppression for both families, ipv4 and ipv6 at the same time.

    router ospfv3 1
     prefix-suppression
    

    In case you want to enable prefix suppression just for ipv6 family you configure it under address-family configuration

    router ospfv3 1
     address-family ipv6 unicast
      prefix-suppression
    

    Also configurations on interface is doing the same.

    ipv6 ospf p
    ... Continue reading in our forum

  5. alright,
    Thanks you so much for the explanation , I wasn’t sure about that beacuse I don’t have the necessary equipment to check it by myself

Ask a question or join the discussion by visiting our Community Forum