OSPF Cisco IOS/NSSA

From Teknologisk videncenter
< OSPF Cisco IOS
Revision as of 15:13, 18 December 2013 by Rael (talk | contribs) (R1 & R2)
Jump to: navigation, search

The following topology is configured on GNS3 on Cisco 7200 Routers

Setup

The Routers have the following configuration:

R1 & R2

Configuration
R1 R2
R1#<input>show run</input>
hostname R1
!
ipv6 unicast-routing
!
interface Loopback0
 ipv6 address 2001::1/128
 ipv6 ospf 1 area 0
!
interface FastEthernet0/0
 ipv6 enable
 ipv6 ospf 1 area 0
!
interface FastEthernet0/1
 ipv6 enable
 ipv6 ospf 1 area 1
!
interface FastEthernet1/0
 ipv6 enable
 ipv6 ospf 1 area 0
!
ipv6 router ospf 1
 router-id 0.0.0.1
 log-adjacency-changes
 area 1 nssa
!
end

R1#<input>show ipv6 route</input>
IPv6 Routing Table - 8 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
<notice>ON1  ::/0 [110/2]
     via FE80::C803:9FF:FE40:8, FastEthernet0/1</notice>
LC  2001::1/128 [0/0]
     via ::, Loopback0
O   2001::2/128 [110/1]
     via FE80::C801:4FF:FE10:8, FastEthernet0/0
O   2001::3/128 [110/1]
     via FE80::C803:9FF:FE40:8, FastEthernet0/1
OI  2001::4/128 [110/2]
     via FE80::C801:4FF:FE10:8, FastEthernet0/0
O   2001::5/128 [110/1]
     via FE80::C805:CFF:FE6C:8, FastEthernet1/0
L   FE80::/10 [0/0]
     via ::, Null0
L   FF00::/8 [0/0]
     via ::, Null0
R1#<input>show ipv6 ospf database</input>

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

                Router Link States (Area 0)

ADV Router      Age         Seq#        Fragment ID  Link count  Bits
0.0.0.1         9           0x8000000E  0            2           EB
0.0.0.2         1935        0x8000000E  0            2           EB
0.0.0.5         66          0x8000000E  0            2           None

                Net Link States (Area 0)

ADV Router      Age         Seq#        Link ID    Rtr count
0.0.0.1         9           0x80000002  4          2
0.0.0.5         819         0x80000004  4          2
0.0.0.5         819         0x80000004  5          2

                Inter Area Prefix Link States (Area 0)

ADV Router      Age         Seq#        Prefix
0.0.0.1         9           0x80000002  2001::3/128
0.0.0.2         1936        0x80000001  2001::4/128

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

ADV Router      Age         Seq#        Link ID    Interface
0.0.0.1         250         0x80000005  6          Fa1/0
0.0.0.5         819         0x80000004  4          Fa1/0
0.0.0.1         250         0x80000005  4          Fa0/0
0.0.0.2         1940        0x80000004  4          Fa0/0

                Intra Area Prefix Link States (Area 0)

ADV Router      Age         Seq#        Link ID    Ref-lstype  Ref-LSID
0.0.0.1         250         0x80000005  0          0x2001      0
0.0.0.2         1940        0x80000004  0          0x2001      0
0.0.0.5         819         0x80000004  0          0x2001      0

                Router Link States (Area 1)

ADV Router      Age         Seq#        Fragment ID  Link count  Bits
0.0.0.1         9           0x80000005  0            1           EB
0.0.0.3         1683        0x80000013  0            1           E

                Net Link States (Area 1)

ADV Router      Age         Seq#        Link ID    Rtr count
0.0.0.1         9           0x80000002  5          2

                Inter Area Prefix Link States (Area 1)

ADV Router      Age         Seq#        Prefix
0.0.0.1         250         0x80000002  2001::1/128
0.0.0.1         250         0x80000002  2001::5/128
0.0.0.1         9           0x80000002  2001::2/128
0.0.0.1         9           0x80000002  2001::4/128

                Type-7 AS External Link States (Area 1)

ADV Router      Age         Seq#        Prefix
<notice>0.0.0.3         1853        0x80000006  ::/0</notice>

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

ADV Router      Age         Seq#        Link ID    Interface
0.0.0.1         250         0x80000002  5          Fa0/1
0.0.0.3         1916        0x80000001  4          Fa0/1

                Intra Area Prefix Link States (Area 1)

