IPv6 OSPF and DHCP server

painlosososSoftware and s/w Development

Jun 30, 2012 (5 years and 23 days ago)

274 views

IPv6 OSPF and DHCP server
Ali Zogheib, student ID
35049185
Hakan Yildirgan, student ID 790214-T113
Markus Johnsson, student ID 870208-0196
Advanced Applied Routing 7.5 hp
Halmstad University
School of IDE
February 2010
Supervisor – Magnus Johnsson
Abstract
This report is based on a simulation of a dual stack network running IPv4 and IPv6 over OSPF. The

first chapter gives an introduction to the work, while in the next three chapters IPv6, OSPFv3 and

DHCP server is brought up.
Chapter 5 and 6 shows the configurations and simulations done in the project, ending with some

conclusions in chapter 7.
In the appendixes is the topology and an address table for the network used in the simulation. In the

appendixes is also the final router configurations.
Table of contents
1. Introduction
........................................................................................................................................
1
2. Introduction to IPv6
............................................................................................................................
1
3. OSPFv3
................................................................................................................................................
2
3.1 Similarities between OSPF version 2 and 3
..................................................................................
2
3.2 Differences between OSPF version 2 and 3
.................................................................................
2
3.3 OSPF virtual link
...........................................................................................................................
3
4. DHCP server
........................................................................................................................................
3
5. Configurations
....................................................................................................................................
3
6. Simulations
.........................................................................................................................................
5
7. Conclusions
.......................................................................................................................................
10
8. References
........................................................................................................................................
10
Appendix
..............................................................................................................................................
11
Appendix A. Topologies
...................................................................................................................
11
Appendix B. Address table
...............................................................................................................
12
C. Final configurations file
...............................................................................................................
13
1. Introduction
The rapid growth of IP devices today have led to a shortage of IP addresses. IPv6 will solve this problem,

along with some other improvements as well. It is important to understand the fundamentals of IPv6 and

how to configure complex and well working networks with this new protocol. How to make the transition

from IPv4 to IPv6 in a network can be made with different solutions.
The authors of this report have, in the network simulation tool GNS3, built a network consisting of four

routers
running both IPv4 and IPv6, using dual stack as the transition method. The reason for choosing dual

stack is to simulate a situation where a network wants to be prepared for the future transition to IPv6,

while still maintaining the function of the current IPv4 network.
The routing protocol used is OSPF version 2

and 3, using multiple areas and virtual links.
The network also includes a DHCP server which distribute IPv4 addresses to nodes connected to the four

different routers. The nodes are simulated using Microsoft loopback adapters. The reason for using GNS3

simulation program is that you can run the real router images in it, meaning that the results are exactly the

same as with real equipment.
2. Introduction to IPv6
The new and improved version of IP have a lot of features and improvements from the older version, IPv4.

Some of these are[1]:

With the use of 128 bits for the IP address, there is approximately 5*10
28
addresses for each person

in the world.

The larger address space leads to end-to-end connections without the need of Network Address

Translation.

Simpler header which makes the routers more efficient.

Mobile IP is used as a standard, which enables connections to stay open even though the device is

moving to different locations.

IPsec is mandatory in IPv6 which makes it more secure than IPv4, where IPsec was optional.
1
3. OSPFv3
IPv6 supports many routing protocols, one of which is Open Shortest Path First (OSPF). OSPF is a link-state

routing protocol, which means that every router in the area has the same link-state database. The database

contains the paths to every other router in the area. The information stored in the database is received

from advertisements that is sent over the network. Using Dijkstra's algorithm, the shortest path to different

destinations is then calculated on each router from the information in the database. The shortest path is

stored in the routing table.
The new version of OSPF, version 3, is based on OSPFv2 that runs over IPv4. Some similarities exist between

the two versions, but some changes had to be made to support the increased address space in IPv6 and

other changes in the protocol.
3.1 Similarities between OSPF version 2 and 3
Much of the basic operations from OSPFv2 is left unchanged in the new version.[2] The five different packet

