You are on page 1of 6

1

IP Address Configuration Algorithms for Routerless and Single-Router Zeroconf


Networks
Cuneyt Akinlar A. Udaya Shankar Sarit Mukherjee David Braun

Abstract— IP hosts and network infrastructure have historically been Host Configuration Protocol (DHCP) [8], [9].
difficult to configure, requiring network services such as DHCP and DNS
servers, and relying on highly trained network administrators. This need IP address configuration of a routerless network involves on-
for administration has prevented IP networks from being used in many en- ly IP host configuration. Several IP host configuration protocols
vironments such as in homes, in small businesses, in impromptu networks have been proposed and implemented in the literature [6], [7],
established at conferences, construction sites, emergency relief stations, etc.
[3], [18], [5], [15]. The basic idea in these protocols is to config-
With the proliferation of IP-enabled network-attached appliances and
inexpensive computing devices, the demand to enable plug-and-play, easy-
ure a host from a DHCP-Server if one exists or self-configure a
to-use IP networking has increased. This demand has recently initiated link-local IP address, i.e, an IP address from 169.254/16 address
a new paradigm of IP networking called zero configuration, or zeroconf, range, in the absence of a DHCP server. A host using this legacy
networking. The goal is to develop a set of zeroconf configuration protocols IP host configuration protocol maintains a single IP address at
to enable IP networking without manual configuration or administration.
Such IP networks are called zeroconf networks. any time, switching back and forth between a link-local IP ad-
In this paper we examine IP address configuration in zeroconf net- dress and a DHCP-assigned IP address based on the presence of
works involving two network topologies: (1) A routerless network, which a DHCP-Server, which tears down existing transport-layer con-
consists of several hosts attached to a segment having no router, (2) A single- nections. We examine IP address configuration in routerless net-
router network, which consists of a router joining several segments togeth-
er into a star-shaped topology. We suggest the requirements for IP address
works in section III. We survey the existing solutions, propose
configuration, review the existing solutions, and propose new algorithms to a generic IP host configuration protocol.
address their deficiencies. Finally, we present a comparison of our algo- As the network evolves to a single-router network, IP router
rithms to existing solutions and describe when a particular configuration
method should be used. auto-configuration becomes an issue. Recently, Aboba [2], [5],
[15] proposed a simple IP address auto-configuration protocol
for single-router networks: The router assigns unique IP subnet-
I. I NTRODUCTION s to each of its interfaces from a private address range (name-
ly, 192.168.x/24) at the time of initialization, and then runs a
Zeroconf networks [12] are a class of IP networks that may mini-DHCP-Server to configure the hosts on directly attached
be established in the home, e.g., for networking of consumer segments. The problem with this method is that after the router
electronics such as TV, VCR, phone, fax, printer, PC etc., in joins a segment, all hosts using the legacy IP host configuration
the office, e.g., small office home office (SOHO) networks, or algorithm reconfigure new IP addresses from the mini-DHCP-
on an ad-hoc basis, e.g., impromptu networks between a cer- Server, which tears down existing intra-segment connections.
tain number of users such as between strangers in an airport etc. Similarly, when the router leaves the segment, hosts switch back
Given the usage and applications, typical users of such networks to link-local IP addresses, which also tears down existing con-
do not have the ability to configure or administer the network. nections. We examine Aboba’s single-router IP address con-
Such networks require zero user configuration or administration figuration algorithm in section IV. We then propose two new
for correct operation. single-router IP address configuration algorithms to solve the
Recently two initiatives have emerged to make the auto- connection break-up problem in sections V, and VI.
configuration goal a reality: Universal Plug and Play Con-
sortium (UPnP) headed by Microsoft [5], [15], and Zero- II. S COPE , T ERMINOLOGY AND A SSUMPTIONS
configuration Networking by Internet Engineering Task Force
(IETF) [1], [12], are designing a set of auto-configuration pro-
tocols to enable plug-and-play, easy-to-use IP networking in IP PC1 Scanner Printer PC2
networks lacking administered network services such as DHCP Ethernet/HomePNA/
servers, DNS server etc., and involve two network topologies: HomeRF/802.11
(1) A routerless network, which consists of several hosts at-
(a)
tached to a segment having no router, (2) A single-router net-
TV1 TV2 VCR Music Set DVD
work, which consists of a router joining several segments to- IEEE 1394/HAVI
gether into a star-shaped topology, and optionally providing In-
Camera
ternet connectivity. Home Gateway
PC1 Scanner Printer PC2
Ethernet/
Dial-up/ HomePNA
ISP
One of the main areas of auto-configuration addressed by Internet DNS-Server
Cable/ DNS-Proxy/
DNS-Server
Oven Microwave Toaster
xDSL/ Refrigerator
the above initiatives is IP Address Configuration. The problem DHCP-Server
ISDN/B-ISDN mini-DHCP-Server
Powerline

