Friday, June 26, 2009

OSPF over IPv6


Why we need IPv6? There were some limitation in IPv4 i.e. Major Limitation was address space shortage and Minor linitation was Packet fragmentation (The default size is 1500 bytes, if a packet size is more than 1500-bytes so the packet is fragmentaed and again the packets are reassembaled at the other side. So the first and short term solution was to slow down the consumption by using DCHP server, NAT etc and another to introduces new routed protocl (long term solution) to which they called Ipng (IP next generation) and later on after developing they called it IPv6. For example, In Japan IPv6 in almost fully implemented.
Now we can assign IPv6 address on routers, pc just like IPv4, and we can also run different routing protocol on this, in this blog I will talk about OSPF over IPv6.
We have two routers and configure IPv6 addresses as show under on both routers and also the detail configuration steps of assif-gning IPv6 addresses on routers.

Router_1 serial 0/1 2001:0:0:2::1/64
Router_1 Fastethernet 0/0 2001:0:0:1::1/64
Router_2 serial 0/1 2001:0:0:2::2/64
Router_2 Fastethernet 0/0 2001:0:0:3::1/64


First of all we have to enable IPv6 on routers as by default IPv4 is enable, so to enable IPv6 we have

Router_1 (config) # ipv6 unicast-routing

Now to assing address on each interace on Router_1, the detail steps are as folllow

Router_1 (config) # interface serial 0/0
Router_1 (config-if) # ipv6 address 2001:0:0:2::1/64
Router_1 (config-if) # no shutdown
Router_1 (config) # interface fastethernet 0/0
Router_1 (config-if) # ipv6 address 2001:0:0:1::1/64
Router_1 (config-if) # no shutdown


To assing address on each interace on Router_2, the detail steps are as folllow

Router_2 (config) # interface serial 0/0
Router_2 (config-if) # ipv6 address 2001:0:0:2::2/64
Router_2 (config-if) # no shutdown
Router_2 (config) # interface fastethernet 0/0
Router_2 (config-if) # ipv6 address 2001:0:0:3::1/64
Router_2 (config-if) # no shutdown


Now to see the routing table of Router_1, we have the command

Router_1 # show ipv6 route---------------------------output shown in the figure.

Now to run OSPF on both router to ping each other fastethernet IP as they are different network ID, so

Router_1 (config) # interface serial 0/1
Router_1 (config-if) # ipv6 ospf 1 area 0


Note ./.OSPF v3-4-NORTRID: OSPF v3 process 1 could not pick a router-id, please configure manually

So remember one thing that to configure ospf on IPv6 and there is no IPv4 on that router so it will not take router id bydefault so we have to configure router-id manually and that router-id will be 32-bit ipv4 formate ip. So to configure router-id manually we have

Router_1 (config) # ipv6 router ospf 1
Router_1 (config-rtr) # router-id 10.1.1.1

Router_1 (config) # interface serial 0/1
Router_1 (config-if) # ipv6 ospf 1 area 0
Router_1 (config) # interface fastethernet 0/0
Router_1 (config-if) # ipv6 ospf 1 area 0


Do the same configurations on Router_2 as we did above just with different router-id say 20.1.1.1 for Router_2. Now see the roputiong table of Router_1, so the Router_2 fastethernet route is learened via ospf, see the figure show by red boxes.

IPv6 is difficult to remember so there is a concept of Mapping, we can map an IP against a text, say in my case I have map the Router_2 fastethernet ip with name of “lhrip” see the command for it on the figure shown with green boxes.

Router_1 (config) # ipv6 host lhrip 2001:0:0:3::1
Router_1 (config) # ping lhrip


The output of the ping command can be seen from the figure, output is show and highlighted by green boxes.

I hope it will be informative for you.

Thank you for reading.