types sent by the OSPF protocol (Hello, Database Description, Link State

Request/Update/Acknowledgment) are kept, although with some changes to the fields in the packets. The

procedure for discovering neighbors and establishing adjacency are exactly the same in OSPFv3, also aging

and the flooding of link state advertisements (LSAs) are kept the same.
Still supported in OSPFv3 is the use of the protocol over different network topologies, such as nonbroadcast

multiacces and point-to-multipoint. Different variations of stub areas are also in this version.
The next section will discuss some of the changes that has been made from OSPFv2 to OSPFv3.
3.2 Differences between OSPF version 2 and 3
As mentioned earlier, some changes had to be made in OSPFv3 to handle the increased address space and

changes in protocols. This section will describe some of these changes. For more information see [4].
In OSPFv2, an interface was connected to a network or a subnet, in OSPFv3 the interface is instead connec
-
ted to a link. There is a change in the terminology, since in the RFC describing IPv6, the term link will be

used to describe
“a communication facility or medium over which nodes can communicate at the link layer,

i.e., the layer immediately below Ipv6.”[5]
The content of Hello packets and LSAs is affected by this change and also the configuration of the routing

protocol.
The IPv6 addresses are now part of the payload information, instead of the OSPF header. The neighboring

router can no longer use a IPv4 address to identify itself, it must now use the Router ID.
Where to send the LSAs have been changed. The LS field in the LSAs can be coded to send only on the link,

across the area or to the whole routing domain.
The Authentication and AuType fields from OSPFv2 have been removed. The reason is that OSPF now relies

on IPv6 to handle the security, with the IPv6 extension headers AH and ESP. Other changes to the OSPF

packet includes:

The Options field has been increased to 24 bits.
2

The Hello packet contains no address information, instead it uses a interface ID to identify
interfaces on the link.

Two bits have been added to the Options field, the R-bit and the V6-bit, which is used during the

SPF-calculation.

The packet header now includes an Instance ID, which make it possible to run multiple OSPF in
-
stances over a single link.
3.3 OSPF virtual link
One feature with OSPF is the ability to divide a routing domain into separate areas, in order to minimize the

traffic and routing updates being sent across the network. In both OSPF version 2 and 3, all areas must be

connected with at least one router to the backbone area, area 0. However, there is a way to work around

this, although it is not recommended as a permanent solution.
By the use of a virtual tunnel it is possible for an area which is not connected to the backbone, to reach the

backbone via a tunnel through a transit area.
OSPF virtual tunnels is supported in OSPFv3.
4. DHCP server
The purpose of a DHCP server is to dynamically assign IP addresses to IP devices. The DHCP service can run

on a server or a router. The process for a DHCP client to dynamically achieve a IP address is as follows:
1.
In order to locate a DHCP server, the client broadcasts a DHCPDISCOVER message.
2.
DHCP servers that receive the broadcast sends back a DHCPOFFER that contains configuration

parameters, such as IP address, DNS, default gateway and lease time.
3.
The host sends a DHCPREQUEST to a DHCP server, requesting the server's offer.
4.
The server acknowledges the client's message with a DHCPACK. The client now has a IP address.
5. Configurations
This section will describe the configurations made to a network using OSPF with multiple areas in a IP dual

stack solution. See Apendix A,B and C for topology, addressing table and start-up configurations. Routers

used were Cisco 7200 router image.
Both the IPv4 and IPv6 addresses are private and only valid on the local area network. To simulate more

connections to the routers, loopback interfaces have been configured with IPv6 addresses. In order to

configure the interfaces, the following commands were entered:
Stockholm(config)#
interface Loopback 0
Stockholm(config-if)#
ipv6 address FEC0::100:1/112
Stockholm(config-if)#
no shutdown
3
The following commands starts the OSPFv3 process and selects a router ID:
Stockholm(config)#
ipv6 router ospf 1
Stockholm(config)#
router-id 10.0.0.1
The
network
statement from OSPFv2 to specify which addresses to add to the routing process, have been

changed in OSPFv3. The routing protocol now specifies interfaces to the routing process. In order to add an