is to auto-configure IP addresses for all host and router inter- Phone PDA Laptop
faces. Administered IP host configuration protocol is Dynamic 802.11 Wireless/Bluetooth

(b)
Cuneyt Akinlar and A. Udaya Shankar are with the Department of Com-
puter Science, University of Maryland, College Park, MD 20742. Email:
f g
akinlar,shankar @cs.umd.edu Fig. 1. (a) An example routerless network, (b) An example single-router net-
work consisting of four segments.
Sarit Mukherjee and David Braun is with Panasonic Technolo-
gies Inc. Two Research Way, Princeton, NJ 08540. Email:
f g
sarit,braun @research.panasonic.com Figure 1 shows an example for each network topology con-
Proceedings of the Seventh International Symposium on Computers and Communications (ISCC’02)
1530-1346/02 $17.00 © 2002 IEEE
2

sidered in this paper. Part (a) shows a routerless zeroconf net-


INIT
work containing several home appliances. Part (b) shows a Discover/No Offer Request/Offer

single-router zeroconf network, e.g., a home network, consisting Discover/Offer


Request/Nak
of a single-router, a home gateway, joining four segments. The
home gateway connects the home network to an Internet Service Discover/Offer
Link-Local DHCP-
Provider (ISP) and provides Internet connectivity via Network Assigned
Address Translation (NAT) [17], [13], application-layer proxy- Discover/No Offer Request/Ack
Lease Expires
ing or a combination of both [10], [11].
The scope of our configuration algorithms cover only broad- Fig. 2. High-Level State Diagram of Zeroconf IP Host Configuration Algorith-
cast link-layer networks, where hosts are reachable through link- m.
layer broadcast and IP-layer multicast messages. We further as-
sume that all hosts and router interfaces are IP-capable and use
IP Version 4 (IPv4) addresses, which are 32-bit numbers. IP ad- i.e., an IP address in the range 169.254/16 [18], depending on
dresses are hierarchical in nature and consist of a network part, the presence of a DHCP-Server. In the absence of a DHCP-
subnetid, and a host part, hostid [14]. We denote an IP address Server, the host randomly selects a link-local IP address and
as IPaddrh = subnetidh.hostidh , where subnetidh is the network transits to Link-Local state. Since each host self-configures its
part of the host’s IP address and hostidh is the host part. own link-local IP address, there is a possibility of other hosts
We define a stable state to be a state of the network in which using the same IP address, which we call an IP address conflic-
all nodes have completed handling of prior topological changes t. To resolve possible IP address conflicts, a host in Link-Local
such as additions, removals or relocations of hosts, bridges, state periodically tests the uniqueness of its own IP address by
routers and DHCP servers. For each zeroconf network topol- broadcasting an ARP request [16]. In the event of an IP address
ogy, we first suggest the conditions that must hold in a stable conflict, the host having the smallest MAC address keeps its cur-
state. We then describe the IP address configuration algorithms rent IP address while all others involved in the conflict change
and show that if no further topological changes occur, then the theirs. A host in Link-Local state also looks for the presence of
algorithms transit the network from an arbitrary initial state to a a DHCP-Server periodically. When it finds one, it transits to the
stable state in finite time. DHCP-Assigned state and configures from the DHCP-Server.
This algorithm has been implemented in several commer-
III. IP A DDRESS C ONFIGURATION OF ROUTERLESS cial operating systems including Microsoft 98/98SE, 2000, ME
Z EROCONF N ETWORKS and Apple MAC OS 8.x, 9.x. Although IP stacks in these oper-
ating systems have the ability to maintain multiple IP address-
In an IP network, nodes, i.e., hosts and routers, must con- es, implementations of the above IP host configuration proto-
figure IP addresses for their interfaces before they can perform col maintain a single IP address at any time, switching between
any communication above the IP-layer. An IP address configu- the DHCP-assigned IP address and the self-configured link-
ration algorithm provides a node with the ability to configure an local IP address based on the availability of a DHCP server [4].
IP address and maintain it upon topological changes. This clearly breaks existing transport-layer connections when
In this section we consider IP address configuration of the host switches between the link-local and DHCP-assigned IP
routerless networks, which involves only IP host configuration. addresses.

