1. Type to enter text
OSPFv3
Differences with IPv2
Introduction
If you plan to use OSPF for IPv6 in a dual stack network you will run two
protocols: OSPFv2 for IPv4 and OSPFv3 for IPv6. If you want an integrated
routing protocol which will manage both routing tables, use IS-IS.
Differences with IPv4
In IPv6, an interface may have many IP addresses. Thus OSPFv3
runs per link and not per subnet.
In OSPFv3, the Option field in Hello and Database Description have
been expanded to 24 bits.
The Hello packet does not contain any address but an Interface-id.
There are two new bits: the R-bit and the V6-bit. If the R-bit is set the
router participate will forward traffic. The options bit ‘R-bit” and “V6-
bit’ have been added. If the R-bit is cleared, the router is not used for
forwarding transit traffic. To forward IPv6 traffic, the V6-bit must be
set.
The OSPF packet header now includes an “Instance ID” that allows
multiple independent instance of OSPF to run on the same protocol.
Option bits
DC R N x E V6OSPFv2 and OSPFv3 are
running as Ships in the night
• OSPFv2 and OSPFv3 are running as
Ships in the night
• Authentication has been Removed
• OSPFv3 run per link and not per
subnet
• It is now possible to run multiple
instances of OSPF on the same
media
• The Option bits have been
expanded to 24 bits. Two new bit
“R-bit’, “V6-bits. If the R-bit is clear,
the router does not forward traffic.
To forward IPv6 Traffic IPv6-bit must
be set.
• Permit to run 256 instances on the
same shared media.
•
• Security is managed by IPSec and is
no longer part of OSPF Process.
• As many addresses can be configured
on each link, OSPFv3 run per link and
not per subnet.
• OSPF Database has been redesigned
with 2 new LSAs. One LSA to
http://www.ipv6forlife.com
OPSFv3 is a new
Routing Protocol
independent from
OSPFv2 for IPv4.
2. LengthLink State ChecksumLink State Sequence NumberAdvertising RouterLink State IDLS TypeLS age
OSPFv3 http://www.ipv6forlife.com
In IPv6, an interface may have many IP addresses. Thus OSPFv3
runs per link and not per subnet.
In OSPFv3, the Option field in Hello and Database Description has
been expanded to 24 bits.
The Hello packet does not contain any address but an Interface-id.
There are two new bits: the R-bit and the V6-bit. If the R-bit is set
the router participate will forward traffic. The options bit ‘R-bit” and
“V6-bit’ have been added. If the R-bit is cleared, the router is not
used for forwarding transit traffic. To forward IPv6 traffic, the V6-bit
must be set.
The OSPF packet header now includes an “Instance ID” that allows
multiple independent instances of OSPF to run on the same
protocol.
Option bits
DC R N x E V6OSPFv2 and OSPFv3 are
running as Ships in the night Permit to run 256 instances on the same shared
media.
HELLO PROTOCOL
With OSPF exchanges start with Hello and all OSPF
packets starts with a common headers.
They are 5 types of packets in OSPF.
Two routers are sending Hellos using the AllOspfRouters
Multicast address ff02::5.
The Finite State Machine for the interface goes:
DOWN -> INIT
During the INIT state they check that the parameters
found in Hello are compatible. For instance if they are
not in the same Area or do both not send hello every 10
seconds, they will not form Neighbour relationship.
When a router sees its Router-ID in a Neighbour
advertisement, their states becomes TWO-WAY
Area did not change
We still have regular, area, stub, or NSSA Areas.
Please note that if Authentication has been removed it is that it is assumed that all
nodes run IPSec.
www.ipv6forlife.com
OSPFv3 run per link and
not per Subnet
As many addresses can be configured
on the same interface, OSPF run per
link and not per Subnet.
Still the same Architectiure
4. No1
Page 4 - OSPFv3
DR/BDR Election. In addition, they will elect a Designated Router
and a Backup Designated Router on Multipoint, Broadcast or Not,
interface.
They start waiting 40 seconds listening if there are already a DR/BDR
on this link. Then they compare their Router Priority with the Priority
of the others received. This is not preemptive, if a DR is elected you
would not replace it either should you have a better priority. With the
same priority, highest Router ID wins. Priority 0 is ineligible.
The next state is Database synchronisation with Adjacent routers. On
a Point-to-Point you should be systematically adjacent. On a
multiaccess you only become adjacent with the DR/BDR. This is to
avoid that everybody need to synchronise with everybody!
It is important to notice that there is no MTU check during these
steps, it will be verified next. In IS-IS Hellos are sent at MTU to check
that they can support the same length.
OSPF Initialisation (To be Continued)
No need for DR/BDR on a Point-to-Point
5. EXSTART
Once, routers are neighbours, they may become adjacent.
Each router send a DBD with the Master bit set (MS) pretending it is the Master.
Highest Router-ID wins.
DBD other bits are:
I-bit
The Init bit. When set to 1, this packet is the first in the sequence of Database
Description packets.
M-bit
The More bit. When set to 1, it indicates that more Database Description
packets are to follow.
MS-bit
The Master/Slave bit. When set to 1, it indicates that the router is the master
during the Database Exchange process. Otherwise, the router is the slave.
The Master will then be responsible to synchronise the communication. This
exchange looks like a TFTP File Transfer. Each router sends its database, JSA
Headers only to heck it has the latest version.
During the DBD Exchange the Routers are in the EXCHANGE State.
EXLOAD
If a LSA is not up to date, the router will send a Link State Request. It's neighbour
should now reply with a Link-State Reply which will be Acked with a Link State
Acknowledgement. When both Databases are up to date, the status is now FULL.
3 2 Packet Length
Router-ID
Area-ID
Checksum
Instance
ID
0
Database Description Packet
0 Options
Interface MTU 0 0 0 0 0 0 I M MS
DD Sequence Number
An LSA Header
6. 3 3 Packet Length
Router-ID
Area-ID
Checksum
Instance
ID
0
Link State Request
0 LS Type
Link-State ID
Advertising Router
Link-State ID....
3 4 Packet Length
Router-ID
Area-ID
Checksum
Instance
ID
0
Link State Update
# Link State
LSAs....
3 5 Packet Length
Router-ID
Area-ID
Checksum Instance
ID
0
Link State Acknowledgement
An LSA Header
LSA Header
LSA Type
U S2 S1 LSA Function Code
U=0 Treat the LSA as if it had link-local flooding scope
U=1 Store and Flood the LSA as if the type is understood
S2 S1 Flooding Scope
0 0 Link-Local Scoping
0 1 Area Scoping
1 0 AS Scoping
1 1 Reserved
LSA Function Code LS-Type
1 0x2001 Router-LSA
2 0x2002 Network-LSA
3 0x2003 Inter-Area-Prefix-LSA
4 0x2004 Inter-Area_Router-LSA
5 0x2005 AS-External-LSA
6 Deprecated
7 0x2007 NSSA-LSA
9 0x2009 Intra-Area-Prefix-LSA
LS Age LS Type
Link State ID
Advertising Router
LS Sequence Number
LS Checksum Length
7. 10.0.0.1
DBD I, M, MS==1
RID 10.0.0.1 RID 10.0.0.2
10.0.0.2
I. M, MS=1
10.0.0.1
DBD
EXSTART
10.0.0.2 10.0.0.1 so 10.0.0.2
becomes the mater
EXCHANGE
10.0.0.2
DBD Seq=X
10.0.0.1
DBD Ack X
If a LSA is missing or not up to date, then request it
10.0.0.1
LS Req
10.0.0.2
LS Upd
10.0.01!
LS Ack
EXLOAD
EXFULL
10.0.0.2
DBD MS=1, M=0
OSPF Initialisation on (Continued)
8. On
Different types of OSPF Networks
Type to enter text
With OSPF, we see the networks in different categories.
Point-to-point or Multipoint. The Multipoint uses a DR/BDR to optimise the Exchanges and to generate a
single LSA on the behalf of all neighbours instead having each node generating an LSA to list all neighbours
on the multi access networks.
The GigabitEthernet are configured by default are broadcast for OSPF which is bad for Point-to-Point Link.
We are going to go through the DR /BDR Election, start waiting 40 seconds just listening for an existing
active DR. If we configure the interface as point-to-point, it will go faster as it will not wait and start the DBD
Exchange faster.
On a CISCO Router we can see that ll OSPFv3 Gigabit Interface are BROADCAST by default which is no
good for convergence. When the interface goes up it wait 40 seconds just listening the network.
You can change the network type with the command “ip ospf network-type poit-to-point”.
R2sh ipv6 ospf ne
Neighbor ID Pri State Dead Time Interface ID Interface
10.0.0.4 1 FULL/DROTHER 00:00:39 5 GigabitEthernet0/0
10.0.0.3 1 FULL/BDR 00:00:32 6 GigabitEthernet0/0
10.0.0.3 1 FULL/BDR 00:00:31 5 GigabitEthernet2/0
10.0.0.5 1 FULL/BDR 00:00:33 6 GigabitEthernet1/0
9. Case Study of a Network: R5, R2 area in AREA 0.
R2 is an ABR and connect R3 in Stub AREA 2.
R4 is an ABR and connect R6 in AREA 1. R6 is an ASBR.
TE DU KDATA
Database of an ASBR R6.
R6#sh ipv6 ospf data
OSPFv3 Router with ID (10.0.0.6) (Process ID 1)
Router Link States (Area 1)
ADV Router Age Seq# Fragment ID Link count Bits
10.0.0.4 301 0x80000003 0 1 B
10.0.0.6 587 0x80000005 0 1 E
Net Link States (Area 1)
ADV Router Age Seq# Link ID Rtr count
10.0.0.6 192 0x80000002 5 2
Inter Area Prefix Link States (Area 1)
ADV Router Age Seq# Prefix
10.0.0.4 301 0x80000002 2001:DB8::2/128
10.0.0.4 301 0x80000002 2001:DB8::3/128
10.0.0.4 301 0x80000002 2001:DB8:1::/64
10.0.0.4 1512 0x80000001 2001:DB8:1000::/64
Link (Type-8) Link States (Area 1)
ADV Router Age Seq# Link ID Interface
10.0.0.4 307 0x80000002 8 Gi0/0
10.0.0.6 473 0x80000002 5 Gi0/0
10. Intra Area Prefix Link States (Area 1)
ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
10.0.0.6 227 0x80000002 5120 0x2002 5
Type-5 AS External Link States
ADV Router Age Seq# Prefix
10.0.0.6 629 0x80000001 2001:DB8:AAA1::/48
10.0.0.6 629 0x80000001 2001:DB8:AAA2::/48
10.0.0.6 629 0x80000001 2001:DB8:AAAA::/48
Let’s take a closer look at another router, R2 and check its Router LSA.
Router LSA Type 1:
R2show ipv6 ospf database router adv 10.0.0.2
OSPFv3 Router with ID (10.0.0.2) (Process ID 1)
Router Link States (Area 0)
LS age: 781
Options: (V6-Bit, E-Bit, R-bit, DC-Bit)
LS Type: Router Links
Link State ID: 0
Advertising Router: 10.0.0.2
LS Seq Number: 80000011
Checksum: 0x492B
Length: 72
Number of Links: 3
Link connected to: a Transit Network
Link Metric: 1
Local Interface ID: 5
Neighbor (DR) Interface ID: 5
Neighbor (DR) Router ID: 10.0.0.2
Link connected to: a Transit Network
Link Metric: 1
Local Interface ID: 7
Neighbor (DR) Interface ID: 7
Neighbor (DR) Router ID: 10.0.0.2
Link connected to: a Transit Network
Link Metric: 1
Local Interface ID: 6
Neighbor (DR) Interface ID: 6
Neighbor (DR) Router ID: 10.0.0.2
And now addresses are advertised by the new Intra-Area-Prefix-LSA
R2show ipv6 ospf database prefix adv 10.0.0.2
OSPFv3 Router with ID (10.0.0.2) (Process ID 1)
Intra Area Prefix Link States (Area 0)
Routing Bit Set on this LSA
LS age: 1919
LS Type: Intra-Area-Prefix-LSA
Link State ID: 0
Advertising Router: 10.0.0.2
LS Seq Number: 80000003
Checksum: 0xA2D6
Length: 52
Referenced LSA Type: 2001
Referenced Link State ID: 0
Referenced Advertising Router: 10.0.0.2
Number of Prefixes: 1
Prefix Address: 2001:DB8::2
Prefix Length: 128, Options: LA, Metric: 0
11. Routing Bit Set on this LSA
LS age: 910
LS Type: Intra-Area-Prefix-LSA
Link State ID: 5120
Advertising Router: 10.0.0.2
LS Seq Number: 80000003
Checksum: 0xDDCC
Length: 44
Referenced LSA Type: 2002
Referenced Link State ID: 5
Referenced Advertising Router: 10.0.0.2
Number of Prefixes: 1
Prefix Address: 2001:DB8:1::
Prefix Length: 64, Options: None, Metric: 0
Routing Bit Set on this LSA
LS age: 925
LS Type: Intra-Area-Prefix-LSA
Link State ID: 6144
Advertising Router: 10.0.0.2
LS Seq Number: 80000005
Checksum: 0xB7EB
Length: 44
Referenced LSA Type: 2002
Referenced Link State ID: 6
Referenced Advertising Router: 10.0.0.2
Number of Prefixes: 1
Prefix Address: 2001:DB8:1::
Prefix Length: 64, Options: None, Metric: 0
On R4 the Inter-Area-Router LSA which has a new name. It is advertised by the ABR R4 to find
the ASBR R6:
R2show ipv6 ospf data inter-area router
OSPFv3 Router with ID (10.0.0.2) (Process ID 1)
Inter Area Router Link States (Area 0)
Routing Bit Set on this LSA
LS age: 312
Options: (V6-Bit, E-Bit, R-bit, DC-Bit)
LS Type: Inter Area Router Links
Link State ID: 167772166
Advertising Router: 10.0.0.4
LS Seq Number: 80000003
Checksum: 0x6C69
Length: 32
Metric: 1
Destination Router ID: 10.0.0.6
R2show ipv6 ospf data link
OSPFv3 Router with ID (10.0.0.2) (Process ID 1)
Link (Type-8) Link States (Area 0)
LS age: 1285
Options: (V6-Bit, E-Bit, R-bit, DC-Bit)
LS Type: Link-LSA (Interface: GigabitEthernet0/0)
Link State ID: 5 (Interface ID)
Advertising Router: 10.0.0.2
LS Seq Number: 80000005
Checksum: 0xC57F
Length: 44
Router Priority: 1
Link Local Address: FE80::C801:2FF:FE69:8
Number of Prefixes: 0
12. Let’s take a look at a Backbone router Database now:
R2sh ipv6 ospf database
OSPFv3 Router with ID (10.0.0.2) (Process ID 1)
Router Link States (Area 0)
ADV Router Age Seq# Fragment ID Link count Bits
10.0.0.2 1202 0x80000016 0 3 None
10.0.0.3 1169 0x80000015 0 3 B
10.0.0.4 1813 0x80000018 0 2 B
10.0.0.5 294 0x80000012 0 3 None
Net Link States (Area 0)
ADV Router Age Seq# Link ID Rtr count
10.0.0.2 1202 0x80000009 5 3
10.0.0.2 1454 0x80000008 6 2
10.0.0.2 1712 0x80000008 7 2
10.0.0.3 1169 0x80000008 7 2
10.0.0.5 1047 0x80000008 5 2
Inter Area Prefix Link States (Area 0)
ADV Router Age Seq# Prefix
10.0.0.3 927 0x80000007 2001:DB8:1000::/64
10.0.0.4 1814 0x80000007 2001:DB8:2::/64
Inter Area Router Link States (Area 0)
ADV Router Age Seq# Link ID Dest RtrID
10.0.0.4 325 0x80000007 167772166 10.0.0.6
Link (Type-8) Link States (Area 0)
ADV Router Age Seq# Link ID Interface
10.0.0.2 1969 0x80000008 5 Gi0/0
10.0.0.3 1685 0x80000008 6 Gi0/0
10.0.0.4 1087 0x80000009 5 Gi0/0
10.0.0.2 1969 0x80000008 7 Gi2/0
10.0.0.3 1685 0x80000008 5 Gi2/0
10.0.0.2 707 0x80000009 6 Gi1/0
10.0.0.5 548 0x8000000C 6 Gi1/0
Intra Area Prefix Link States (Area 0)
ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
10.0.0.2 1969 0x80000008 0 0x2001 0
10.0.0.2 950 0x80000008 5120 0x2002 5
10.0.0.2 951 0x8000000A 6144 0x2002 6
10.0.0.3 1686 0x80000008 0 0x2001 0
Type-5 AS External Link States
ADV Router Age Seq# Prefix
10.0.0.6 158 0x80000007 2001:DB8:AAA1::/48
10.0.0.6 158 0x80000007 2001:DB8:AAA2::/48
10.0.0.6 158 0x80000007 2001:DB8:AAAA::/48
13. If we change the Network type to Point-to-Point for the Gigabit Interfaces, the Net Link State will disappear and the
convergence will be optimized since there will be no DR/BDR Election. Let’s go!
We can check on R2, only one network remains BROADCAST with 2 neighbors:
R2(config-if)#do sh ipv6 ospf neighbor
Neighbor ID Pri State Dead Time Interface ID Interface
10.0.0.4 1 FULL/DR 00:00:30 5 GigabitEthernet0/0
10.0.0.3 1 FULL/BDR 00:00:36 6 GigabitEthernet0/0
10.0.0.3 1 FULL/ - 00:00:36 5 GigabitEthernet2/0
10.0.0.5 1 FULL/ - 00:00:33 6 GigabitEthernet1/0
R2(config-if)#do show ipv6 ospf database
OSPFv3 Router with ID (10.0.0.2) (Process ID 1)
Router Link States (Area 0)
ADV Router Age Seq# Fragment ID Link count Bits
10.0.0.2 293 0x80000062 0 3 None
10.0.0.3 291 0x8000005B 0 3 B
10.0.0.4 294 0x80000043 0 2 B
10.0.0.5 530 0x8000001A 0 3 None
Net Link States (Area 0)
ADV Router Age Seq# Link ID Rtr count
10.0.0.4 299 0x80000002 5 3
Inter Area Prefix Link States (Area 0)
ADV Router Age Seq# Prefix
10.0.0.3 798 0x80000009 2001:DB8:1000::/64
10.0.0.4 1632 0x80000008 2001:DB8:2::/64
Inter Area Router Link States (Area 0)
ADV Router Age Seq# Link ID Dest RtrID
10.0.0.4 150 0x80000008 167772166 10.0.0.6
Link (Type-8) Link States (Area 0)
ADV Router Age Seq# Link ID Interface
10.0.0.2 379 0x80000001 5 Gi0/0
10.0.0.3 342 0x80000001 6 Gi0/0
10.0.0.4 359 0x80000001 5 Gi0/0
10.0.0.2 514 0x8000000A 7 Gi2/0
10.0.0.3 717 0x8000000B 5 Gi2/0
10.0.0.2 525 0x8000000A 6 Gi1/0
10.0.0.5 673 0x8000000D 6 Gi1/0
Intra Area Prefix Link States (Area 0)
ADV Router Age Seq# Link ID Ref-lstype Ref-LSID
10.0.0.2 530 0x8000000C 0 0x2001 0
10.0.0.3 808 0x8000000A 0 0x2001 0
10.0.0.4 319 0x80000001 5120 0x2002 5
Type-5 AS External Link States
ADV Router Age Seq# Prefix
10.0.0.6 1978 0x80000007 2001:DB8:AAA1::/48
10.0.0.6 1979 0x80000007 2001:DB8:AAA2::/48
10.0.0.6 1979 0x80000007 2001:DB8:AAAA::/48
14. Exemple of new Prefix LSA that we had displayed before the change:
R2#show ipv6 ospf database router adv 10.0.0.2
OSPFv3 Router with ID (10.0.0.2) (Process ID 1)
Router Link States (Area 0)
LS age: 552
Options: (V6-Bit, E-Bit, R-bit, DC-Bit)
LS Type: Router Links
Link State ID: 0
Advertising Router: 10.0.0.2
LS Seq Number: 80000063
Checksum: 0x1709
Length: 72
Number of Links: 3
Link connected to: a Transit Network
Link Metric: 1
Local Interface ID: 5
Neighbor (DR) Interface ID: 5
Neighbor (DR) Router ID: 10.0.0.4
Link connected to: another Router (point-to-point)
Link Metric: 1
Local Interface ID: 7
Neighbor Interface ID: 5
Neighbor Router ID: 10.0.0.3
Link connected to: another Router (point-to-point)
Link Metric: 1
Local Interface ID: 6
Neighbor Interface ID: 6
Neighbor Router ID: 10.0.0.5
Before we changed the interface type to point to point it was:
R2show ipv6 ospf database router adv 10.0.0.2
OSPFv3 Router with ID (10.0.0.2) (Process ID 1)
Router Link States (Area 0)
LS age: 781
Options: (V6-Bit, E-Bit, R-bit, DC-Bit)
LS Type: Router Links
Link State ID: 0
Advertising Router: 10.0.0.2
LS Seq Number: 80000011
Checksum: 0x492B
Length: 72
Number of Links: 3
Link connected to: a Transit Network
Link Metric: 1
Local Interface ID: 5
Neighbor (DR) Interface ID: 5
Neighbor (DR) Router ID: 10.0.0.2
Link connected to: a Transit Network
Link Metric: 1
Local Interface ID: 7
Neighbor (DR) Interface ID: 7
Neighbor (DR) Router ID: 10.0.0.2
Link connected to: a Transit Network
Link Metric: 1
Local Interface ID: 6
Neighbor (DR) Interface ID: 6
Neighbor (DR) Router ID: 10.0.0.2
So changing to Point-to-point the Ethernet Interface not only save convergence but it also make
the computation of the SPF simpler.
18. From R4
R4#sh bgp ipv6 u sum
BGP router identifier 10.0.0.4, local AS number 65000
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
FE80::C801:5FF:FEDC:8%GigabitEthernet0/0
4 100 0 0 0 0 0 never Active
FE80::C801:5FF:FEDC:1C%GigabitEthernet0/0
4 100 0 0 0 0 0 never Active
R4#
From R4 is seems that network is flipping:
R3
*Nov 4 20:32:30.919: %OSPFv3-5-ADJCHG: Process 1, Nbr 10.0.0.2 on GigabitEthernet0/0.1 from
LOADING to FULL, Loading Donesh ipv os
*Nov 4 20:32:34.783: %OSPFv3-5-ADJCHG: Process 1, Nbr 10.0.0.1 on GigabitEthernet0/0.1 from
LOADING to FULL, Loading Donepf ne
Neighbor ID Pri State Dead Time Interface ID Interface
10.0.0.1 1 FULL/DROTHER 00:00:38 5 GigabitEthernet0/0.1
10.0.0.2 1 FULL/DR 00:00:35 5 GigabitEthernet0/0.1
R3
*Nov 4 20:32:40.183: %OSPFv3-5-ADJCHG: Process 1, Nbr 10.0.0.2 on GigabitEthernet0/0.1 from
LOADING to FULL, Loading Done
*Nov 4 20:32:40.191: %OSPFv3-5-ADJCHG: Process 1, Nbr 10.0.0.1 on GigabitEthernet0/0.1 from
LOADING to FULL, Loading Done
*Nov 4 20:32:49.751: %OSPFv3-4-ERRRCV: Received invalid packet: Bad Checksum from
FE80::C801:5FF:FEDC:8, GigabitEthernet0/0.1
*Nov 4 20:32:54.499: %OSPFv3-5-ADJCHG: Process 1, Nbr 10.0.0.1 on GigabitEthernet0/0.1 from
LOADING to FULL, Loading Done
*Nov 4 20:32:54.691: %OSPFv3-5-ADJCHG: Process 1, Nbr 10.0.0.2 on GigabitEthernet0/0.1 from
LOADING to FULL, Loading Done
*Nov 4 20:32:59.371: %OSPFv3-4-ERRRCV: Received invalid packet: Bad Checksum from
FE80::C801:5FF:FEDC:8, GigabitEthernet0/0.1
*Nov 4 20:32:59.439: %OSPFv3-5-ADJCHG: Process 1, Nbr 10.0.0.2 on GigabitEthernet0/0.1 from
LOADING to FULL, Loading Done
This is a tricky situation when network is sometime working and sometime not! I hate this
situation but i am hack buster of not ?