interface to the OSPFv3 routing process, the following commands were entered:
Halmstad(config)# i
nterface Serial1/0
Halmstad(config-if)#
ipv6 ospf 20 area 0
With the use of areas, it is possible to summarize the routes being sent between the different areas, in

order to minimize the traffic and routing tables over the network. These three networks on Halmstad

router can be summarized into just one network that is sent in the OSPF updates:
Loopback 0: FEC0::20:1/112
Loopback 1: FEC0::21:1/112
Loopback 2: FEC0::23:1/112
To configure the summary the following commands must be entered on the router:
Halmstad(config)#
ipv6 router ospf 20
Halmstad(config-rtr)#
area 2 range FEC0::20:0/110
As noticed in the topologies in Appendix A, the router named Kiruna is not connected to backbone area 0,

which means that a virtual link has to be established, using the area between Kiruna and Halmstad as a

transit area. To configure a virtual link, the following commands were entered on the routers Kiruna and

Halmstad:
Kiruna(config)#
ipv6 router ospf 10
Kiruna(config-rtr)#
router-id 10.1.1.1
Kiruna(config-rtr)#
area 12 virtual-link 10.2.2.2
Halmstad(config)#
ipv6 router ospf 20
Halmstad(config-rtr)#
router-id 10.2.2.2
Halmstad(config-rtr)#
area 12 virtual-link 10.1.1.1
The Kiruna router is supposed to simulate a connection to an external network on its Loopback 1 interface

and distribute a default route to the other routers in the network. To define and distribute a default route,

these commands are to be entered:
Kiruna(config)#
ipv6 route ::/0 Loopback
1
Kiruna(config)#
ipv6 router ospf 10
Kiruna(config-rtr)#
default-information originate
4
To configure DHCP, a pool has to be configured on the router. The pool specifies which addresses to include

in the distribution, default gateway and DNS. In the router it is also possible to exclude some addresses that

are not to be distributed.
Enter the following commands to configure the router as a DHCP server:
Stockholm(config)#
ip dhcp excluded-address 172.16.1.1 172.16.1.5
Stockholm(config)#
ip dhcp pool Pool_Kiruna
Stockholm(config-dhcp)#
network 172.16.1.0 255.255.255.0
Stockholm(config-dhcp)#
default-router 172.16.1.1
Stockholm(config-dhcp)#
dns-server 172.16.1.2
The hosts find DHCP servers by sending broadcast messages. Broadcast messages are not forwarded by

routers. If there is a router between the DHCP client and the DHCP server, the client will not be able to

reach the DHCP server, unless an ip helper-address is configured.
In order to configure an ip helper-address, write the following commands on the router that lies between

the DHCP client and the DHCP server:
Kiruna(config)#
interface FastEthernet2/0
Kiruna(config-if)#
ip helper-address 10.0.0.6
6. Simulations
The simulations show complete IPv4 and IPv6 network connectivity. It also shows that the DHCP is

successfully distributing IPv4 addresses to the loopback interfaces connected to the different nodes. The

figures below show the IPv4 and IPv6 routing tables of the routers. A path exists to every other network.
5
Figure 1. Routing table of IPv4 network in Stockholm router
6
Figure 2.Routıng table of IPv4 network in Kiruna router
Figure 3. Routing table of IPv4 network in Jonkoping router
Figure 4. Routing table of IPv4 network in Halmstad router
7
Figure 5. Routing table of IPv6 network in Stockholm router
Figure 6. Routing table of IPv6 network in Kiruna router
8
Figure 7. Routing table of IPv6 network in Jonkopıng router
Figure 8. Routing table of IPv6 network in Halmstad router
The following picture display the command prompt of the loopback adapters, showing the addresses

received from the DHCP server. The next picture show the ability to ping those addresses, indicating that

these networks are reachable.
9
Figure 9. Command prompt of loopback interfaces
Figure 10. Results from pinging the loopback interfaces
7. Conclusions
Our simulations show that is possible and quite simple to implement a dual stack environment in a

