Mob 6 addressing routing 2010

  • 94 trang
  • file .pdf
Mobile Communications
 Network Layer
 IP mobility (IPv4 and V6)
 Ad hoc routing
Internet & Mobile Communications -
Anne Fladenmuller 2007
Network Layer
Goal: routing and IP packets control.
Operations taken into account by IP:
 Identification of each •QoS management
network •Triggering of address
 Identification of networks’ resolution mechanisms
nodes •Information about control
and links state
 Packets redirection
 Fragmentation and
Mobility requires modifications mainly in packets
redirection functions
Internet & Mobile Communications - 2007
Network Layer
Classical routing
132.227.xx E
98.217.15.xx A
98.217.15.xx A D E 132.227.61.xx
Internet & Mobile Communications - 2007
Network Layer
Terminals mobility
98.217.15.xx WAN 132.227.61.xx
Internet & Mobile Communications - 2007
Network Layer
Terminals mobility
98.217.15.xx WAN
From: 129.210.112.xx To:
Internet & Mobile Communications - 2007
Network Layer
 Different mobility aspects
– Unfrequent moves from the user with his laptop or
 IP address modification: DHCP.
 Macro mobility management.
– Frequent moves from the user: micro mobility
– Independant moves of all network devices: Ad Hoc
Internet & Mobile Communications - 2007
 Allocation of a new IP address with DHCP
(Dynamic Host Configuration Protocol).
– Main goal:
 Simplification of network administration.
 Nomadism management: user’s move to a new network
with his computer
– It allows obtaining a network configuration
 DHCP is mainly used for IP addresses distribution
 It comes from an evolution of BOOTP (Bootstrap Protocol)
used to set up machines accross a network.
 A DHCP server can return BOOTP parameters or
configuration parameters specific to a given host.
 RFCs: 1541
Internet & Mobile Communications - 2007
 DHCP protocols principles
– 1 DHCP server distributes IP addresses.
 The server is a base for all DHCP requests (1 server with a
fixed IP address per network).
 The fundamental communication mechanism is BOOTP
– When a machine gets started, it has no information about its
network configuration.
– To find the DHCP server and dialog with it, the machine will
send a particular broadcast packet on the LAN.
– When the DHCP server receives this packet, it answers with
another broadcast packet (the client does not necessarily
have his IP address and is thus unreacheable directly) which
contains all necessary information for the client.
Internet & Mobile Communications - 2007
 Allocation of a static or dynamic address
– A DHCP server generally provides dynamic addresses
 A same computer can thus receive 2 different addresses one
– But it can also provide a fixed IP address to a specific
 This must be used reasonably, otherwise the DHCP server is
more or less useless
Internet & Mobile Communications - 2007
 Dialog with the server
– DHCP messages are transmitted through UDP.
– DHCP thus works in an unconnected mode.
– Ports’ numbers:
 The client only uses port 68 to send and receive its messages
 The server sends and receives its messages on a single port,
port 67.
– BOOTP/DHCP frame format
 The DHCP frame is indeed the same as BOOTP
 Parameters exchange (machine’s name...) is done through
– Options are described in RFC2132. They are all identified by a
number. For example,
 option 15: provides the client with the network’s domain name.
 option 53: DHCPACK
Internet & Mobile Communications - 2007
 Frame format
op: equals 1 for BOOTREQUEST
(client request), 2 for BOOTREPLY
(server answer)
htype: type of hardware address
hlen: length of hardware address (in
bytes). It is 6 for a MAC address
hops: can be used by DHCP relays
xid: random number chosen by the
client and used to recognize the
secs: time spent (in seconds) since
the client started its request
flags: various flags
Internet & Mobile Communications - 2007
ciaddr: client’s IP address, when he
already has one
yiaddr: the (future) client’s IP address
siaddr: IP address of the (next) server
to use
giaddr: relay’s IP address (e.g.
gateway) when the direct client/server
connection is not possible
chaddr: client’s hardware address
sname: optional field. Server’s name
file: name of the file that should be
used to boot
options: Reserved field for options. A
DHCP client must be ready to receive
at least 576 bytes, but it can ask the
server to limit the size of its messages.
Internet & Mobile Communications - 2007
– DHCP messages types:
 DHCPDISCOVER (1) to locate available DHCP servers and ask a
first configuration
 DHCPOFFER (2) answer of a server to a DHCPDISCOVER
message, which contains the first parameters
 DHCPREQUEST (3) client request e.g. to extend its lease
 DHCPDECLINE (4) the client tells the server that the address is
already used
 DHCPACK (5) answer from the server which contains the client’s
parameters and address
 DHCPNAK (6) server’s answer to tell the client that its lease has
expired or if the client announces a worng network configuration
 DHCPRELEASE (7) the client releases its IP address
 DHCPINFORM (8) the client asks for local parameters, it already
has its IP address
Internet & Mobile Communications - 2007
– Operation:
 The first packet sent by the client is a DHCPDISCOVER
packet .
 The server answers with a DHCPOFFER packet to
propose an IP address to the client (among others).
 The client sets up its configuration, then makes a
DHCPREQUEST to validate its IP address (broadcast
request because DHCPOFFER does not contain its IP
 The server simply answers with a DHCPACK with the IP
address to confirm the allocation.
– Normally, it is enough for a client to get an efficient
network configuration, but it can take more or less
time depending on whether the client accepts the IP
address or not...
Internet & Mobile Communications - 2007
Internet & Mobile Communications - 2007
– In order to optimize network resources, IP
addresses are allocated with a starting and an end
validity date: a lease.
 In the lease, there is not only an IP address for the client,
with a validity period, but also other configuration
information like:
– DNS address (Name resolution)
– Default Gateway address (to get out of the network where
the DHCP server has set up the client).
– The DHCP server address.
 The lease may be extended on the client’s request or on
the server’s proposal. If the server does not receive any
valid answer, it makes the IP address available.
Internet & Mobile Communications - 2007
 Optimization of IP addresses allocation by modifying
the leases’ duration.
– The problem is here:
 If all addresses are allocated and none is released after a certain
time, no more request will be satisfied.
– In a network to which many computers connect frequently, it is
interesting to propose short leases. But be careful not to block the
bandwidth on the small and very busy networks.
– In a network mostly constituted of fixed machines very rarely
rebooted, long leases are sufficient.
 It is recommended not to create unnecessarily short leases,
which leads to a significant increase in the network. A
compromise must be found between the mean users’ connection
suration, the server’s number of IP addresses left, the number of
Internet & Mobile Communications - 2007
 Lease expiration
– DHCP is preventive: it waits until 50% of the lease’s duration
to ask for its extension
 To do this the client contact the original server through a
(DHCPREQUEST) message.
 If the leas eextension is accepted by the server, it send a
(DHCPACK) message so that the client can be updated with this
new duration.
– If the client does not get any answer il will wait 7/8th of the
lease’s duration and will ask its DHCP server, if it can extend
its lease’s duration.
 DHCP servers can answer with a (DHCPACK) to extend the
client’s lease.
 If a server cannot extend its lease, it will send a (DHCPNACK)
message to the client who will have to restart the whole IP lease
request procedure.
Internet & Mobile Communications - 2007
Internet & Mobile Communications - 2007
 Server’s set up
– There is no need to set up one DHCP server per
– The server’s IP address does not necessarily
belong to the same class as those in its addresses
– Negociation is done as follows:
 DHCP requests must reach the server which is located on
another nework, they must thus cross routers (theoretically
 Installation on one or several routers of a relay agent who
will intercept bradcast requests and will forward them to a
DHCP server known by this agent.
Internet & Mobile Communications - 2007