IPv6: Cisco: OSPF Example

From OnnoWiki
Revision as of 17:24, 11 January 2019 by Onnowpurbo (talk | contribs)
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search

sumber: http://www.fredrikholmberg.com/2012/05/configuring-single-area-ospfv3/


Configuring OSPFv3 is not very different from configuring OSPF for IPv4. It’s actually simpler and much cooler since it’s running on IPv6.

Either prepare a topology using GNSparser or use this one:

Single area ospfv3.png

The first thing to do is to enable IPv6 globally and configure the interfaces on each router. This includes loopback interfaces which will be used as Router IDs and IPv6 addressing for end-to-end connectivity between the routers.

Let’s start with R1:

   ipv6 unicast-routing
   !
   interface Loopback0
    ip address 1.1.1.1 255.255.255.0
   !
   interface FastEthernet0/0
    ipv6 address 2001:DB8:1000:1::1/64

And then we configure R2:

   ipv6 unicast-routing
   !
   interface Loopback0
    ip address 2.2.2.2 255.255.255.0
   !
   interface FastEthernet0/0
    ipv6 address 2001:DB8:1000:1::2/64
   !
   interface FastEthernet0/1
    ipv6 address 2001:DB8:1000:2::2/64

And the last one, R3:

   ipv6 unicast-routing
   !
   interface Loopback0
    ip address 3.3.3.3 255.255.255.0
   !
   interface FastEthernet0/0
    ipv6 address 2001:DB8:1000:2::3/64

Pretty straightforward stuff.

To verify IPv6 connectivity between R1 and R2 we’ll take ICMPv6 for a spin:

   R1#ping 2001:DB8:1000:1::2                                                
   Type escape sequence to abort.
   Sending 5, 100-byte ICMP Echos to 2001:DB8:1000:1::2, timeout is 2 seconds:
   !!!!!
   Success rate is 100 percent (5/5), round-trip min/avg/max = 20/25/40 ms

We can also verify that we’re seeing IPv6 neighbors from R1:

   R1#show ipv6 neighbors 2001:DB8:1000:1::2                                   
   IPv6 Address                              Age Link-layer Addr State Interface
   2001:DB8:1000:1::2                          1 c202.35ae.0000  STALE Fa0/0

R2 is alive!

So the next configuration step is to enable OSPFv3 on all interfaces on R1, R2 and R3 and put them in the backbone area 0. Enter interface configuration mode and type:

   ipv6 ospf 100 area 0

Notice the difference from OSPF on IPv4. Here we enable OSPF per-interface instead of using network commands.

And when we run this command IOS automatically enable the OSPFv3 process with a process ID of 100 under global configuration:

   ipv6 router ospf 100

Each router picks a Router ID using it’s local up/up loopback interface, OSPFv3 adjacencies will start forming and these messages shows up:

   R1#
   *Mar  1 01:30:30.187: %OSPFv3-5-ADJCHG: Process 100,
   Nbr 2.2.2.2 on FastEthernet0/0 from LOADING to FULL, Loading Done

On R2 we should see two OSPFv3 adjacencies:

   R2#show ipv6 ospf neighbor
   Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
   3.3.3.3           1   FULL/DR         00:00:32    4               FastEthernet0/1
   1.1.1.1           1   FULL/DR         00:00:38    4               FastEthernet0/0

To verify end-to-end IPv6 connectivity between R1 and R3, check that we have received OSPFv3 routes for R3’s prefix and do a traceroute:

   R1#show ipv6 route ospf
   IPv6 Routing Table - 4 entries
   Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
          U - Per-user Static route, M - MIPv6
          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
          D - EIGRP, EX - EIGRP external
   O   2001:DB8:1000:2::/64 [110/20]
        via FE80::C002:35FF:FEAE:0, FastEthernet0/0
   R1#traceroute 2001:DB8:1000:2::3
   Type escape sequence to abort.
   Tracing the route to 2001:DB8:1000:2::3
     1 2001:DB8:1000:1::2 24 msec 20 msec 24 msec
     2 2001:DB8:1000:2::3 40 msec 44 msec 44 msec


Also notice how OSPFv3 use link-local addresses to form neighbor adjacencies and not global unicast addresses. Another detail to notice is how interfaces on adjacent routers are referred to using “Interface ID” or “Link ID” instead of IPv6 addresses:

   R1#show ipv6 ospf interface brief 
   Interface    PID   Area            Intf ID    Cost  State Nbrs F/C
   Fa0/0        100   0               4          10    DR    1/1
   R1#show ipv6 ospf neighbor 
   Neighbor ID     Pri   State           Dead Time   Interface ID    Interface
   2.2.2.2           1   FULL/BDR        00:00:35    4               FastEthernet0/0
   R1#show ipv6 ospf neighbor detail 
    Neighbor 2.2.2.2
       In the area 0 via interface FastEthernet0/0 
       Neighbor: interface-id 4, link-local address FE80::C002:35FF:FEAE:0
       Neighbor priority is 1, State is FULL, 6 state changes
       DR is 1.1.1.1 BDR is 2.2.2.2
       Options is 0x6739CA41
       Dead timer due in 00:00:39
       Neighbor is up for 00:12:44
       Index 1/1/1, retransmission queue length 0, number of retransmission 0
       First 0x0(0)/0x0(0)/0x0(0) Next 0x0(0)/0x0(0)/0x0(0)
       Last retransmission scan length is 0, maximum is 0
       Last retransmission scan time is 0 msec, maximum is 0 msec


That’s it. IPv6 rules




Referensi


Pranala Menarik