Download 009_namingaddressing

Survey
yes no Was this document useful for you?
   Thank you for your participation!

* Your assessment is very important for improving the workof artificial intelligence, which forms the content of this project

Document related concepts

Wireless security wikipedia , lookup

Point-to-Point Protocol over Ethernet wikipedia , lookup

VMEbus wikipedia , lookup

Piggybacking (Internet access) wikipedia , lookup

Distributed firewall wikipedia , lookup

Network tap wikipedia , lookup

Internet protocol suite wikipedia , lookup

Airborne Networking wikipedia , lookup

IEEE 802.1aq wikipedia , lookup

Lag wikipedia , lookup

List of wireless community networks by region wikipedia , lookup

Computer network wikipedia , lookup

AppleTalk wikipedia , lookup

Wake-on-LAN wikipedia , lookup

I²C wikipedia , lookup

Dynamic Host Configuration Protocol wikipedia , lookup

Recursive InterNetwork Architecture (RINA) wikipedia , lookup

Cracking of wireless networks wikipedia , lookup

Zero-configuration networking wikipedia , lookup

Transcript
Naming and Addressing
An Engineering Approach to Computer Networking
Outline








Names and addresses
Hierarchical naming
Addressing
Addressing in the telephone network
Addressing in the Internet
ATM addresses
Name resolution
Finding datalink layer addresses
Names and addresses

Names and addresses both uniquely identify a host (or an
interface on the host)

%nslookup
 Default Server:
DUSK.CS.CORNELL.EDU
 Address:
128.84.227.13




> underarm.com
Name:
underarm.com
Address: 206.128.187.146
Resolution: the process of determining an address from a name
Why do we need both?



Names are long and human understandable
 wastes space to carry them in packet headers
 hard to parse
Addresses are shorter and machine understandable
 if fixed size, easy to carry in headers and parse
Indirection
 multiple names may point to same address
 can move a machine and just update the resolution table
Figure 19.22
Hierarchy concept in a telephone number
Hierarchical naming



Goal: give a globally unique name to each host
Naïve approach: ask other naming authorities before choosing a
name
 doesn’t scale (why?)
 not robust to network partitions
Instead carve up name space (the set of all possible names)
into mutually exclusive portions => hierarchy
Hierarchy


A wonderful thing!
 scales arbitrarily
 guarantees uniqueness
 easy to understand
Example: Internet names
 use Domain name system (DNS)
 global authority (Network Solutions Inc.) assigns top level
domains to naming authorities (e.g. .edu, .net, .cz etc.)
 naming authorities further carve up their space
 all names in the same domain share a unique suffix
Addressing in the telephone network






Telephone network has only addresses and no names (why?)
E.164 specifications
ITU assigns each country a unique country code
Naming authority in each country chooses unique area or city
prefixes
Telephone numbers are variable length
 this is OK since they are only used in call establishment
Optimization to help dialing:
 reserve part of the lower level name space to address top
level domains
 e.g. in US, no area code starts with 011, so 011 =>
