17. Internet Network Layer

Download Report

Transcript 17. Internet Network Layer

Lecture #17: Internet Network Layer
Contents

Internet Network layer

IPv4 datagram format

IPv4 addressing

Subnetting

Internet control protocols, ICMP

ARP, RARP & BOOTP, DHCP

IPv6
1
Internet Network Layer
Network layer functions
1/18
• Connection control: establishment, maintaining and
terminating network connections between source and
destination open systems
• Routing: considerations associated with hop-by-hop services
transparent to the underlying resources such as data link
connections .
• Addressing: globally unique identification of a service
access point of an end system (transparent to subnet technology
(routers/LANs…) and topology (# of hops) including naming
Internet architecture
5/44
17/1
•
•
•
•
•
Ineternetwork of autonomous systems (AS)
backbones: high-bandwidth connections and fast routers
regional networks (midlevel)
LANs and ISP systems
internet protocol (IP) - transparent datagram exchange fromend-to-end
2
IPv4 - datagram format

5/45
IP Datagram 32 bits wide (4 Bytes)
– IP Header (20 Bytes)
• Version (currently #4)
• Internet Header Length (min value is 5, max FFh)
• Type of Service (QoS)
 Precedence (3b) [0..7]
 Delay
 Throughput
 Reliability
• Total Length datagram (bytes) –
–
maximum is 65,535 bytes
may be fragmented before transmission
• Identification of the datagram at the destination.
All fragments of a datagram have identical ID field. 3

IP Header (cont.)
5/45
IP datagram format
• Fragmentation
• Occurs often - all machine are required to receive
fragments of 567 bytes or less
• Identifier - Used by the receiver to identifies which
datagram this fragment belongs to
• Flags: Don’t Frag, More Frag flags
• Fragment Offset:
• Indicates where in the datagram this fragment belongs
• Datagrams are segmented into increments/frags of 64 bits
• 13 bits for offset value yields a maximum of 8192 fragments
per datagram
• Time to live: <32 or 64 hops, <255 sec
• Protocol: Indicates the next level of protocol
• TCP, UDP, ICMP
4
IP datagram format

IP Header (cont.)
– Header CRC
• Only over the header; recalculated at each hop
• Not actually a CRC
– Source Address
– Destination Address
• 232 possible (= 4 294 967 296)

Options, Padding, Data
– Options Examples
5/46
• Security - allows a security label
• Source Routing - path description
• Route Recording
• Stream ID - names reserved resources used for
stream service- buffers
• Time Stamping
5

Classes
IPv4 Addressing
– A: 128 Networks,
16M Hosts – B: 16.3K Networks
64K Hosts University, large Organization
– C: 4.2 M 256 Hosts
5/47
17/2


Numbers are assigned by the Network
Information Center (NIC)
Dotted decimal notation
– e.g., 130.50.4.2
– each number represents the decimal
equivalent of 8 bits
6
IP Addressing

Special IP Addresses
– All zeros: this host
– All zeros network address: this (local) network
– All ones: broadcast on this network

5/49
Subnet Addressing (Subnet Masks)
– In the above example, subnet address (6 bits) can
formed from a (16 bit) host address, leaving 10 bits
for host addresses
– Results: 62 Subnets with 1022 hosts each
7

5/49
Subnets
“Subnets”: equal address-space fractions of an internet
network
– the host address field is split in two parts • hosts (themselves) and
• subnet field
– example: a B-class network [128.0 .. 191.255].XXX.XXX has 16b hostaddress field (i.e. total of 64K hosts’ space) that can be split as follows:
•
•
•
•
•
•
•
•
… (less realistic)
4:12 (s/h)  14 subnets
5:11 (s/h)  30 subnets
6:10 (s/h)  62 subnets
7:9 (s/h)  126 subnets
8:8 (s/h)  254 subnets
9:7 (s/h)  510 subnets
… (less realistic)
of
of
of
of
of
of
(4K-2=4094) hosts each
(2K-2=2046) hosts each
(1K-2=1022) hosts each
510 hosts each
254 hosts each (254 C-class networks!)
126 hosts each
– routing effects:
• shorter routing tables (i.e. more flexibility, easier corrections)
• more routers in a IP network
• the subnet is derived from the IP address by AND mask
8
Internet Control Protocols
• ICMP (Internet Control Message Protocol)
• ARP (Address Resolution Protocol)
– Allows a Host or Router to determine a hardware address
(MAC-level specified) for a given IP address
– RTs of MAC-IP address are maintained by all Host - Router
• time sensitive - periodically purged
• RARP (Reserve Address Resolution Protocol)
– Devices may not know their IP address: MAC - IP
conversation
– Usually provided by a server
– Autoconfiguration: Host provide temporary IP addresses dynamically (RARP - locally, BOOTP - globally)
9
ICMP
ICMP is the primary supervisory protocol in TCP/IP
• Lets the Host and Routers know of the status of the network
around them - problems with routers, congestion
• Network Status information provided to Hosts/Routers via
–
–
–
–
Error messages
Queries from hosts (e.g., ping)
Flow Control information (source squelch is implemented this way)
Routing (redirecting paths)
• Message Types
5/50
17/3
° Destination Unreachable - informs host that destination is either physically or
logically unreachable.
° Time Exceeded, Parameter - datagram lifetime expires (reassemble deadlock)
° Parameter Problem (rcvd an incorrect argument for a parameter), syntax or
semantics
° Redirect, Echo/reply - Test for different route
° Source Squelch - sent by either destination Host (flow control) or Router
(Congestion Control)
° Timestamp request/reply - Test for delay characteristics
° Information request/reply
° Address Mask - To address subnet more directly
• ICMP uses IP datagrams modified with a 64-bit header
10
ARP
•ARP = Address Resolution Protocol
•Maps IP addresses to MAC-specified addresses (e.g.
Ethernet 6 byte address)
5/51
•RTs of MAC-IP address are maintained by all Host Router
– better and more flexible than static configuration map
– time sensitive - periodically purged
– cashing the map information avoids frequent repetition of the
broadcasting
– host initiated broadcasting on boot up (- avoiding duplication of IP
addresses)
•ARP/RARP has its own protocol frame structure
11
RARP & BOOTP
• RARP = Reverse Address Resolution Protocol
• Maps MAC-specified addresses to IP addresses e.g. by
booting diskless station
• RARP server keeps configuration table of mapping
• RARP server is needed for each network because it is
reachable only by broadcast IP address (of all ones)
• BOOTP (bootstrap protocol) provides same functionality by
UDP (datagram) messages that travel over routers. Beside
the local IP address it provides
• IP address of the booting station
• IP address of the default router
• the subnet mask
12
Dynamic Host Configuration Protocol
Operation of DHCP.
13
The new IP version 6 (IPv6)

Motivation:
 The threat of exhausting of the 32-bit IPv4 addess
space. (Original estimates for when the world would
run out of IPv4 numbers varied from 2000 to 2008.)
 Fixing issues and problems in the existing IPv4
implementation
 Optimizing the network layer operation
 Introducing new network services
14
IPv6 history


1995 - Experimental deployment
December, 1995 - specifications of the basic protocols,
RFC 1883

1996 - more specifications

1998 - RFC 2460 obsoletes RFC 1883.


2000- Production quality support in all major OS and
routers.
26.10.2007- The RIPE community issued a
‘Resolution on IPv4 Depletion and Deployment of IPv6’
15
IPv6 Support Requirements



Routers must support IPv6
Switches do not require upgrades to support
IPv6 Unicast but will require upgrades to
support IPv6 Multicast (MLDv2 snooping).
DNS management software must support IPv6.
16
IPv6 details



IPv6 was designed to work together with IPv4
(“Dual Stack”, “Dual Stack Strategy”)
During the transition period most hosts will
have both an IPv4 and an IPv6 number.
The transition period is expected to last many
years (The wide use of NAT will slow down
this proccess).
17
IPv6 technical


A 128 bit address space
(about 3.4×1038 unique addresses comparing to
4.3×109 in IPv4 !!!)
The addresses are divided into 4 categories:
–
–
–
–

Unicast (corresponds to exactly one interface)
Multicast (group address)
Anycast (corresponds to more than one interface)
Special addresses
Examples (IPv6 uses CIDR notation):
2001:4b58:acad::107/64 (a global unicast addr.)
fe80::208:a1ff:fe7d:57df/64
(a link-local or autoconfiguration addr.)
::1/128 (the loopback address)
18
IPv6 technical (2)

Stateless autoconfiguration of hosts

Multicast - part of the base specifications in IPv6, unlike IPv4, where it
was introduced later.

Link-local addresses

Jumbograms – datagrams over the 64 KB IPv4 limit.

Network-layer security - IPsec is an integral part of the base protocol
suite in IPv6.

Mobility support

Lack of a checksum - It is believed that errors are very rare in today's
network. For this reason, IPv6 has no error checking in its protocol but
instead relies on link layer protocols to perform error checking.
19
IPv6 technical (3)
IPv6 header format

Extension headers follow ...
20
IPv6 - Transition mechanisms

Dual stack

Tunneling - Automatic or Configured

Proxying and translation
21
Barriers to implementing IPv6

The support in the wide used PC Operating
systems
– All three major OS (Linux, Mac OS X,
MS Windows) have full support for IPv6 now.

The support in the wide used routers
–The major router vendors support IPv6

IPv6 has been implemented more widely
in Europe and Asia than in the USA.
Some statistics next ...
22
www.nro.net
IANA IPv6 Allocations to
RIRs
issued Oct 06
RIR
IPv6 Address
AfriNIC
2C00:0000::/12
APNIC
2400:0000::/12
ARIN
2600:0000::/12
LACNIC
2800:0000::/12
RIPE NCC
2A00:0000::/12
23
www.nro.net
IPv6 Allocations
RIRs to LIRs/ISPs
(Mar 2009)
24
www.nro.net
IPv6 Allocations
RIRs to LIRs/ISPs
Cumulative Total (Jan 1999 – Sep 2007)
AfriNIC, 35, 2%
APNIC, 311, 22%
RIPE NCC, 693,
49%
ARIN, 291, 20%
LACNIC, 104, 7%
25
IPv6 in Bulgaria (May 2009)
source: http://www.sixxs.net
26
IPv6 deployment in BREN’s network
(some pride ;-)


The central node at IPP-BAS is fully IPv6
enabled, including the NOC and part of the
LAN of IPP-BAS (the most of the internal
traffic is actually IPv6)
IPv6 traffic is also carried over four major
links in the BREN internal backbone:
•
•
•
•
Sofia
Sofia
Sofia
Sofia
–
–
–
–
Veliko Tarnovo
Plovdiv
Pleven
Varna
27
28
5/44
29
17/1
30
5/45
31
5/46
32
5/47
33
17/2
34
5/48
5/49
35
5/50
36
17/3
37
5/51
38