Monday, June 27, 2011

Now , Time to configure IPv6 on network


One major feature of IPv6 is its ability to auto-configure the host portion of the IP address
 using the MAC address from the Network Card. We may have seen this already with the 


local-link address, however, in this tutorial will look at configuring the RAdvD on openSUSE 


11 to advertise the Network Prefix and default gateway so we can work with global addresses 


without any configuration on the hosts. This will differ from DHCP as we do not need to 


configure the RAdvD with the host addresses. These will come from the hosts own MAC 


address helping us reach Zero configuration networking. Or at least very little configuration.



Enable IPv6 Routing on the RAdvD Server


Of course, it goes without saying that, we must have IPv6 routing enabled if the server is to 

route IPv6 packets. Edit the/etc/sysctl.conf line to include the option for this. In openSUSE 

11.4 the option is there, just commented out.net.ipv6.conf.all.forwarding = 1
OpenSUSE IPV6

To read these settings into you current configuration, the /proc/sys/net/ipv6/conf/all/forwarding 

file, use the command sysctl –p . The sysctl.conf file is read at system-boot, so adding the 

settings to the file makes this change permanent.

OpenSUSE IPV6

Install and Configure RAdvD


Now that IPv6 forwarding is enabled we can install and configure the Route Advertisement 

Daemon. With openSUSE we can use zypper, other distributions will use yum or apt-get: 

zypper in radvd. The configuration of radvd is the same across all distributions.
OpenSUSE IPV6

The main configuration is maintained in the file: /etc/radvd.conf. It is always a good idea to 

make a backup of the original: cp /etc/radvd.conf /etc/radvd.conf.$(date +%F) is a good start. 

Now we can edit the .conf file. We need to advertise routes only on eth1. So we edit the file as 

such:

interface eth1

{

};

Any option added in between the braces will be read as configuration for eth1

interface eth1

{

AdvSendAdvert on;
MinRTAdvInterval 3;
MaxRTAdvInterval 10;
AdvDefaultPreference low;
AdvHomeAgent off;

};

These setting represent the minimum to advertise the default route address only to clients. 

The default route will always be the local-link address of the gateway. This accessible to all 

clients on the network so becomes the most obvious choice. Clients will send all of their IPv6 

Addresses in the header, only those headers originating from non-link-local addresses can be 

routed. To advertise the network prefix we add another code block inside the eth1 definition, 

the prefix block.

interface eth1

{

AdvSendAdvert on;
MinRTAdvInterval 3;
MaxRTAdvInterval 10;
AdvDefaultPreference low;
AdvHomeAgent off;
prefix fd81:2041:94e6:1::/64
{
AdvOnLink on;
AdvAutonomous on;
AdvRouterAddr off;
};

};

Here we are advertising a /48 bit ULA (Unique Local Address) subnetted to /64 bits: eth1 

represent the subnet 1 and eth0 on the router is connected to subnet 2. Using 64 bits for the 

network allows 64 bits for the host and then auto-configuration with the hosts MAC address. 

You can obtain your own ULA from http://www.sixxs.net/tools/grh/ula/ .

The ULA is similar to the 192.168. networks we use in IPv4 but, with IPv6, we are encouraged 

to obtain our own addresses so avoid any overlap as so many billions* of ULAs are available. 

* (2^41 or 2.2 trillion ULAs: a ULA is identified by the first 7 bits, the total length of aULA is 48 

bits giving us 48-7 bits that we can use to create a ULA)



Using the Route Advertisement Daemon only the prefix is needed to be advertised, there is 



no need to set hosts addresses. Any IPv6 client now can be connected with their own unique 


address to the fd81:2041:94e6:1::/64 network.

OpenSUSE IPV6 Route Advertisement Daemon

Test from Hosts on your Network


I can start the service with the command rcradvd start. On other distribution service radvd 

start will work. My network configuration is shown below.
Windows 7
auto-assign
RADVD router eth1 fd81:2041:94e6:1::1
RADVD router eth0 fd81:2041:94e6:2::1
SUSE Linux 10
fd81:2041:94e6:2::2
OpenSUSE IPV6
Now it is just time to check our clients. To show that this is truly a protocol feature I will use Windows 7 as my client on the 1 subnet and access the SUSE 10 host with a static IPv6 address across the router on subnet 2. I have made no changes to the Windows 7 box. First see the output of ipconfig from windows 7. You will see the default route and IPv6 address is set. The default gateway is the Link-Local address of my openSUSE box auto-configured by RAdvD.
OpenSUSE IPV6



Now the final graphic shows that using ping -6 fd81:2041:94e6:2::2 we are able to 

communicate to the different IPv6 network through the router without a pre-configured address 

or gateway.


OpenSUSE IPV6

No comments:

Post a Comment