Set Up of our IPv6 Test Bed

De Ensiwiki
Aller à : navigation, rechercher
Project schedule.png
Titre du projet VoIP et Mobilité IPv6
Cadre Projets de spécialité
Page principale Projet de spécialité VoIP et Mobilité IPv6


The test bed described here has been set up in room E303 at Ensimag, and using a Switch we took from the network lab (D201/D202). We set up the following architecture:


Planreseau.png

Note: On the last days of the project, we added a 2nd visited network, which does not appears in the above diagramm. This additional network is composed of VLAN5, on below configurations. This article sums up the steps we followed.


VLANs Configuration

Note for Ensimag students: This step has already been done during the 2nd year networking labs... so have a look at your notes!

Switch Configuration

Configuration interface is reachable either via serial bus or via ethernet port #1. Note that the 2nd option requires that the switch has an IP address on this port, and that this port belongs to default VLAN; Note also that an hardware reset will destroy this IP address, so that you will have to connect via serial interface!

At Ensimag, Switches are configured to be reachable throught port #1 at 192.168.0.254.

To enter the switch configuration window, connect a PC to port #1, open a terminal and type:

  telnet 192.168.0.254

Then enter configuration mode:

   HP ProCurve Switch 6108# conf


Useful Commands

  • See running configuration:
   HP ProCurve Switch 6108# show running config
   or
   HP ProCurve Switch 6108# sh ru
  • Create a vlan:
   HP ProCurve Switch 6108# vlan num_vlan(X)
   HP ProCurve Switch 6108(vlan-X)#
  • Assign a port to a VLAN
    • If the port belongs to only one VLAN:
   HP ProCurve Switch 6108(vlan-X)# untagged port_nr
    • If the port belongs to more than one VLAN:
   HP ProCurve Switch 6108(vlan-X)# tagged port_nr_1
   HP ProCurve Switch 6108(vlan-X)# tagged port_nr_2
   and so on


  • Remove a port from a VLAN:
   HP ProCurve Switch 6108(vlan-X)#forbid
  • Exit the configuration / Come back to previous context:
   HP ProCurve Switch 6108(vlan-X)# exit
   HP ProCurve Switch 6108# exit
  • Help:
   HP ProCurve Switch 6108(vlan-X)# ?

For information, the listing of our show running config:

Computer configuration: Virtual Interfaces

Relevant only for PCs belonging to several VLANs, assuming that they do not have several ethernet interfaces; if your PCs have 2 ethernet interfaces, just ignore this section.

Principle: Share the physical interface between 2 (or more) virtual interfaces; Note that the physical interface must not be used anymore!

How to create and configure a virtual interface

On Linux, you have to install the vlan package, and activate the corresponding module:

   sudo aptitude install vlan
   sudo modprobe 8021q
  • Create the virtual interfaces:
   vconfig add eth0 2
   vconfig add eth0 3

Note: The number following eth0 must be the number of the associated VLAN.

  • Put the interfaces up:
   ifconfig eth0.2 up
   ifconfig eth0.3 up
  • Then do not forget to assign the IP addresses, in case you are not using stateless autoconfiguration; for routers interfaces, we advise you to use static IP addresses.

Routers Configuration

Some of our machines have been configured with static IPs: this is particulary relevant for routers, since the clients connected to routers should always be able to join the router. In our case, we configured all machines of VLAN2 with static IPs, to reduce the complexity of our network. Hence, our routers are the HA's, on the interface of the VLAN they care of.

Sysctl.conf

To enable routing in IPv6, you will need to add the 4 following lines to your sysctl configuration file: /etc/sysctl.conf

   net.ipv6.conf.default.forwarding=1
   net.ipv6.conf.all.forwarding=1
   net.ipv6.conf.default.proxy_ndp=1
   net.ipv6.conf.all.proxy_ndp=1

Then, relaunch sysctl:

   sysctl -p

Router Advertisement Deamon

We used radvd, an open source deamon which advertise an IPv6 prefix, using Discovery Protocol (NDP).

Installation of radvd

   sudo apt-get install radvd

Configuring radvd

The following file is the radvd configuration file, ready for IPv6 mobility; The specific IPv6 mobility options have been commented directly in the file.

   interface eth0.4 {  ## eth0.4: interface in which the PC is a router
	AdvSendAdvert on ;

	AdvDefaultLifetime 100 ;

	AdvHomeAgentFlag on ; ## for MobileIPv6
	AdvHomeAgentInfo on ; ## for MobileIPv6
	HomeAgentPreference 100 ;

	prefix 5f02::1/32 {     ## 5f02::1/32 is the address of the router, as required on MobileIPv6
		AdvOnLink on ;
		AdvAutonomous on ; 
		AdvRouterAddr on ;  ## for MobileIPv6
	};
    };

To know more about radvd options, you can read the man page of radvd.

Adding default route on the other interface

Finally, you need to add manually the default route on VLAN2, since we don't have any router deamon running on this VLAN:

   route -A inet6 add default gw 5f00::1 dev eth0.2


Damocles Specific Configuration

Since Damocles is the head of VLAN2, in which every machine has a static IP address, you do not need to install radvd on it; On the other hand, you modify its sysctl configuration file as for the HAs; Moreover, you need to add the routes to the differents VLANs on Damocles routing table:

   route -A inet6 add 5f00::2 gw 5f01::1 dev eth0
   and so on, for each VLAN



When you are done, you should check your network, ie by performing some Nomadism Experiments.