network, where both IPv4 and IPv6 is represented. The network is scalable and will work well in a larger

scale as well. The transition to IPv6 will not happen over night, but this project shows that the possibility to

work with both protocols is successful.
8. References
[1] Cisco Networking Academy Program “
CCNP: Building Scalable Internetworks, chapter 8.1.2 IPv6

Features”
version 5.0.3.0, login required
[2] Cisco Networking Academy Program “
CCNP: Building Scalable Internetworks, chapter 8.4.3 Similarities

between OSPFv2 and OSPFv3”
version 5.0.3.0, login required
[3] Cisco Networking Academy Program “
CCNP: Building Scalable Internetworks, chapter 5.5 DHCP”,

versıon 5.0.3.0,

login required
[4] RFC 5340 “
OSPF for IPv6”
[5] RFC 2460 “
Internet Protocol, version 6”
10
Appendix
Appendix A. Topologies
11
Figure 11. Network topology with interfaces
Figure 12. Network topology with OSPFv3 areas and loopback IPv6 addresses
Appendix B. Address table
Router
Interface
IPv4
address

IPv6
address

Kiruna
Loopback 0
n/a
FEC0::10:1/112
Kiruna
FastEthernet2/0
172.16.1.1/24
n/a
Kiruna
Serial 1/1
10.0.0.1/30
FEC0::12:1/112
Halmstad
Loopback 0
n/a
FEC0::20:1/112
Halmstad
Loopback 1
n/a
FEC0::21:1/112
Halmstad
Loopback 2
n/a
FEC0::23:1/112
Halmstad
FastEthernet2/0
172.16.2.1/24
n/a
Halmstad
Serial 1/0
10.0.0.5/30
FEC0::2:2/112
Halmstad
Serial 1/1
10.0.0.2/30
FEC0::12:2/112
Stockholm
Loopback 0
n/a
FEC0::100:1/112
Stockholm
FastEthernet2/0
172.16.10.1/24
n/a
Stockholm
Serial 1/2
10.0.0.6/30
FEC0::2:1/112
Stockholm
Serial 1/3
10.0.0.9/30
FEC0::3:1/112
Jonkoping
Loopback 0
n/a
FEC0::30:1/112
Jonkoping
Loopback 1
n/a
FEC0::40:1/112
Jonkoping
Loopback 2
n/a
FEC0::50:1/112
Jonkoping
FastEthernet2/0
172.16.3.1/24
n/a
Jonkoping
Serial 1/0
10.0.0.10/30
FEC0::3:3/112
Table 1. Addressing table
12
C. Final configurations file
Router Halmstad
hostname Halmstad
ip cef
ipv6 cef
ipv6 unicast-routing
interface Loopback0
no ip adress
ipv6 address FEC0::20:1/112
ipv6 ospf 20 area 2
interface Loopback1
no ip adress
ipv6 address FEC0::21:1/112
ipv6 ospf 20 area 2
interface Loopback2
no ip adress
ipv6 address FEC0::23:1/112
ipv6 ospf 20 area 2
interface Serial1/0
ip address 10.0.0.5 255.255.255.252
ip ospf 2 area 0
ipv6 address FEC0::2:2/112
ipv6 ospf 20 area 0
interface Serial1/1
ip address 10.0.0.2 255.255.255.252
ip ospf 2 area 0
ipv6 address FEC0::12:2/112
ipv6 ospf 20 area 12
interface FastEthernet2/0
ip address 172.16.2.1 255.255.255.0
ip helper-address 10.0.0.6
router ospf 2
passive-interface default
no passive-interface Serial1/0
no passive-interface Serial1/1
network 10.0.0.4 0.0.0.3 area 0
network 172.16.2.0 0.0.0.255 area 0
ipv6 router ospf 20
router-id 10.2.2.2
area 2 range FEC0::20:0/110
area 12 virtual-link 10.1.1.1
line con 0
logging synchronous
Router Jonkoping
hostname Jonkoping
ip cef
ipv6 cef
ipv6 unicast-routing
13
interface Loopback0
no ip adress
ipv6 address FEC0::30:1/112
ipv6 ospf 30 area 3
interface Loopback1
no ip adress
ipv6 address FEC0::40:1/112
ipv6 ospf 30 area 3
interface Loopback2
no ip adress
ipv6 address FEC0::50:1/112
ipv6 ospf 30 area 3
interface Serial1/0
ip address 10.0.0.10 255.255.255.252
ip ospf 3 area 0
ipv6 address FEC0::3:3/112
ipv6 ospf 30 area 0
interface FastEthernet2/0
ip address 172.16.3.1 255.255.255.0
ip helper-address 10.0.0.9
router ospf 3
passive-interface default
no passive-interface Serial1/0
network 10.0.0.8 0.0.0.3 area 0
network 172.16.3.0 0.0.0.255 area 0
ipv6 router ospf 30
router-id 10.3.3.3
area 3 range FEC0::30:0/112
area 3 range FEC0::40:0/112
area 3 range FEC0::50:0/112
line con 0
logging synchronous
Router Stockholm
hostname Stockholm
ip cef
ipv6 cef
no ip dhcp use vrf connected
ip dhcp excluded-address 172.16.1.1 172.16.1.5
ip dhcp excluded-address 172.16.2.1 172.16.2.5
ip dhcp excluded-address 172.16.3.1 172.16.3.5
ip dhcp pool Pool_Kiruna
network 172.16.1.0 255.255.255.0
default-router 172.16.1.1
dns-server 172.16.1.2
ip dhcp pool Pool_Halmstad
network 172.16.2.0 255.255.255.0
default-router 172.16.2.1
dns-server 172.16.2.2
ip dhcp pool Pool_Jonkoping
network 172.16.3.0 255.255.255.0
14
default-router 172.16.3.1
dns-server 172.16.3.2
ip dhcp pool Pool_Stockholm
network 172.16.10.0 255.255.255.0
ip dhcp pool Pool_ALL
ipv6 unicast-routing
interface Loopback0
no ip adress
ipv6 address FEC0::100:1/112
ipv6 ospf 1 area 0
interface Serial1/2
ip address 10.0.0.6 255.255.255.252
ip ospf 10 area 0
ipv6 address FEC0::2:1/112
ipv6 ospf 1 area 0
clock rate 64000
interface Serial1/3
ip address 10.0.0.9 255.255.255.252
ip ospf 10 area 0
ipv6 address FEC0::3:1/112
ipv6 ospf 1 area 0
clock rate 64000
interface FastEthernet2/0
ip address 172.16.10.1 255.255.255.0
router ospf 10
passive-interface default
no passive-interface Serial1/2
no passive-interface Serial1/3
network 10.0.0.4 0.0.0.3 area 0
network 10.0.0.8 0.0.0.3 area 0
network 172.16.10.0 0.0.0.255 area 0
ipv6 router ospf 1
router-id 10.0.0.1
line con 0
logging synchronous
Router Kiruna
hostname Kiruna
ip cef
ipv6 cef
ipv6 unicast-routing
interface Loopback0
no ip adress
ipv6 address FEC0::10:1/112
ipv6 ospf 10 area 1
15
interface Loopback1
no ip adress
ipv6 address FEC0::1000:1/112
interface Serial1/1
ip address 10.0.0.1 255.255.255.252
ip ospf 1 area 0
ipv6 address FEC0::12:1/112
ipv6 ospf 10 area 12
clock rate 64000
interface FastEthernet2/0
ip address 172.16.1.1 255.255.255.0
ip helper-address 10.0.0.6
router ospf 1
passive-interface default
no passive-interface Serial1/1
network 10.0.0.0 0.0.0.3 area 0
network 172.16.1.0 0.0.0.255 area 0
ipv6 route ::/0 Loopback1
ipv6 router ospf 10
router-id 10.1.1.1
area 12 range FEC0::10:0/112
area 12 virtual-link 10.2.2.2
default-information originate
redistribute static
line con 0
logging synchronous
16