international call => all other calls need fewer digits dialed
Figure 19.10
Finding the class in binary notation
Figure 19.11 Finding the address class
Example 3
Find the class of each address:
a.
00000001 00001011 00001011 11101111
b.
11110011 10011011 11111011 00001111
Solution
See the procedure in Figure 19.11.
a.
b.
The first bit is 0; this is a class A address.
The first 4 bits are 1s; this is a class E address.
Figure 19.12
Finding the class in decimal notation
Example 4
Find the class of each address:
a.
227.12.14.87
b.
252.5.15.111
c.
134.11.78.56
Solution
a.
b.
c.
The first byte is 227 (between 224 and 239); the class is D.
The first byte is 252 (between 240 and 255); the class is E.
The first byte is 134 (between 128 and 191); the class is B.
Figure 19.13
Netid and hostid
Figure 19.14
Blocks in class A
Note:
Millions of class A addresses are
wasted.
Figure 19.15
Blocks in class B
Note:
Many class B addresses are wasted.
Note:
The number of addresses in class C is
smaller than the needs of most
organizations.
Figure 19.16
Blocks in class C
Figure 19.17
Network address
Note:
In classful addressing, the network
address is the one that is assigned to
the organization.
Example 5
Given the address 23.56.7.91, find the network address.
Solution
The class is A. Only the first byte defines the netid. We can find the network
address by replacing the hostid bytes (56.7.91) with 0s. Therefore, the
network address is 23.0.0.0.
Example 6
Given the address 132.6.17.85, find the network address.
Solution
The class is B. The first 2 bytes defines the netid. We can find the network
address by replacing the hostid bytes (17.85) with 0s. Therefore, the
network address is 132.6.0.0.
Example 7
Given the network address 17.0.0.0, find the class.
Solution
The class is A because the netid is only 1 byte.
Note:
A network address is different from a
netid. A network address has both
netid and hostid,
with 0s for the hostid.
Figure 19.18
Sample internet
Note:
IP addresses are designed with two
levels of hierarchy.
Figure 19.19 A network with two levels of hierarchy
Figure 19.20 A network with three levels of hierarchy (subnetted)
Figure 19.21 Addresses in a network with and without subnetting
Address evolution


This scheme was too inflexible
Three extensions
 subnetting
 CIDR
 dynamic host configuration
CIDR



Scheme forced medium sized nets to choose class B
addresses, which wasted space
Address space exhaustion
Solution
 allow ways to represent a set of class C addresses as a
block, so that class C space can be used
 use a CIDR mask
 idea is very similar to subnet masks, except that all routers
must agree to use it
 subnet masks are not visible outside the network (why?)
CIDR (contd.)
Dynamic host configuration










Allows a set of hosts to share a pool of IP addresses
Dynamic Host Configuration Protocol (DHCP)
Newly booted computer broadcasts discover to subnet
DHCP servers reply with offers of IP addresses
Host picks one and broadcasts a request to a particular server
All other servers withdraw offers, and selected server sends an
ack
When done, host sends a release
IP address has a lease which limits time it is valid
Server reuses IP addresses if their lease is over
Similar technique used in Point-to-point protocol (PPP)
DHCP






With the rapid growth of TCP/IP (Transmission Control Protocol/Internet
Protocol, the common transmission protocol for communicating over
the Internet) networks, tools are needed to automate administrative
functions in managing large TCP/IP networks.
The Dynamic Host Configuration Protocol (DHCP) is a set of rules for
dynamically allocating IP addresses and configuration options to
workstations on a network.
An IP (Internet Protocol) address is a 32-bit binary number written as
four decimal numbers separated by periods that is used to uniquely
identify a workstation on the Internet.
An Internet address (like 207.160.153.254 or 198.209.5.1) is analogous
to a telephone number.
While the telephone network directs calls to you by using your
telephone number, the Internet network directs data to you by using
your IP number.
This number can be statically (or manually) assigned by the
administrator for a network workstation or assigned to it dynamically by
a central server.
Who supports this protocol ?








Most Network Operating Systems (NOS) support DHCP, including Microsoft,
Novell, IBM and UNIX platforms. It is relatively easy to implement on any NOS,
has been around for some time and is pretty stable.
There are three methods for DHCP to allocate IP addresses to workstations.
Manual allocation
Automatic allocation
Dynamic allocation
In the manual allocation method, the network administrator on the DHCP server
manually configures the client's IP address in the server. When the client
workstation makes the request for an IP address, the server looks at the MAC
address (Media Access Control address; manufacture's unique address of the
network card) and assigns the client the manually set IP address.
In the automatic allocation method, the DHCP client workstation is assigned an
IP address when it first contacts the DHCP server. In this method the IP address
is randomly assigned and is not set in the server. The IP address is permanently
assigned to the DHCP client and is not reused by another DHCP client.
In the dynamic allocation method, the DHCP server assigns an IP address to a
requesting client workstation on a temporary basis. The IP address is leased to
the DHCP client for a specified duration of time. When this lease expires, the IP
address is revoked from the client and the client is required to surrender the
address. If the DHCP client still needs an IP address to perform its functions, it
can request another IP address
IPv6



