IPv6 Summarization

Summarizing IPv6 addresses is quite similar to the summarization of IPv4 addresses. The only real differences are:

  • IPv6 is 128bit while IPv4 only has 32 bits
  • IPv6 is written in HEX while IPv4 is written in decimal

If we take those two differences into account the summarization is the same.

To show the summarization, we’ll use the following two IPv6 addresses from the Unicast definition:

2001:CC1E:2AB3:1A3C::/64
2001:CC1E:2AB3:1A4D::/64

Like IPv4 addresses, we only have to have a look into the part where the two addresses differ. In that example its the 4th 16bit field. Remember IPv6 consists of 8 fields with each 16 bits (8×16 = 128). The values of both fields are:

1A3C
1A4D

Now we change those values from hex to binary:

This is now just the translation from HEX to binary, but for the calculation we have to fill the field with zeros until we have 16bits:

Now its a full 16bit IPv6 field and as we can see, the first 9 out of 16 bits match for both addresses, to get the correct HEX value for our 4th field, we have to fill the last (not matching) 7 bits with 0s.

Since this is the 4th field we already have 3 times 16 bits matching each other before adding those 9 bits we now have a network mask of /57. Changing the 4th field back into hex, well have the following summarized IPv6 address out of those two addresses:

2001:CC1E:2AB3:1A00/57

“Proof of concept”

To prove that this summarization is really working, we can use the following simple two router based diagram:

The routers have a basic OSPFv3 configuration with two areas, while area 1 is only on R2 and within the three loopbacks, two of them are the addresses we used for the summarization, the third (2001:CC1E:2AB3:1D4D::/64) differs in three bits compared to the other two addresses:

The basic configuration for both routers is shown below:

R1
ipv6 unicast-routing
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
ipv6 address 2001:116:1:12::1/64
!
ipv6 ospf 1 area 0
ipv6 router ospf 1
router-id 99.99.1.1
log-adjacency-changes

R2
ipv6 unicast-routing
!
interface Loopback0
no ip address
ipv6 address 2001:CC1E:2AB3:1A3C::2/64
ipv6 ospf 1 area 1
!
interface Loopback1
no ip address
ipv6 address 2001:CC1E:2AB3:1A4D::2/64
ipv6 ospf 1 area 1
!
interface Loopback2
no ip address
ipv6 address 2001:CC1E:2AB3:1D4D::2/64
ipv6 ospf 1 area 1
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
ipv6 address 2001:116:1:12::2/64
ipv6 ospf 1 area 0
!
ipv6 router ospf 1
router-id 99.99.2.2
log-adjacency-changes

R1 now has all loopback addresses in his IPv6 routing table:

R1#sh ipv route ospf
IPv6 Routing Table - 7 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
OI  2001:CC1E:2AB3:1A3C::2/128 [110/1]
     via FE80::CE02:13FF:FEAC:0, FastEthernet0/0
OI  2001:CC1E:2AB3:1A4D::2/128 [110/1]
     via FE80::CE02:13FF:FEAC:0, FastEthernet0/0
OI  2001:CC1E:2AB3:1D4D::2/128 [110/1]
     via FE80::CE02:13FF:FEAC:0, FastEthernet0/0

Now R2 is going to do a summarization at the area boundary between area 0 and area 1 over our both addresses with the summary address we calculated above:

ipv6 router ospf 1
router-id 99.99.2.2
log-adjacency-changes
area 1 range 2001:CC1E:2AB3:1A00::/57

R1 should now only have two OSPF addresses in his routing table, the summary and the third loopback address, if the summarization works. And it does 😉 :

R1#sh ipv route ospf
IPv6 Routing Table - 6 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
OI  2001:CC1E:2AB3:1A00::/57 [110/1]
     via FE80::CE02:13FF:FEAC:0, FastEthernet0/0
OI  2001:CC1E:2AB3:1D4D::2/128 [110/1]
     via FE80::CE02:13FF:FEAC:0, FastEthernet0/0
Advertisements

15 comments

  1. pashtuk

    Hi Ricardo
    No matter, its always good if people do not believe everything that’s written in the WWW, cause mistakes can happen 🙂
    And I hope that people will inform me if they find errors in one of my articles.
    best regards

    Michel

  2. pashtuk

    its written in the article 🙂

    “Since this is the 4th field we already have 3 times 16 bits matching each other before adding those 9 bits we now have a network mask of /57”

  3. Johan

    Thanks for sharing !!!

    I got it, in some way, that’s a simple task.

    Between the 2 networks, aren’t you add some networks you might not have ?

    Proctors are evil, so I’m preparing for the worst 🙂

    Johan

  4. pashtuk

    Hi Johan
    Yes there are more networks inside that summarization than just the two mentioned but if they only want to have specific networks, they will tell you so 🙂

    Ah well not the proctors are evil, they are your friends, the tasks wording is evil 😀

  5. Guile474

    Hi Michel,

    Why did you exclude the third loopback from the summarization?

    I used your method above and summarized the three addresses above to 2001:CC1E:2AB3:1800/53.

    BTW, I like how you worked CC1E in there.

    Thanks!

    • pashtuk

      Hey Guile474
      That’s just to show, that the summary only includes those two Loopbacks and not the third one. Thats all nothing special 🙂

      hehe thanks, but the CC1E thingie is basically coming from the INE workbooks about IPv6 🙂

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s