Sunteți pe pagina 1din 42

Basics of IP Routing

Types of Addresses

Types of Addresses
Hostnames

IP Addresses
Mac Addresses

IP Addresses
Numerical label assigned to each device in
a computer network
Used for host or network identification and
location addressing
Used as a unique identifier to identify the
devices in any given network
IPV4 and IPV6 are the two versions of IP
addresses

Hostname
A Label assigned to the
device connected in the
network
URL or Uniform Resource
Locator provides a
reference to a resource on
the internet

Mac Address
Unique identifier assigned to network
interfaces for communications on the
physical network segment.
Assigned by the manufacturer on the NIC
A network node may have multiple NICs
and each must have one unique MAC
address per NIC.

Mac addresses are of 48bits

ARP, DNS and DHCP

ARP
ARP associates an IP address with its
physical address. On a typical physical
network, such as a LAN, each device on a
link is identified by a physical or station
address that is usually imprinted on the
NIC.

The Reverse Address Resolution


Protocol (RARP) is an obsolete computer
networking protocol used by a client
computer to request its Internet
Protcol (IPv4) address from a computer
network, when all it has available is
its Link Layer or hardware address, such
as a MAC address.

Encapsulation of ARP Packet

Address Translation with ARP


ARP Request:
A broadcasts an ARP request to all stations on the network: What is the hardware address of
Router137?
Host A
128.143.137.144
00:a0:24:71:e4:44

Router137
128.143.137.1
00:e0:f9:23:a8:20

ARP Request:
What is the MAC address
of 128.143.71.1?

Address Translation with ARP


ARP Reply:
Router 137 responds with an ARP Reply which contains the hardware address

Host A
128.143.137.144
00:a0:24:71:e4:44

Router137
128.143.137.1
00:e0:f9:23:a8:20
ARP Reply:
The MAC address of 128.143.71.1
is 00:e0:f9:23:a8:20

Example
ARP Request from Host A:

Source hardware address:


00:a0:24:71:e4:44
Source protocol address: 128.143.137.144
Target hardware address:
00:00:00:00:00:00
Target protocol address: 128.143.137.1

ARP Reply from Router137:


Source hardware address:
00:e0:f9:23:a8:20
Source protocol address: 128.143.137.1
Target hardware address:
00:a0:24:71:e4:44
Target protocol address: 128.143.137.144

RARP
RARP finds the logical address for a machine that only knows its physical
address.

DNS

What is DNS?
DNS is a host name to IP address translation service

DNS is
a distributed database implemented in a hierarchy of name servers
an application level protocol for message exchange between clients and servers

19

Why DNS?
It is easier to remember a host name than it is to remember an IP
address.
An name has more meaning to a user than a 4 byte number.
Applications such as FTP, HTTP, email, etc., all require the user to
input a destination.
The user generally enters a host name.
The application takes the host name supplied by the user and
forwards it to DNS for translation to an IP address.

20

DNS Services
Besides the address translation service, DNS also provides the following services:
Host aliasing: a host with a complicated name can have one or more aliases that are simpler to
remember,e.g., relay1.west-coast.media.com -> media.com. The longer name is the canonical
hostname, the shorter the alias hostname.
Mail server aliasing: same as above, aliases can exist for long canonical host names.
Load Balancing: a set of servers can have one name mapped onto several machines. DNS provides the
full list of names to the end users application which generally takes the first one in the list. DNS rotates
the names on the list.

21

Distributed, Hierarchical Database


Root DNS Servers

com DNS servers


yahoo.com

amazon.com

DNS servers DNS servers

org DNS servers

edu DNS servers

pbs.org

poly.edu

umass.edu

DNS servers

DNS serversDNS servers

Client wants IP for www.amazon.com; 1st approx:

client queries a root server to find com DNS server


client queries com DNS server to get amazon.com DNS server
client queries amazon.com DNS server to get IP address for
www.amazon.com
22

TLD and Authoritative Servers


Top-level domain (TLD) servers:
responsible for com, org, net, edu, etc, and all top-level
country domains uk, fr, ca, jp.
Network Solutions maintains servers for com TLD
Educause for edu TLD

Authoritative DNS servers:


organizations DNS servers, providing authoritative hostname
to IP mappings for organizations servers (e.g., Web, mail).
can be maintained by organization or service provider

23

DNS: Root name servers


root name server:
contacts authoritative name server if name mapping not known
gets mapping
returns mapping to local name server
a Verisign, Dulles, VA
c Cogent, Herndon, VA (also LA)
d U Maryland College Park, MD
g US DoD Vienna, VA
e NASA Mt View, CA
h ARL Aberdeen, MD

k RIPE London (also 16 other locations)


i Autonomica, Stockholm (plus
28 other locations)
m WIDE Tokyo (also Seoul,
Paris, SF)

f Internet Software C. Palo Alto,


CA (and 36 other locations)

j Verisign, ( 21 locations)

b USC-ISI Marina del Rey, CA


l ICANN Los Angeles, CA

24

13 root
name servers
worldwide