32-bit address space is likely to eventually run out
IPv6 extends size to 128 bits
Main features
 classless addresses
 multiple levels of aggregation are possible
 registry
 provider
 subscriber
 subnet
 several flavors of multicast
 anycast
 interoperability with IPv4
Name resolution


Done by name servers
 essentially look up a name and return an address
Centralized design
 consistent
 single point of failure
 concentrates load
DNS






Distributed name server
A name server is responsible (an authoritative server) for a set
of domains
May delegate responsibility for part of a domain to a child
Root servers are replicated
If local server cannot answer a query, it asks root, which
delegates reply
Reply is cached and timed out
Finding data link layer addresses

Data link layer address: most common format is IEEE 802

Need to know data link layer address typically for the last hop
ARP





To get datalink layer address of a machine on the local subnet
Broadcast a query with IP address onto local LAN
Host that owns that address (or proxy) replies with address
All hosts are required to listen for ARP requests and reply
 including laser printers!
Reply stored in an ARP cache and timed out
ARP continued……





The address resolution protocol (arp) is a protocol used by the
Internet Protocol (IP), specifically IPv4, to map IP network addresses
to the hardware addresses used by a data link protocol.
The protocol operates below the network layer as a part of the
interface between the OSI network and OSI link layer. It is used when
IPv4 is used over Ethernet.
The term address resolution refers to the process of finding an address
of a computer in a network. The address is "resolved" using a protocol
in which a piece of information is sent by a client process executing on
the local computer to a server process executing on a remote
computer.
The information received by the server allows the server to uniquely
identify the network system for which the address was required and
therefore to provide the required address.
The address resolution procedure is completed when the client
receives a response from the server containing the required address.
.







An Ethernet network uses two hardware addresses which identify the
source and destination of each frame sent by the Ethernet.
The destination address (all 1's) may also identify a broadcast packet
(to be sent to all connected computers).
The hardware address is also known as the Medium Access Control
(MAC) address, in reference to the standards which define Ethernet.
Each computer network interface card is allocated a globally unique 6
byte link address when the factory manufactures the card (stored in a
PROM). This is the normal link source address used by an interface.
A computer sends all packets which it creates with its own hardware
source link address, and receives all packets which match the same
hardware address in the destination field or one (or more) pre-selected
broadcast/multicast addresses.
The Ethernet address is a link layer address and is dependent on the
interface card which is used.
IP operates at the network layer and is not concerned with the link
addresses of individual nodes which are to be used.
The address resolution protocol (arp) is therefore used to translate
between the two types of address. The arp client and server processes
operate on all computers using IP over Ethernet. The processes are
normally implemented as part of the software driver that drives the
network interface card.
Figure 20.2 ARP operation
Figure 20.3 ARP packet
Figure 20.4
Encapsulation of ARP packet
Figure 20.5
Four cases using ARP
Note:
An ARP request is broadcast; an ARP
reply is unicast.
Example 1
A host with IP address 130.23.3.20 and physical address
B23455102210 has a packet to send to another host with IP address
130.23.43.25 and physical address A46EF45983AB. The two hosts
are on the same Ethernet network. Show the ARP request and reply
packets encapsulated in Ethernet frames.
Solution
Figure 20.6 shows the ARP request and reply packets. Note that the ARP
data field in this case is 28 bytes, and that the individual addresses do not fit
in the 4-byte boundary. That is why we do not show the regular 4-byte
boundaries for these addresses. Note that we use hexadecimal for every
field except the IP addresses.
Figure 20.6
Example 1