ADV Router      Age         Seq#        Link ID    Ref-lstype  Ref-LSID
0.0.0.3         1683        0x80000004  0          0x2001      0

                Type-5 AS External Link States

ADV Router      Age         Seq#        Prefix
<notice>0.0.0.1         9           0x80000002  ::/0
0.0.0.2         1935        0x80000001  ::/0</notice>
R1#
R2#<input>show run</input>
hostname R2
!
ipv6 unicast-routing
!
interface Loopback0
 ipv6 address 2001::2/128
 ipv6 ospf 1 area 0
!
interface FastEthernet0/0
 ipv6 enable
 ipv6 ospf 1 area 0
!
interface FastEthernet0/1
 ipv6 enable
 ipv6 ospf 1 area 2
!
interface FastEthernet1/0
 ipv6 enable
 ipv6 ospf 1 area 0
!
ipv6 router ospf 1
 router-id 0.0.0.2
 log-adjacency-changes
 area 2 nssa
!
end

R2#<input>show ipv6 route</input>
IPv6 Routing Table - 8 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
<notice>OE1  ::/0 [110/2]
     via FE80::C800:4FF:FE10:8, FastEthernet0/0</notice>
O   2001::1/128 [110/1]
     via FE80::C800:4FF:FE10:8, FastEthernet0/0
LC  2001::2/128 [0/0]
     via ::, Loopback0
OI  2001::3/128 [110/2]
     via FE80::C800:4FF:FE10:8, FastEthernet0/0
O   2001::4/128 [110/1]
     via FE80::C802:9FF:FE40:8, FastEthernet0/1
O   2001::5/128 [110/1]
     via FE80::C805:CFF:FE6C:6, FastEthernet1/0
L   FE80::/10 [0/0]
     via ::, Null0
L   FF00::/8 [0/0]
     via ::, Null0
R2#<input>show ipv6 ospf database</input>

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

                Router Link States (Area 0)

ADV Router      Age         Seq#        Fragment ID  Link count  Bits
0.0.0.1         131         0x8000000E  0            2           EB
0.0.0.2         44          0x8000000F  0            2           EB
0.0.0.5         186         0x8000000E  0            2           None

                Net Link States (Area 0)

ADV Router      Age         Seq#        Link ID    Rtr count
0.0.0.1         131         0x80000002  4          2
0.0.0.5         940         0x80000004  4          2
0.0.0.5         940         0x80000004  5          2

                Inter Area Prefix Link States (Area 0)

ADV Router      Age         Seq#        Prefix
0.0.0.1         131         0x80000002  2001::3/128
0.0.0.2         44          0x80000002  2001::4/128

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

ADV Router      Age         Seq#        Link ID    Interface
0.0.0.2         44          0x80000005  6          Fa1/0
0.0.0.5         940         0x80000004  5          Fa1/0
0.0.0.1         371         0x80000005  4          Fa0/0
0.0.0.2         44          0x80000005  4          Fa0/0

                Intra Area Prefix Link States (Area 0)

ADV Router      Age         Seq#        Link ID    Ref-lstype  Ref-LSID
0.0.0.1         372         0x80000005  0          0x2001      0
0.0.0.2         44          0x80000005  0          0x2001      0
0.0.0.5         940         0x80000004  0          0x2001      0

                Router Link States (Area 2)

ADV Router      Age         Seq#        Fragment ID  Link count  Bits
0.0.0.2         44          0x8000000E  0            1           EB
0.0.0.4         1846        0x8000000F  0            1           E

                Net Link States (Area 2)

ADV Router      Age         Seq#        Link ID    Rtr count
0.0.0.4         1846        0x80000005  4          2

                Inter Area Prefix Link States (Area 2)

ADV Router      Age         Seq#        Prefix
0.0.0.2         44          0x80000002  2001::1/128
0.0.0.2         44          0x80000002  2001::2/128
0.0.0.2         44          0x80000002  2001::5/128
0.0.0.2         44          0x80000002  2001::3/128

                Type-7 AS External Link States (Area 2)

ADV Router      Age         Seq#        Prefix
<notice>0.0.0.4         67          0x80000006  ::/0</notice>

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

ADV Router      Age         Seq#        Link ID    Interface
0.0.0.2         44          0x80000006  5          Fa0/1
0.0.0.4         1847        0x80000005  4          Fa0/1

                Intra Area Prefix Link States (Area 2)

ADV Router      Age         Seq#        Link ID    Ref-lstype  Ref-LSID
0.0.0.4         1093        0x80000004  0          0x2001      0

                Type-5 AS External Link States

