Professional Documents
Culture Documents
Automated Ipv6 Router Renumbering On Linux
Automated Ipv6 Router Renumbering On Linux
PSUUNS International Conference on Engineering and
Environment ICEE2007, Phuket May1011, 2007
Prince of Songkla University, Faculty of Engineering
Hat Yai, Songkhla, Thailand 90112
Automated IPv6
Router Renumbering on Linux
Touchai Angchuan*, Parin Sornlertlamvanich
Centre for Network Research, Department of Computer Engineering, Faculty of Engineering,
Prince of Songkla University, Thailand
touch@coe.psu.ac.th, hirosue123@gmail.com
*Prince of Songkla University, Hat Yai, THAILAND
ICEE2007171-512
3. IMPLEMENTATION PRINCIPLE
There are 2 important parts in Router
Renumbering: 1.Management Station; 2.Router
3.1 Management Station
In the Management Station, we implemented it
based on a router renumbering daemon (rrenumd)
obtained from KAME SNAP kit (BSDs Platform)[4]. We
improved header files on Linux to recognize Router
Renumbering protocol stack. In addition, we improve
security between the Router and the Management Station Figure 2 The relationship between RRpacket format and
in order to ensure that the router renumbering command stucture in program rrenumd
were sent to the router successfully.
The management station uses router In the rrenumd program, config() function
renumbering daemon (rrenumd) to transmit Router initials some field in RR packet for sending RR
Renumbering (RR) request packets to all router in the Command message, it also contains the MatchPrefix
network, in order to perform renumbering. The Router and UsePrefix from the configuration file
Renumbering packet format has three type: 1. RR (rrenumd.conf). The rrenum_output() function sends RR
Commands which are sent to routers; 2. RR Result which Command message to the Router which is destination for
are sent by routers; 3. SNR used to synchronize reset the the renumbering.
Recorded Sequence Number to zero which guards against
message replay. These messages are ICMPv6
3.2 Router
distinguished by the ICMPv6 “Code” field and the
“Message Body” field as shown in Figure 1. For the router parts, we implemented it on
Linux based on Automated IPv6 Site Renumbering on
NetBSD[6]. We improved the Radvd to receive router
renumbering command message from the Management
Station, and it can use that message in order to renumber
based on operation in Router Renumbering protocol. We
improved a part of sending RA (Router Advertisement)
message from the router. When it is renumbered, RA
message should be changed address prefix instead of old
address prefix. After that, this RA message will be
advertised to hosts to configure their interfaces, all
functions for the Router Renumbering process in Radvd
are show in the Figure 3.
We improved Router Advertisement Daemon
Figure 1 Router Renumbering Message Format (Radvd) to accept Router Renumbering message from
management station. In process() function in Radvd
The body of an RR Command message contains program, we add a part which can receives the RR packet
sequence of zero or more Prefix Control Operations, (the icmp type equal to 138), if this RR packet is RR
each of variable length. A Prefix Control Operation has Command (the icmp code equal to 0), it will be sent to
one MatchPrefix Part of 24 octets, followed by zero or rr_command_input() function.
more UsePrefix Parts of 32 octets each. This is a Prefix The rr_command_check() in rr_command_
against which a router compares the address and prefixes input() function, it checks integrity of RR message,
configured on its interface. The Useprefix which either ICMP6_ROUTER_RENUMBERING type, length of RR
becomes or is used in forming the new Prefix. The Use Command, sequence number and segment number, and
Prefix informs specific of Valid Liftime that is the then it sends data of packet to do Router Renumbering
ICEE2007171-513
Figure 4 The new IP address generation
After that, the router will send new RA to all
hosts in its subnet. We use send_ra() function in Radvd
program, it sends new Router Advertisement (RA) which
contains new prefix, valid lifetime and preferred lifetime
to all hosts. We improve Radvd to send new RA on
interface which was matched with Match_Prefix. The
Radvd program was edited to send new RA when it
receives the RR Command from the management station.
In the real world, Router Renumbering system
may crashes or reboot, the management station does not
know for this problem, if it does not receive the report
from the router. The router should send a report to
Figure 3 Functions for the Router Renumbering process. management to solve this problem and save date which
it’s necessary. If the system crashes and reboot while the
The do_rr() function calls do_pco() for each renumbering is not finish. So, the stable sequence
Prefix Control Operations (PCOs) in a received RR number and report procedure can help for the
Command message. The rr_pco_check() in do_pco() renumbering to be successful.
function, it checks validity of the PCOs: 1. Check length For the stable sequence numbers, we add some
of MatchPrefix (rpm>rpm_matchlen) must be 0 to 128 code in the file “rrenum.c” of router (radvd) that code
inclusive, 2. Check sum of UsePrefix length and keeplen keeps value of sequence number, segment number,
(uselen + keeplen) must be between 0 and 128 inclusive. matchprefix, matchlen, interface number, useprefix,
After that, the do_use_prefix() function can get IP vltime, pltime in sequence configuration file
addresses (in get_alladdr() function) from all interfaces, “(/etc/rrseq.log)”. We always update to “/etc/rrseq.log”
it will check interface which matches with MatchPrefix file when the Router Renumbering sequence is finished
(in prefix_match() function), and it can the matched in each sequence. The report message consists of IPv6
interface to do Router Renumbering. header, RR header and RR Result which reads value in
The do_use_prefix() function checks the sequence configuration file (“/etc/rrseq.log”). The detail
Operation (Add, Change) to do following the Operation of report and stable sequence procedure is shown in
which gets from RR message, and it creates new address. Figure 5.
If Add Operation, it will add new address, valid lifetime
and preferred lifetime on interface which matches Match
Prefix. If Change Operation, it will change valid lifetime
and preferred lifetime with address on interface which
matches MatchPrefix. The newaddress() in
do_use_prefix() function creates new address via
calculate prefix length of new prefix from uselen +
keeplen (from the address of interface of the router
which matches the MatchPrefix) as show in the Figure
4. The new address is combined between new prefix and
interface identifiers (based on EUI64). If Add Operation,
new address is created from the newaddress() function,
and then it adds on that interface. If Change Operation,
that address is changed preferred lifetime and valid Figure 5 Report and Stable sequence procedure
lifetime following the RR Command from management
station. In security consideration, the connection
between the Router and the Management Station should
be protected from IPsec [5] which can encrypt data, and
all information transmitted during the authentication
process.
ICEE2007171-514
4. TESTING AND RESULT IP address on the interface of router which has
the address matched with matchprefix part that is
When the management station send the router
renumbering request packet that have the important 3ffe:5001:0::/48 from the router renumbering packet.
After renumbering occurred, the interface of router has
information so that:
the new IP address. It uses useprefix part that is
1. Operation is specifies the operation of the router
2001:200:bbbb::/48 for new IP address.
renumbering protocol.
2. Matchprefix is specifies the match address to
check matching.
3. Useprefix use for some part of makes the new
address.
4. Keeplen is specifies the number of bit of prefix
or address which matched, it take to make the
new addresses. Figure 8 Show the address on the interface “eth0” before
5. Pltime is specifies how long the prefix generated renumbering.
by stateless auto configuration.
6. Vltime is specifies how long the prefix are still
on the interface.
4.1 Router Renumbering testing: first Scenario
Connect the Management Station (Linux),
Router (Linux) and Host together. The configuration
information for the Router Renumbering are in
Management Station, in the file called Figure 9 Show the address on the interface “eth0” after
rrenumd_linux.conf which has 2 sequences, sequence renumbering.
number 1 is CHANGE Operation, and sequence number
2 is ADD Operation. 4.2 Second Scenario: test Report and Stable sequence
When the management station transmits the RR number
message to the router. And then, the router receives and
processes the router renumbering request packets. The
router will mask the matched address to delete then will
be adding the new address and then delete the old
address which is marked.
CHANGE Operation
IP address on the interface matches with Match
Prefix part that is 3ffe:5001:0::/48 from the router
Figure 10 Show testing for sequence number and report
renumbering packet. After renumbering occurred, the
interface of router has the new valid and preferred
Packet was sent by the management station on
lifetime. The old IP address has gone the interface when
Linux for CHANGE Operation which is Sequence
preferred and valid lifetime value is equal to zero.
number 1, and it sets R flags to request result from the
router. The Router does Router Renumbering process
which receives RR Command message from
management station that is used to request report
message. The step of router checks sequence, do router
renumbering, write file /etc/rrseq.log to update data and
send report message to management station.
Figure 6 Show the address on the interface “eth0” before
renumbering.
Figure 7 Show the address on the interface “eth0” after
renumbering.
ADD Operation
ICEE2007171-515
The Management Station sends RR Command [3] T. Narten, E. Nodmark and W. simpson, “Neighbor
message with a new sequence number to Router. If Discovery for IP Version 6”, RFC 2461, December 1998.
Router do renumbering success, then router save new
data. After that, the router send report message to the [4] KAME, “KAME SNAP kit”, www.kame.net.
Management Station, as show in Figure 11. [5] S. Kent and R. Atkinson, “Security Architecture for
the Internet Protocol”, RFC 2401, November 1998.
Figure 11 Show Management receive report message
from router
6. CONCLUSION
Automated IPv6 site renumbering on Linux for
the administrator to have alternative choices which need
used operating system on Linux. This project is
developed to change addresses automatically. Changing
of IP address information associated with hosts and
subnet is called Renumbering.
Automated IPv6 site renumbering on Linux
ports Router Renumbering Daemon (rrenumd) from
NetBSD in a part of Management Station. In Router site,
implement Radvd (Router Advertisement Daemon on
Linux) to support Router Renumbering protocol. In part
of Management, we port rrenumd to startup on Linux
already and we edit rrenumd that can retransmit and wait
for the report message from router. In part of Router, we
edit the Radvd to do Router Renumbering and making
sure that all of the router renumbering is completed. We
add part of update configuration file in Radvd for the
router remembers having completed that renumbering.
So, it’s not attempted again, and we add part of check
sequence number, this case solves problem of old
sequence number in management station. Sending a
report message to the management station, it can know
the router that could receive RR command and do Router
Renumbering completely. In another case, if Router
reboots while do Change Operation not completed (valid
time and preferred time not time is up). We add a part of
check and save time algotrithm to solve this problem.
Later, we use AH protocol for makes sure that the
delivered data is authentic, and it’s arrived at the router
without modification.
This project intends to implement Management
Station and Router for benefit of Administrator that uses
operating system on Linux. Present day, Linux can’t
support Router Renumbering protocol. We would like to
support it, because of many administrators work with
operating system on Linux.
5. REFERENCES
[1] M. Crawford, “Router Renumbering for IPv6”, RFC
2894, August 2000.