A. Problem Definition and Stable State Conditions IV. IP A DDRESS C ONFIGURATION OF S INGLE -ROUTER
N ETWORKS : U NIQUE -S UBNETS M ETHOD
Consider a set of hosts H attached to a routerless segmen-
t S . Let each host h in H have an IP address IPaddrh = A single-router zeroconf network is one where a router inter-
subnetidh .hostidh. The following must be satisfied in a stable
state: connects several segments into a star-shaped topology. Figure 3
C1: If a DHCP server exists, then all hosts in H have configured from the shows a single-router network where router R joins 3 segments,
DHCP server S1, S2 and S3 together, and also connects the network to an ISP
6
C2: For all distinct hosts h1 and h2 in H : IPaddrh1 = IPaddrh2 over interface 4. Although interface 4 of router R attached to the
C3: For all distinct hosts h1 and h2 in H : subnetidh1 = subnetidh2
ISP’s network will typically be configured manually or from the
One of the properties of zeroconf algorithms is their abil- DHCP-Server present at the ISP, all other interfaces of the router
ity to default back to administered algorithms in the presence connecting internal network segments must be auto-configured.
of administered entities in the network. Since administered IP
host configuration protocol is DHCP, we want hosts to config-
A. Problem Definition and Stable State Conditions
ure from a DHCP server in the presence of one as stated by C1.
C2 and C3 state that all hosts in H must reside on the same IP Consider a router R having k interfaces labeled 1, 2, : : :, k.
subnet and have unique IP addresses. Assume that the IP address of interface i of router R is IPaddri =
subnetidi .hostidi . Let a segment Si containing a set of hosts Hi
and having no DHCP-Server be attached to interface i of router
R. Assume that fHi g is disjoint, i.e., a host is on at most one
B. IP Host Configuration Algorithm
Several automatic IP host configuration algorithms have segment. Let H = [k1 Hi be the set of all hosts in the network.
been proposed and implemented in the literature [6], [7], [5], Below we describe the conditions that must be satisfied when
such a network is in a stable state:
[15], [3]. All of these algorithms use a state diagram similar to
6
C1: For all distinct router interfaces i and j : subnetidi = subnetidj
the one shown in figure 2. A host starts at the INIT state. It con- 6 6
C2: For all distinct hosts h1 and h2 in Hi : IPaddrh1 = IPaddrh2 = IPaddri
figures a DHCP-assigned IP address or a link-local IP address, C3: For all h in Hi : subnetidh = subnetidi
Proceedings of the Seventh International Symposium on Computers and Communications (ISCC’02)
1530-1346/02 $17.00 © 2002 IEEE
3

Internet Service Provider DHCP-Server


C. Connection Break-up Problem

S3
Consider segment S1 in the network of figure 3 containing
Host A S1 4
1111
0000 11111111
00000000
00000000
11111111
hosts A and B. Suppose that before S1 is attached to interface 1
0000
1111
x.h1 t.R4

0000
1111 x.0 00000000
11111111
Router R
00000000
11111111
1 x.R1 z.R3 3 z.0 Routing Table at R of router R, the hosts A and B are operational with link-local IP
0000
1111 00000000
11111111
mini-DHCP Destination Interface NextHopRouter
addresses l:h1 and l:h2 respectively, and that there is a connec-
0000
1111
x.h2
0000
1111 11111111
00000000
11111111
00000000
y.R2 x.0 1 --
Host B 2
1111
0000
0000
1111
z.h1
y.0 2 --
tion between them. Since R configures IP subnet x:0 over S1,
1111
0000 0000
1111
Host D
z.0 3 --
hosts A and B change their IP addresses, e.g., to x:h1 and x:h2
0000
1111
y.h1
0000
1111
y.0
Zeroconf Network
Host C
S2 respectively, once they configure from the mini-DHCP-Server.
This IP address re-configuration tears down the existing con-
Fig. 3. Router R connects three internal segments S1, S2 and S3. A unique IP nection between these two hosts. Similarly, when S1 is detached
subnet x:0, y:0 or z:0 has been created over each segment and the router’s from R, hosts switch back to link-local IP addresses and exist-
interfaces have been configured with IP addresses x.R1, y.R2, and z.R3. ing local connections break again. In the next two sections, we
Router R also connects the home network to an ISP over interface 4, which
can be configured from the DHCP-Server present at the ISP.
show how a single-router network can be configured to preserve
existing intra-segment connections after a router joins or leaves
the segment.
C4: For all distinct hosts h1 and h2 in H: h1 is reachable from h2
C1 states that all of the router’s interfaces must have unique V. IP A DDRESS C ONFIGURATION OF S INGLE -ROUTER
subnetids. C2 states that all hosts on a segment including the N ETWORKS : A DDRESS R E M APPING (ARM) M ETHOD
interface of the router attached to the segment must have unique We have seen in the previous section that host IP address
IP addresses. C3 states that all hosts on a segment including reconfiguration tears down existing connections. So the key to
the interface of the router attached to the segment must have preserving existing intra-segment connections is to let hosts s-
the same subnetid. Notice that C1 combined with C3 means tay with their link-local IP addresses even after a segment is
that we create the unique IP subnet subnetidi .0 over Si . Finally, attached to or detached from a router.
C4 states the reachability requirement meaning that an IP packet
sent from a host to any other host in the network can be delivered
to its destination. Internet Service Provider DHCP-Server

S1 111111111
000000000 3 S2
000000000
111111111
000000000
111111111
Routing Table at R
B. IP Address Configuration Algorithm t.R3
1 111111111
000000000 Destination Interface NextHopRouter

L.0 000000000
111111111
x.R1 y.R2 2
L.0 x.0 1 --
000000000
111111111
000000000
111111111
y.0 2 --
Figure 4 shows Aboba’s auto-configuration algorithm. The mini-DHCP
000000000
111111111
idea is to have the router ceate a unique IP subnet over each seg- 000000000
111111111
Router R ARM Table at R

ment attached to the router from the private IP address range 1111
0000
0000
1111 0000
1111
0000
1111 0000
1111
0000
1111
RL-subnetid
x
RE-subnetid
L
Interface
1
0000
1111
L.h1 0000
1111
L.h1 0000
1111
L.h2 y L 2
192.168.x/24 during initialization. The router then starts a 0000
1111
Host A Zeroconf Network
0000
1111
Host B
0000
1111
Host C
mini-DHCP-Server to configure hosts on directly attached seg-
ments [2]. Figure 3 shows a single-router network configured
Fig. 5. An ARM router connecting two segments. All hosts continue using
using Aboba’s method, where unique IP subnets x:0, y:0 and link-local IP addresses. The router performs IP address remapping for inter-
z:0 have been created over segments S1, S2 and S3 respectively. segment communication using the ARM table.
All hosts run the IP address configuration algorithm presented
in section III and configure IP addresses from the mini-DHCP- This is illustrated in figure 5 where hosts continue using
Server. link-local IP addresses even though their segment is attached
to router R. This brings in another problem: After the router
Symbols used in the algorithm:
R: The router to be configured. connects several segments into a single-router network topol-
i: Interface i of router R. ogy, there can be hosts having the same link-local IP address
IPaddri = sidi .hidi : IP address of interface i of router R. attached to different segments. Clearly, hosts on the same seg-
Segmenti : The segment attached to interface i of router R.
Hi : The set of hosts attached to Segmenti . ment must have unique IP addresses. This problem is depicted
IPaddrh : IP address of host h. in the network of figure 5 where host A on S1 and host B on
RoutingTableR : Routing table maintained at R.
S2 have the same link-local IP address l:h1 while hosts B and
IP router configuration algorithm for R: C on S2 have unique link-local IP addresses. So the question of
I. The algorithm is initializing: how a host with a link-local IP address uniquely identifies host-
I.1. For each interface i do
I.1.1. sidi Randomly assign a unique subnetid different s on other segments and communicates with them needs to be
from those assigned to other interfaces of the router. addressed.
I.1.2. hidi Randomly assign a unique hostid.
I.1.3. Insert (sidi :0; i; ) into RoutingTableR . This section examines one solution to the above problem:
I.1.4. /* Run a mini-DHCP-Serveri to configure hosts Let hosts on different segments use the same link-local IP ad-
attached to Segmenti */ dress, but make the router treat each segment as a different ad-
For all h in Hi , mini-DHCP-Serveri distributes
(1) a unique IP address IPaddrh from dress realm and behave like a NAT router [17], [13] transpar-
IP subnet sidi :0 address range, ently remapping IP addresses from one address realm to another
(2) default router address IPaddri for h. as the packets are exchanged between different address realm-
s, i.e. segments. The next section examines an alternate solu-
Fig. 4. IP router configuration algorithm. tion: Treat all segments connected by the router as an extended
segment and make sure all hosts use network-wide unique link-
Proceedings of the Seventh International Symposium on Computers and Communications (ISCC’02)
1530-1346/02 $17.00 © 2002 IEEE
4

local IP addresses. interface i of router R. Let H = [k1 Hi be the set of all hosts
in the network. Below we describe the conditions that must be
A. The Address ReMapping: Basic Idea satisfied in a stable state.
C1: 6
For all distinct router interfaces i and j : subnetidi = subnetidj
The ARM method borrows its idea from the popular Net- C2: 6 6
For all distinct hosts h1 and h2 in Hi : IPaddrh1 = IPaddrh2 = IPaddri
C3: For all h in Hi : subnetidh = l
work Address Translation (NAT [17], RSIP [13]) techniques C4: For all distinct hosts h1 and h2 in H: h1 is reachable from h2
which are employed at border routers (gateways) to enable host-
C1 states that all of the router’s interfaces must have unique
s with link-local or private addresses, called the local realm, to
RL-subnetids. C2 and C3 state that all hosts on a segment must
communicate with hosts in the rest of the network including the
have unique link-local IP addresses. Finally, C4 states the reach-
global Internet, called the external realm. Since an IP address
ability requirement meaning that an IP packet sent from a host
out of the link-local or a private address range is not globally
to any other host in the network reaches its destination.
unique, the NAT router assigns globally-unique IP addresses to
hosts in the local realm and transparently changes the source
and/or destination IP addresses of the packets flowing in and out C. IP Address Configuration
of the local realm.
Just as a NAT router needs a way to uniquely identify Symbols used in the algorithm:
R: The router to be configured.
each host within the local realm, an ARM router needs a way
i: Interface i of router R.
to uniquely identify each host within the entire zeroconf net- IPaddri = RL-sidi .hidi : IP address of interface i of R.
work. To uniquely identify a host within the local realm, a Segmenti : The segment attached to interface i of router R.
NAT router assigns a unique router-local IP address to the host. Hi : The set of hosts attached to Segmenti .
IPaddrh : IP address of host h.
An ARM router however assigns a unique router-local subnetid ARMTableR : ARM Table maintained at router R.
to each router interface called a Router-Local subnetid (RL- RoutingTableR : Routing table maintained at router R.
subnetid). This unique RL-subnetid for a router interface com- IP router configuration algorithm for R:
bined with the segment-wide unique hostid portion of a host’s I. The algorithm is initializing:
link-local IP address for a host on the segment attached to the I.1. For each interface i do
I.1.1. RL-sidi Randomly assign a unique RL-subnetid
router interface, allows the router to uniquely identify the host different from those assigned to other interfaces of the router.
within the entire zeroconf network. The hosts on a segmen- I.1.2. hidi Randomly assign a hostid.
t always stay with their current IP addresses and reside on the I.1.3. Insert entry (RL-sidi ; l; i) to ARMTableR .
I.1.4. Insert entry (RL-sidi :0; i; ) into RoutingTableR .
link-local IP subnet (l:0) called the Router-External subnetid I.1.5. /* Run a mini-DHCP-Serveri to configure hosts
(RE-subnetid). attached to Segmenti */
For all h in Hi , mini-DHCP-Serveri distributes
(1) a unique IP address IPaddrh from
Router R the link-local IP subnet l:0 address range,
IP Layer IP Layer
S2 (2) default router address l:hidi for h.
S1 IPaddr=x.R1 IPaddr=y.R2
ARM Layer ARM Layer
l.0 x .0 l.0 y .0
Link Layer Link Layer Fig. 7. IP ARM router configuration algorithm.
l.0 NIC NIC l.0

Figure 7 shows the IP ARM router configuration algorithm.


l.h1 l.h2
The algorithm simply assigns a unique subnetid and IP address
l.h1
Host B Host C
for each interface, then inserts an entry to the routing table and
Host A
the ARM table for the interface. The ARM table is used to per-
form IP address mapping between RE-IP addresses and RL-IP
Fig. 6. Conceptual view of an ARM router connecting 2 segments. addresses. Notice that the subnetid assigned to an interface is the
RL-subnetid for hosts on the segment attached to the interface
In the network of figure 6, the router assigns unique RL- too. The router then starts a mini-DHCP-Server to configure
subnetid x to its interface 1 and y to its interface 2. So, from hosts on the segment attached to the interface.
the perspective of the router’s IP layer, host A’s IP address is We assume that each host uses the IP host configuration al-
x:h1, host B’s IP address is y:h1 and host C’s IP address is
gorithm presented in section III. Note that in order to stay with
y:h2 although hosts’ real IP addresses are l:h1, l:h1 and l:h2
its current link-local IP address while configuring from the mini-
respectively. A host identifies hosts on its own segment with DHCP server, an operational host includes its current IP address
their link-local IP addresses but hosts on other segments with in the DHCPDISCOVER message. This is accomplished by the
the router-local IP addresses. For example, from host B’s per- DHCP request IP address option (option code 50) [9]. If the
spective, host C’s IP address is l:h2 since they are on the same mini-DHCP-Server has not already assigned this IP address to
segment, but host A’s IP address is x:h1. some other host, it will grant the IP address to the host. Other-
wise, the host will get a new IP address.
B. Problem Definition and Stable State Conditions
In the reverse direction, when a host discovers that the router
Consider a router R having k interfaces labeled 1; 2; : : : ; k . has been removed, i.e., the mini-DHCP-Server does not respond
Assume that the IP address of interface i of router R is IPaddri anymore, it uses its current IP address as the initial test IP ad-
= RL-subnetidi.hostidi where RL-subnetidi is the RL-subnetid
for interface i of router R and for hosts on the segment attached dress. If no other host has configured this IP address yet, the
to interface i of router R. Assume that fHi g is disjoint, i.e., a host will keep its current IP address. Thus, an operational host
host is on at most one segment. Let a segment Si containing has a very high chance of keeping its current IP address when a
a set of hosts Hi and having no DHCP-Servers be attached to router joins the segment or after the router leaves the segment.
Proceedings of the Seventh International Symposium on Computers and Communications (ISCC’02)
1530-1346/02 $17.00 © 2002 IEEE
5

D. Packet Flow Within the Network E. Shortcomings of the ARM Method


Although the ARM method solves the intra-segment con-
/* Router R received a packet over its interface If */ nection break-up problem, it has shortcomings of its own. First-
IPaddrsender = sidsender .hidsender : IP addr. of the sender. ly, any address remapping solution has the problem that if an
IPaddrdest = siddest .hiddest : IP addr. of the destination.
IPaddrrl = sidrl .hidrl : A router-local IP address. application running at a host embeds the IP address of the host
within the payload of an IP packet, it reflects incorrect infor-
getRL-Subnetid(ARMTable R ; sidsender ; If)
I. For each (RL-sid; RE-sid; Intf) in ARMTableR do
mation to the other end. In order to solve this problem, an ap-
I.1. If sidsender = RE-sid and If = Intf then plication specific gateway (ASG) must be installed at the ARM
I.1.1. return RL-sid. router. The ASG needs to change the contents of each applica-
RE2RL(Packet[IPaddrsender ,IPaddrdest ])
I. sidrl getRL-Sid(ARMTableR ; sidsender ; If).
tion specific packet going through the ARM router. Although
II. hidrl hidsender . this works, it is messy.
III. IPaddrsender IPaddrrl .
IV. Recalculate the IP checksum. Additionally, the ARM method does not prevent connection
V. Recalculate TCP/UDP checksum if necessary. break-ups for hosts relocating from one segment to another, i.e.,
VI. Return Packet[IPaddrrl , IPaddrdest ] to the IP-layer. inter-segment connection break-ups occur. For example, if host
C moves from S2 to S1 and is able to stay with its link-local IP
/* Router R is sending a packet over its interface If */ address, its RL-IP address becomes x:h2. So, its RL-IP address
IPaddrrl sender = sidrl sender .hidrl sender :
Router-local IP address of the sender. changes although its real IP address does not. But, packets sent
IPaddrdest = siddest .hiddest : from host A to host C will still be destined to IP address y:h2
IP address of the destination of the packet. which does not exist anymore. In the next section we present
IPaddrre = sidre .hidre : A router-external IP address.
another single-router configuration method which tries to handle
getRE-Sid(ARMTableR ; siddest ; If) both intra-segment and inter-segment connection break-ups.
I. For each (RL-sid; RE-sid; Intf) in ARMTableR do
I.1. If siddest = RL-sid and If = Intf then
I.1.1. return RE-sid. VI. IP A DDRESS C ONFIGURATION OF S INGLE -ROUTER
N ETWORKS : IP- LAYER B RIDGING M ETHOD
RE2RL(Packet[IPaddrrl sender ,IPaddrdest ])
I. sidre getRE-Sid(ARMTableR ; siddest ; If).
II. hidre hiddest . We have presented the connection break-up problem in sec-
III. IPaddrdest IPaddrre . tion IV and described one solution in section V. This section ex-
IV. Recalculate the IP checksum. amines an alternate solution called the IP-layer bridging method.
V. Recalculate TCP/UDP checksum if necessary.
VI. Return Packet[IPaddrrl sender , IPaddrre ] The basic idea behind the IP-layer bridging method is to treat al-
to the link-layer. l segments connected by the router as an extended segment and
to make sure that all hosts in the network have network-wide
Fig. 8. Algorithms used by an ARM router for packet processing. getRL- unique link-local IP addresses. The router behaves similar to
Subnetid() returns the RL-subnetid corresponding to a RE-subnetid by a a learning bridge, transparently forwarding IP packets between
simply ARM Table lookup. Similarly, getRE-Subnetid() returns the RE-
subnetid corresponding to a RL-subnetid by a simply ARM Table lookup.
segments for inter-segment communication, therefore the name
IP-layer bridging.

Figure 8 shows the algorithms used by the ARM-layer to A. Problem Definition and Stable State Conditions
process a packet. When a packet is received, RE2RL() function
performs router-external to router-local IP address remapping Consider a router R having k interfaces labeled 1, 2, : : :, k.
on the source IP address of the packet by a simple ARM table Assume that the IP address of interface i of router R is IPaddri
= subnetidi .hostidi . Let I be the set of all router interfaces. Let
lookup. The packet is then given to the IP-layer, which routes a segment Si containing a set of hosts Hi and having no DHCP-
the packet by consulting the routing table and gives the packet Servers be attached to interface i of router R. Assume that fHi g
to the ARM-layer for address remapping and transmission. The is disjoint, i.e., a host is on at most one segment. Let H = [k1 Hi
ARM-layer calls RL2RE() function to map the destination IP be the set of all hosts in the network. Below we describe the
address to its router-external equivalent, and delivers the packet conditions that must hold in a stable state:
to the link-layer for transmission. Notice that the IP layer is not 6
C1: For every interface i and all distinct hosts h1 and h2 in H : IPaddri =
aware of the ARM layer and always works on router-local IP 6
IPaddrh1 = IPaddrh2
C2: For every interface i and all distinct hosts h1 and h2 in H : subnetidi =
addresses. subnetidh1 = subnetidh22 = l
Figure 9 shows an example packet flow through the network C3: For all distinct hosts h1 and h2 in H : h1 is reachable from h2
in figure 5 when host A sends an IP packet to host B. Note that C1 combined with C2 state that all hosts and the router’s
figure 5 shows the routing table and the ARM table maintained interfaces must have unique link-local IP addresses. Finally, C3
at the router. states the reachability requirement meaning that an IP packet
sent from a host to any other host in the network reaches its
Src. Dest. Comment destination.
l:h1 y:h1 Packet leaves host A.
x:h1 y:h1 Packet is rcvd by R and given to the IP-layer.
x:h1 l:h1 Right before R sends the packet over interface 2. B. IP Address Configuration Algorithm
x:h1 l:h1 Packet is rcvd by host B.
Figure 10 shows the IP router configuration algorithm. The
Fig. 9. The remapping of the source and destination IP addresses of a packet router starts by assigning unique link-local IP addresses for each
going from host A to B. of its interfaces. It then starts a mini-DHCP-Server to configure
all hosts in the network, which distributes link-local IP addresses
Proceedings of the Seventh International Symposium on Computers and Communications (ISCC’02)
1530-1346/02 $17.00 © 2002 IEEE
6

as in section V. /* ARP daemon running at router R just received an ARP


request over interface If of the router from host hs
We assume that each host uses the legacy IP host configura- asking for MAChd of host hd having IP address IPaddrhd . */
tion algorithm presented in section III. As hosts configure from MACIf : MAC address of interface If of router R.
RoutingTableR : Routing table maintained at router R.
the mini-DHCP server, it manipulates the router’s routing table
as follows: (1) It inserts an entry into the routing table for each Algorithm for ARP daemon running at router R:
host that configures from it. (2) If a host does not extend its IP I. If entry (IPaddrhd ; If; ) doesn’t exist
in RoutingTableR then
address lease before the lease expires, it assumes that the host I.1. Send ARP REPLY(IPaddrhd ; MACIf ).
has been removed from the segment and removes the routing
table entry corresponding to the host. Fig. 12. Algorithm executed by the ARP daemon running at R.

Symbols used in the algorithm:


R: The router to be configured.
i: Interface i of router R. Figure 12 presents the algorithm executed by the ARP
IPaddri = sidi .hidi : The IP address of interface i of R. daemon running at the router. The idea is to have the ARP
Segmenti : The segment attached to interface i of router R.
Hi : The set of hosts attached to Segmenti .
daemon to proxy ARP for hosts on other segments to enable
H : The set of hosts in the network. inter-segment communication and not to get involved for intra-
IPaddrh : IP address of host h. segment host communication.
RoutingTableR : Routing table maintained at router R.

IP router configuration algorithm for R: VII. C ONCLUDING R EMARKS


I. The algorithm is initializing:
I.1. For each interface i do In this paper we have addressed IP address configuration
I.1.1. sidi l. /* Assign the link-local subnetid */
I.1.2. hidi Assign a unique hostid. in emerging zeroconf networks. We have formalized the prob-
I.2. /* Run a mini-DHCP-ServerR to configure lem by describing the requirements for IP address configuration
all hosts in H */ algorithms in routerless and single-router networks. We pro-
For all h in H mini-DHCP-ServerR
(1) distributes a unique IP address IPaddrh posed a generic IP host configuration algorithm. We then exam-
from the link-local IP subnet l:0 address range, ined Aboba’s single-router IP address configuration method and
(2) inserts entry (IPaddrh ; i; ) to RoutingTableR showed that it causes intra-segment connections to tear down
if host h in H gets an IP address IPaddrh
from mini-DHCP-ServerR . when a router joins or leaves a segment. To solve this prob-
(3) removes entry (IPaddrh ; i; ) from RoutingTableR lem, we proposed two new single-router IP address configura-
if host h in H does not extend its IP address lease tion methods. We believe that with the increasing demand for
from mini-DHCP-ServerR .
zeroconf networks, zeroconf configuration algorithms will be
popular.
Fig. 10. IP router configuration algorithm

R EFERENCES
[1] Zero Configuration Networking (zeroconf). http://www.zeroconf.org/,
Internet Service Provider DHCP-Server http://www.ietf.org/html.charters/zeroconf-charter.html.
[2] B. Aboba. Auto-Addressing in Multi-segment Networks. draft-aboba-dhc-
Routing Table at R
S1 S2 mini-02.txt, Oct 1999. A work in progress.
111111111
000000000
000000000
111111111
t.R3 Destination Interface NextHopRouter
[3] S. Cheshire. Addressing in MacOS: Posting on Zeroconf mailing list.
L.0
000000000
111111111
000000000
111111111
L.R1 L.R2
L.0
L.R1 1 --

http://ResComp.Stanford.EDU/ cheshire/.
000000000
111111111
000000000
111111111
mini-DHCP L.h1 1 --
[4] S. Cheshire and B. Aboba. Dynamic Configuration of IPv4 Link-Local
000000000
111111111 L.h2 1 -- Addresses. draft-ietf-zeroconf-ipv4-linklocal-02.txt, March 2001. A work
000000000
111111111
Router R
L.R2 2 -- in progress.
00000
11111 1111
0000 1111
0000 1111
0000
0000
1111 1111
0000
0000
1111
L.h3 2 -- [5] Microsoft Corp. A Universal Plug and Play Primer.
11111
00000
L.h1 0000
1111
L.h2 0000
1111
L.h3 L.h1
0000
1111
L.h4
0000
1111 http://www.microsoft.com/hwdev/homenet/upnp.htm, January 1999.
00000
11111 0000
1111 0000
1111 L.h4 2 --
Host A Host B Zeroconf Network Host C Host D [6] Microsoft Corp. APIPA.
http://support.microsoft.com/support/kb/articles/Q220/8/74.ASP-Oct 99.
[7] Microsoft Corp. APIPA.
Fig. 11. A single-router network where the router behaves like an IP-layer http://msdn.microsoft.com/library/backgrnd/html/pnpip.htm-March 98.
bridge transparently forwarding IP packets between segments for inter- [8] R. Droms. Dynamic Host Configuration Protocol. RFC 2131, March 1997.
segment communication. [9] R. Droms and T. Lemon. The DHCP Handbook. MacMillan Technical
Publishing, 1999.
[10] E. Guttman. Zero Configuration Networking. Proceedings of INET 2000,
Figure 11 shows an example single-router network where Internet Society, Reston, VA, 2000. Available at
router R connects 2 segments S1 and S2. Before the segments http://www.isoc.org/inet2000/cdproceedings/3c/3c 3.htm.
[11] E. Guttman. Autoconfiguration for IP Networking: Enabling Local Com-
are attached to the router, the IP addresses of hosts A, B, C and D munication. IEEE Internet Computing, pages 81–86, June 2001.
are l:h1, l:h2, l:h1, and l:h4 respectively. When the network set- [12] M. Hatting. Zeroconf Requirements. draft-ietf-zeroconf-reqts-07.txt,
tles, all hosts and router’s interfaces have network-wide unique March 2 2001. A work in progress.
[13] J. Lo, M. Borella, and D. Grabelsky. Realm Specific IP: A Framework.
link-local IP addresses. This means that host C in the figure draft-ietf-nat-rsip-framework-01.txt, November 1999. A work in progress.
changes its IP address to l:h3. Although this breaks connections [14] J. Mogul and J. Postel. Internet Standard Subnetting Procedure. RFC 950,
involving host C, we note that hosts have 65 thousand link-local August 1985.
[15] Universal Plug and Play Forum. Universal Plug and Play Device Archi-
IP addresses to choose from and that IP address conflicts are ex- tecture. http://www.upnp.org/download/UPnPDA10 20000613.htm, June
pected to occur very infrequently. So all hosts are expected to 2000.
[16] D. C. Plummer. An Ethernet Address Resolution Protocol. RFC 826,
hold on to their current link-local IP addresses even after new November 1982.
segments are attached to the network or after a host moves from [17] P. Srisuresh and M. Holdrege. IP Network Address Translator (NAT) Ter-
minology and Considerations. RFC 2663, August 1999.
one segment to another. Therefore, a host is very likely to keep [18] R. Troll. Automatically Choosing an IP Address in an Ad-Hoc IPv4 Net-
its IP address throughout its lifetime, which means that existing work. draft-ietf-dhc-ipv4-autoconfig-04.txt, April 14, 1999, A work in
progress.
connections will be preserved upon topological changes.
Proceedings of the Seventh International Symposium on Computers and Communications (ISCC’02)
1530-1346/02 $17.00 © 2002 IEEE

You might also like