Professional Documents
Culture Documents
Objectives
IP Protocol
IP routing
TCP/UDP Protocols
Objectives
Principles of IP interconnection
IPV4 IPv6
Mobile IP ICMP Protocol
Principles of IP interconnection
At level 2, the protocols allow the transmission of the data in adapting to specificities of the physical support
Frame format, physical addresses
The differences between all the technologies used on the network should be transparent to the user.
Abstraction of each level of functionality which encapsulates the functionalities of lower level Abstraction of the details relating to the sub-layers and finally network itself.
Contrary to the protocols of level 2, it is better to have a reduced number of protocols of level 3 for the largest number of equipments.
Principles of IP interconnection
Application User
Network
Principles of IP interconnection
The concept of interconnection ensures the implementation of a network layer masking the details of the physical network and the problems of routing to the applications. IP Protocol (Internet Protocol) of level 3 plays this part of unifier
Ensures heterogeneity of the equipment and the protocols,
Defines a structure of logical network : coherent, flexible and independent for the upper layers,
Each equipment is seen like a node of level 3 independently of its real function and nature.
Principles of IP interconnection
Universal interconnection
Nodes have a single address; Interconnection on very large scales; Two nodes communicate thanks to the other network nodes The packets are routed in a co-operative way on the basis of the receiver address ; Peer-to-peer interconnection.
Public and largely diffused technology (through RFCs). Largely validated since many years in a heterogeneous world. Technology independent from the manufacturers and available for any type of material.
Principles of IP interconnection
Provides best effort, connectionless packet delivery
motivated by the need to keep routers simple and to adapt quickly the topology to the failure of some nodes packets may be lost, out of order, or even duplicated higher layer protocols must deal with this (if required)
Principles of IP interconnection
The routers have a connection on each network Protocol of level 3
Network A
Network B
Protocol of level 2
Protocol of level 2
Router R transfers on the network B, the packets emitted on the network A whose destination is B (and resp.).
Principles of IP interconnection
P1 transfers on the network B, the packets emitted on the network A whose destination is the networks B and C P1 must be informed of the topology of the network; C has to be accessible from the network B. The routing is not handled on the basis of receiver node but on the basis of the network of the receiver.
Network A
P1
Network B
P2
Network C
Principles of IP interconnection
Two IP protocols : IPv4 and IPv6
node to communicate with another one (whatever the network technology used).
Logical address (IP) physical address (MAC)
IP addressing is coherent, flexible and hierarchically built.
IP addressing is compact in order to ensure an efficient
routing.
IPv4 addresses
Classes of addresses
An address known as internet address or IP address = 32 bits composed by netid - hostid pair o netid identifies a network o hostid identifies a node on this network. This pair is structured into 5 predefined classes of addresses netid unique & administered by : o American Registry for Internet Numbers (ARIN) o Reseaux IP Europeens (RIPE) o Asia Pacific Network Information Centre (APNIC)
Dotted decimal notation of IP addresses
int1.int2.int3.int4 Each integer representes a byte of the IP address 10000000 00001010 00000010 00011110 is written: 128.10.2.30
IPv4 addresses
Class A
1.0.0.0 to 127.255.255.255. 24 bits for local addresses, 254^3 possibilities 128.0.0.0 to 191.255.255.255 16 bits for local addresses, 254^2 possibilities 192.0.0.0 to 223.255.255.255 8 bits for local addresses, 254 possibilities 224.0.0.0 to 231.255.255.255 Up to 250 million multicast groups Multicast addresses, point to multipoint transmission (ex: video conference) No structure, very specific use 232.0.0.0 to 255.255.255.255 Reserved use
Class E
IPv4 addresses
0 Class A 8 Net-id 16 Host-id 24 31
Class B
10
Net-id
Host-id
Class C
110
Net-id
Host-id
Class D
1110 11110
Multicast
Class E
Reserved
IPv4 addresses
Specific addresses
Network address
o &IP whose the hostid part is equal to 0 o A hostid with 0 cannot be given to a real machine o Ex: 192.20.0.0 is a network adress of class C (netid = 192.20.0)
Hostid 0
o The hostid specifies the physical address of the node
All = 0
o this address is used during the system boot when no IP address is allotted.
IPv4 addresses
Broadcast addresses
The hostid part is equal to 1
The broadcast relates to all the nodes located on the specified network
Ex: 162.20.255.255 indicates all the nodes of network 162.20.
Consequently, an IP address whose value hostid does is equal to 1 cannot be allotted to a real node. Local loop address
The network address 127.0.0.0 is reserved for the local machine, i.e. for
the intra-node communication.
IPv4 addresses
0 8 Net-id 16 24 All to zero Network address All to zero Local node All to zero 31
Host-id
Local loop
IPv4 addresses
128.135.40.1 H Interface Address is 128.135.10.2 Interface Address is 128.140.5.35 128.140.5.40 H
Network 128.135.0.0
Network 128.140.0.0
Multi-homed router
H 128.135.10.20 H 128.135.10.21
128.140.5.36
R = router H = host
Address with host ID=all 0s refers to the network Address with host ID=all 1s refers to a broadcast packet
Subnet Addressing
Subnet addressing introduces another hierarchical level Transparent to remote networks Simplifies management of multiplicity of LANs Masking used to find subnet number
Original address
1 0
Net ID
Host ID
Subnetted address
1 0
Net ID
Subnet ID
Host ID
Subnet Addressing
Subnet mask
Equal to 1 : network part
Equal to 0 : node part Ex: 11111111 11111111 11111111 00000000 o 3 bytes for the network address , 1 byte for the node address
The bits of the mask identifying a subnetwork and a node have not to be contiguous
Ex: 11111111 11111111 00011000 01000000 Default mask : e.g. for a network of class B : 11111111 11111111 00000000 00000000
IPv4 datagram
IPv4 datagram
Version: current IP version is 4. Internet header length (IHL): length of the header in 32-bit words. Type of service (TOS): traditionally priority of packet at each router. Recent Differentiated Services redefines TOS field to include other services besides best effort. Total length: number of bytes of the IP packet including header and data, maximum length is 65535 bytes. Identification, Flags, and Fragment Offset: used for fragmentation and reassembly. Time to live (TTL): number of hops packet is allowed to traverse in the network.
Each router along the path to the destination decrements this value by one.
If the value reaches zero before the packet reaches the destination, the router discards the packet and sends an error message back to the source.
IPv4 datagram
Protocol: specifies upper-layer protocol that is to receive IP data at the destination. Examples include TCP (protocol = 6), UDP (protocol = 17), and ICMP (protocol = 1). Header checksum: verifies the integrity of the IP header. Source IP address and destination IP address
Options: Variable length field, allows packet to request special features such as security level, route to be taken by the packet, and timestamp at each router. Detailed descriptions of these options can be found in [RFC 791].
Padding: This field is used to make the header a multiple of 32-bit words.
IP address identifies a host, but packet is physically delivered by an underlying network which uses its own physical address (e.g., MAC address in Ethernet). ARP: How to map an IP address to a physical address?
H1
150.100.76.20
H2
150.100.76.21
H3
150.100.76.22
H4
150.100.76.23
Every host receives the request, but only H3 replies with its physical address
H1
H2
H3
H4
ICMP messages are encapsulated as data in datagrams in the same way any other data is delivered using IP.
Unreachable Networks
Ping
Mobile IP (RFC 2002): device can change point-of-attachment while retaining IP address and maintaining communications
Operation of Mobile IP
Foreign Network Home Network Mobile Host #1 Foreign Agent
Mobile Host #2
Home Agent
Care-of-Address
Internet
Home Agent (HA) keeps track of location of each Mobile Host (MH) in its network; HA periodically announces its presence If MH is in Home Network, e.g. MH#1, HA forwards packet directly to it When MH moves to a Foreign Network, e.g. MH#2, MH obtains a care-ofaddress from foreign agent (FA) and registers this with its HA
Operation of Mobile IP
Home Network 2 Internet 1 Foreign Agent
Foreign network
Mobile Host
Home Agent
Correspondent Host
Correspondent Host (CH) sends packets as usual (1) Packets are intercepted by HA & forwarded to Foreign Agent (FA) (2) FA forwards packet to the MH & MH sends packet to CH as usual (3) Question: how does HA send packets to MH in foreign network?
IP-to-IP Encapsulation
HA uses IP-to-IP encapsulation IP packet has MH IP address Outer IP header has HAs address as source address and care-of-address as destination address FA recovers IP packet and delivers to MH
Outer IP header
IP header
IP header
IP payload
IP payload
Route Optimization
Going to HA inefficient if CH and MH are in same foreign network
When HA receives pkt from CH (1), it tunnels using care-of-address (2a); HA also sends care-of-address to CH (2b)
CH can then send packets directly to care-of-address (4)
Home Network Foreign Agent 2a Internet 2b 1
Foreign Network
Mobile Host
Home Agent
3 4
Correspondent Host
o Same: Version
o Dropped: Header length, ID/flags/frag offset, header checksum o Replaced: Datagram length by Payload length Protocol type by Next header TTL by Hop limit TOS by traffic class New: Flow label
Source Address
Destination Address
4
Traffic Class
12
16
24
Flow Label Next Header
31
Payload Length
Hop Limit
Source Address
Destination Address
Header code 0 43 44 51 52
Header type Hop-by-hop options header Routing header Fragment header Authentication header Encapsulating security payload header
60
IPv6 Addressing
Address Categories
Unicast: single network interface Multicast: group of network interfaces (at different locations). Packet sent to all. Anycast: group of network interfaces. Packet sent to only one interface in group (e.g., nearest)
Hexadecimal Notation
Groups of 16 bits (4 hex digits) separated by colons
o 4BF5:AA12:0216:FEBC:BA5F:039A:BE9A:2176
Shortened forms:
o 4BF5:0000:0000:0000:BA5F:039A:000A:2176 written as 4BF5:0:0:0:BA5F:39A:A:2176 (or 4BF5::BA5F:39A:A:2176)
Tunnel tail-end
Destination
IPv4 header
IPv6 network
Source Link
Destination
(b)
IPv6 network IPv6 network
Objectives
Introduction to routing principles
Route Types
Static route
Programmed route that a network administrator enters manually into a router
Dynamic route
Route that a routing protocol adjusts automatically for topology or traffic changes
Static Routing
Dynamic Routing
Autonomous Systems
Problems
Routing Loops
Routing loops can occur when inconsistent routing tables are not updated due to slow convergence in a changing network.
Counting to Infinity
Link-State Concepts
Link-State Concerns
Path Determination
Routing Protocols
Objectives
UDP Protocol
TCP Protocol
TCP vs UDP
TCP : connection-oriented and reliable protocol
Provides flow control by providing sliding windows, Ensures reliability by providing sequence numbers and acknowledgments. TCP re-sends anything that is not received and supplies a virtual circuit between end-user applications Advantage of TCP: it provides guaranteed delivery of the segments
UDP Overview
Best effort datagram service
Applications
multimedia (e.g. RTP)
network services (e.g. DNS, RIP, SNMP)
UDP Multiplexing
All UDP datagrams arriving to IP address B and destination port number n are delivered to the same process Source port number is not used in multiplexing
2 ... n
2 ... n
2 ... n
UDP
UDP
UDP
IP
A B
IP
C
IP
UDP Datagram
Source and destination port numbers
Client ports are ephemeral
UDP length
Total number of bytes in datagram (including header) 8 bytes length 65,535 UDP Checksum : detects errors in UDP datagram (but this is optional)
0 Source Port UDP Length 16 31 Destination Port UDP Checksum
0-255 Well-known ports 256-1023 Less well-known ports 1024-65536 Ephemeral client ports
Data
2049
NFS
TCP Overview
Reliable byte-stream service
HTTP server
Response
Port 80
TCP Multiplexing
A TCP connection is specified by a 4-tuple (source IP address, source port, destination IP address, destination port) TCP allows multiplexing of multiple connections between end systems to support multiple applications simultaneously Arriving segment directed according to connection 4-tuple
1 2 ... m 1 2 ... n 1 2 ... k
TCP IP C
Multiplexing
53
25
79
15
Network Status
102
20
FTP Data
103
21
FTP Commands
119
News transfers
23
Telnet applications
139
NetBIOS applications
16
24 Destination port
31
Options
Padding
Data
TCP Header
Port Numbers
Sequence Number
TCP Header
Ack Number
SN of next byte expected by receiver
Acknowledges that all prior bytes in stream have been received correctly Valid if ACK flag is set
Header Length
4 bits Length of header in multiples of 32-bit words Minimum header length is 20 bytes Maximum header length is 60 bytes
TCP Header
Control
6 bits
URG: urgent pointer flag
o Urgent message end = SN + urgent pointer
ACK: ACK packet flag PSH: override TCP buffering RST: reset connection
Upon receipt of RST, connection is terminated and application layer notified
TCP Header
Window Size
16 bits to advertise window size
Used for flow control Sender will accept bytes with SN from ACK to ACK + window Maximum window size is 65535 bytes
TCP Checksum
Internet checksum method
TCP pseudo header + TCP segment Variable length NOP (No Operation) option is used to pad TCP header to multiple of 32 bits Time stamp option is used for round trip measurements
Options
Flow Control
Buffer limitations & speed mismatch can result in loss of data that arrives at destination Receiver controls rate at which sender transmits to prevent buffer overflow
Application Transport buffer segments advertised window size < B
buffer used
buffer available = B
Congestion Control
Available bandwidth to destination varies with activity of other users Transmitter dynamically adjusts transmission rate according to network congestion as indicated by RTT (round trip time) & ACK messages
However, buffers at intermediate routers between source and destination may overflow Router
R bps
Congestion occurs when total arrival rate from all packet flows exceeds R over a sustained period of time Buffers at multiplexer will fill-up and packets will be lost