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