ADV Router      Age         Seq#        Prefix
<notice>0.0.0.1         131         0x80000002  ::/0
0.0.0.2         44          0x80000002  ::/0</notice>
R2#

R3 & R4

Configuration
R3 R4
R3#<input>show run</input>
hostname R3
!
ipv6 unicast-routing
!
interface Loopback0
 ipv6 address 2001::3/128
 ipv6 ospf 1 area 1
!
interface FastEthernet0/0
 ipv6 enable
 ipv6 ospf 1 area 1
!
ipv6 route ::/0 Loopback0
ipv6 router ospf 1
 router-id 0.0.0.3
 log-adjacency-changes
 area 1 nssa default-information-originate metric-type 1
!
end

R3#
R4#<input>show run</input>
hostname R4
!
ipv6 unicast-routing
!
interface Loopback0
 ipv6 address 2001::4/128
 ipv6 ospf 1 area 2
!
interface FastEthernet0/0
 ipv6 enable
 ipv6 ospf 1 area 2
!
ipv6 route ::/0 Loopback0
ipv6 router ospf 1
 router-id 0.0.0.4
 log-adjacency-changes
 area 2 nssa default-information-originate metric-type 1
!
end

R4#

R5

Why is R5 using R1 as the next-hop for the default gateway? When they should be equal cost. If the areas are normal areas(not NSSA) it works fine...???

R5#<input>show run</input>
hostname R5
!
ipv6 unicast-routing
!
interface Loopback0
 no ip address
 ipv6 address 2001::5/128
 ipv6 ospf 1 area 0
!
interface FastEthernet0/0
 ipv6 enable
 ipv6 ospf 1 area 0
!
interface FastEthernet0/1
 ipv6 enable
 ipv6 ospf 1 area 0
!
ipv6 router ospf 1
 router-id 0.0.0.5
 log-adjacency-changes
!
end

R5#<input>show ipv6 route</input>
IPv6 Routing Table - 8 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
<notice>OE1  ::/0 [110/2]
     via FE80::C800:4FF:FE10:1C, FastEthernet0/0</notice>
O   2001::1/128 [110/1]
     via FE80::C800:4FF:FE10:1C, FastEthernet0/0
O   2001::2/128 [110/1]
     via FE80::C801:4FF:FE10:1C, FastEthernet0/1
OI  2001::3/128 [110/2]
     via FE80::C800:4FF:FE10:1C, FastEthernet0/0
OI  2001::4/128 [110/2]
     via FE80::C801:4FF:FE10:1C, FastEthernet0/1
LC  2001::5/128 [0/0]
     via ::, Loopback0
L   FE80::/10 [0/0]
     via ::, Null0
L   FF00::/8 [0/0]
     via ::, Null0
R5#<input>show ipv6 ospf database</input>

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

                Router Link States (Area 0)

ADV Router      Age         Seq#        Fragment ID  Link count  Bits
0.0.0.1         1785        0x8000000D  0            2           EB
0.0.0.2         1775        0x8000000E  0            2           EB
0.0.0.5         1784        0x8000000D  0            2           None

                Net Link States (Area 0)

ADV Router      Age         Seq#        Link ID    Rtr count
0.0.0.1         1785        0x80000001  4          2
0.0.0.5         658         0x80000004  4          2
0.0.0.5         658         0x80000004  5          2

                Inter Area Prefix Link States (Area 0)

ADV Router      Age         Seq#        Prefix
0.0.0.1         1713        0x80000001  2001::3/128
0.0.0.2         1776        0x80000001  2001::4/128

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

ADV Router      Age         Seq#        Link ID    Interface
0.0.0.2         1780        0x80000004  6          Fa0/1
0.0.0.5         658         0x80000004  5          Fa0/1
0.0.0.1         90          0x80000005  6          Fa0/0
0.0.0.5         658         0x80000004  4          Fa0/0

                Intra Area Prefix Link States (Area 0)

ADV Router      Age         Seq#        Link ID    Ref-lstype  Ref-LSID
0.0.0.1         90          0x80000005  0          0x2001      0
0.0.0.2         1780        0x80000004  0          0x2001      0
0.0.0.5         658         0x80000004  0          0x2001      0

                Type-5 AS External Link States

ADV Router      Age         Seq#        Prefix
<notice>0.0.0.1         1693        0x80000001  ::/0
0.0.0.2         1775        0x80000001  ::/0</notice>
R5#