Local Name Server


does not strictly belong to hierarchy

each ISP (residential ISP, company, university) has one.


also called default name server

when host makes DNS query, query is sent to its local DNS server
acts as proxy, forwards query into hierarchy

DNS Queries
Recursive:
The client machine sends a request to the local name server, which, if it does
not find the address in its database, sends a request to the root name server,
which, in turn, will route the query to an intermediate or authoritative name
server. Note that the root name server can contain some hostname to IP
address mappings. The intermediate name server always knows who the
authoritative name server is.

26

DNS Queries (contd)


Iterative:
The local server queries the root server. If address not in its database, will have the name/address of an
intermediate or authoritative name server and forward that information to the local name server so
that it can directly communicate with the intermediate or authoritative name server. This is to prevent
the overloading of the root servers that handle millions of requests.

27

DNS name resolution example

root DNS
server
2

Host at cis.poly.edu wants


IP address for
gaia.cs.umass.edu

iterated
query:

4
5
local DNS server
dns.poly.edu

contacted server
replies with name
of server to
contact

TLD DNS
server

authoritative DNS server

requesting host

dns.cs.umass.edu

cis.poly.edu

I dont know
this name, but
ask this server

gaia.cs.umass.edu

DNS name resolution example


root DNS
server

recursive
query:
puts burden of
name resolution
on contacted name
server
heavy load?

3
6

TLD DNS
server
local DNS server

dns.poly.edu

8
authoritative DNS server

requesting host

dns.cs.umass.edu

cis.poly.edu
gaia.cs.umass.edu
29

DNS: caching and updating records


once (any) name server learns mapping, it caches mapping
cache entries timeout (disappear) after some time
TLD servers typically cached in local name servers
Thus root name servers not often visited

DHCP

Dynamic Assignment of IP addresses


Dynamic assignment of IP addresses is desirable for several reasons:
IP addresses are assigned on-demand
Avoid manual IP configuration
Support mobility of laptops

DHCP
Dynamic Host Configuration Protocol (DHCP)

From 1993
An extension of BOOTP, very similar to DHCP
Same port numbers as BOOTP
Extensions:
Supports temporary allocation (leases) of IP addresses
DHCP client can acquire all IP configuration parameters needed to operate

DHCP is the preferred mechanism for dynamic assignment of IP addresses


DHCP can interoperate with BOOTP clients.

36

DHCP Interaction (simplified)


Host A
00:a0:24:71:e4:44

DHCP Server

DHCP Request
00:a0:24:71:e4:44
Sent to 255.255.255.255

Host A
128.143.137.144
00:a0:24:71:e4:44

DHCP Server
DHCP Response:
IP address: 128.143.137.144
Default gateway: 128.143.137.1
Netmask: 255.255.0.0

DHCP Message Type


Message type is sent as an option.
Value

Message Type

DHCPDISCOVER

DHCPOFFER

DHCPREQUEST

DHCPDECLINE

DHCPACK

DHCPNAK

DHCPRELEASE

DHCPINFORM

Message Types
DHCPDISCOVER: Broadcast by a client to find available DHCP servers.

DHCPOFFER: Response from a server to a DHCPDISCOVER and offering IP address and other
parameters.
DHCPREQUEST: Message from a client to servers that does one of the following:
Requests the parameters offered by one of the servers and declines all other offers.
Verifies a previously allocated address after a system or network change (a reboot for
example).
Requests the extension of a lease on a particular address.

Contd.
DHCPACK: Acknowledgement from server to client with parameters,
including IP address.
DHCPNACK: Negative acknowledgement from server to client, indicating that the client's lease has expired or
that a requested IP address is incorrect.
DHCPDECLINE: Message from client to server indicating that the offered address is already in use.
DHCPRELEASE: Message from client to server canceling remainder of a lease and relinquishing network
address.
DHCPINFORM: Message from a client that already has an IP address (manually configured for example),
requesting further configuration parameters from the DHCP server.

DHCP Operation
DCHP DISCOVER

DHCP Client
00:a0:24:71:e4:44

DHCP Server

DHCPDISCOVER
Sent to 255.255.255.255

DHCP Server

DHCP Client
00:a0:24:71:e4:44

DCHP OFFER

DHCPOFFER

DHCP Server

DHCPOFFER

DHCP Server

DHCP Operation

DHCP Client
00:a0:24:71:e4:44

DHCP Server
DHCPREQUEST

DCHP DISCOVER

DHCPACK

At this time, the DHCP


client can start to use the IP
address

Renewing a Lease
(sent when 50% of lease
has expired)
If DHCP server sends
DHCPNACK, then
address is released.

DHCP Server

DHCP Client
00:a0:24:71:e4:44

DHCP Server
DHCPREQUEST
DHCPACK

DHCP Server

DHCP Operation
DHCP Client
00:a0:24:71:e4:44

DCHP RELEASE

At this time, the DHCP


client has released the IP
address

DHCP Server
DHCPRELEASE

DHCP Server

Circuits/ WAN Connections

S-ar putea să vă placă și