IP: Connectionless Datagram Delivery IP

advertisement
IP: Connectionless Datagram Delivery
• This presentation considers the services provided by the Internet
Protocol (IP) to network / e-commerce applications.
• IP sits in the middle (at the network layer) and provides a
common set of services on top of proprietary Data Link and
Physical Layers.
Application
Transport
(Inter) Network
Datalink
Physical
Application Specific Protocols
Open Standard
Open Standard
Proprietary
Proprietary
1
IP: Connectionless Datagram Delivery
• So, IP is an “open standard” that provides a common set of
network and internetwork services to applications (and to the
transport layer that sits between the application and IP).
• As the name suggests IP (the Internet Protocol) provides:
- A protocol (set of rules) for internetwork communication.
- And, a packet (datagram) format to implement the protocol.
• The current version of the protocol and the packet format is
version 4.
• In brief, we will see that IP can be summarised as a
Connectionless Datagram Delivery Service.
2
1
IP : Connectionless Datagram Delivery
The basic unit of delivery in an internetwork is an IP Datagram
(contained within a physical frame)
Datagram
Header
Frame
Header
Datagram Data Area
Frame Data Area
3
IP Datagram / Packet Format
• Note that application software doesn’t specify hardware
addresses, they use IP addresses.
• Note the structure and interpretation of IP addresses.
• Some sort of resolution of “high level” IP addresses to “low
level” datalink layer addresses must take place.
In Ethernet, for example the Address Resolution Protocol
provides this functionality.
• In order to understand the performance and behaviour of ECommerce applications we must understand the performance
and behaviour of the networks that “carry” the application.
4
2
IP Datagram Format
• IP Datagram Header :
Vers HLEN Serv Tot
ID Flags Fragment TTL Protocol
Type LEN
•
•
•
•
•
•
•
Offset
Version
HLEN
Service Type
Total Length
ID
Flags
Fragment Offset
• Time to live
:
:
:
:
:
:
:
:
Header
Source
Dest
IP
Checksum
IP
IP
Options
Pad
Data
4 bits
4 bits (in 32 bit words, min 5, max 15)
8 bits (EG : reliability v’s speed)
16 bits (In bytes)
16 bits (Used with fragmentation)
DF, MF
Where in the datagram does this fragment
belong. (measured in units of 8 bytes).
8 bits
A counter used to limit packet lifetimes.
It is supposed to count seconds, but in
practice just counts “hops”.
5
IP Datagram Format
• When ttl hits zero, a warning packet (using ICMP) is sent back
to the originator.
• Protocol
:
8 bits
Specifies which higher layer service this
packet will be passed to. EG TCP or
UDP. (Numbering defined in RFC 1700)
• Header Checksum : Verifies the header only.
Each 16 bit half-word is added as it
arrives (using one’s complement), the
checksum is then the one’s complement of
the result. Robust !
Needs to be recalculated at every router.
6
3
IP Datagram Format
• Source & Dest IP
:
32 bits each
(i.e network and host)
IP Options:
• Really an escape mechanism for future designs.
• Options are of variable length, a 1 byte code identifies the
option.
• May be followed by a 1 byte option_length field, and then one
or more bytes of data.
• The option is padded out to a multiple of 4 bytes
• Options include : Security, Strict Source Routing, Loose
Source Routing, Record Route, Time Stamp.
7
IP Datagram Format
• Data Area:
Because the TOTAL_LENGTH field in the header is 16 bits
long (specifying total length in bytes), the maximum size of an
IP Datagram is 216 bytes i.e 65,536 bytes
Data Area is thus a maximum of 65,536 - 60
Datagram
Header
Datagram Data Area
Max size 65,536 bytes
8
4
Datagram Encapsulation
• How does a Datagram relate to a frame?
The Datagram is carried in the data area of the frame.
• Datagram moves from one machine to another within the frame
carried by the physical network.
• It is efficient to carry one Datagram in one frame - encapsulation.
Remember though the hardware does not recognise the Datagram
or IP addresses (contained in the frame data).
Some issues arise in WAN Technologies where route involves
crossing networks with different physical frame sizes.
9
Datagram Size, MTU and Fragmentation
• Ideally an IP Datagram should fit into one frame - but which
frame size do we choose ?
• And, the purpose of IP design is to hide underlying
technologies.
• Maximum Transfer Unit of Ethernet 1500 bytes, FDDI is 4470.
• IP is not designed to adhere to one physical network size
(MTU), instead datagrams can be fragmented as necessary.
• Fields in the IP Datagram Header accommodate fragmented
datagrams.
10
5
Datagram Fragments
• Each fragment contains a Datagram header.
Almost a complete duplication of original header.
(TOT_LEN now refers to the size of the FRAGMENT)
• A bit in the FLAGS field identifies it as a fragment.
• Header Fields used in Fragmentation control are:
ID (Unique Identifier of the Datagram)
FLAGS (more fragments, do not fragment)
FRAGMENT OFFSET (in units of 8 bytes)
• Combining the information gleaned from the above three fields,
a router or host can determine when all of a fragmented
datagram has been received.
11
Additional Characteristics of IP
• Universal Identifier - allows any host to communicate with
another host.
• User does not see interconnections of networks - sees one virtual
network.
• Thus, all networks are equal.
Any communication system that can transfer packets counts as a
single network. (Regardless of throughput capacity, size
geography etc…)
• Addresses specify network connections.
Multi-homed hosts - eg : a router that connects to more than 1
network will have multiple IP Addresses.
12
6
IP: Efficient Routing
• Given an IP address, its class can be determined from the three
high order bits.
• The IP address has been defined in such a way that it is possible
to extract the netid and hostid portions quickly.
• Routers use the netid portion when deciding where to send a
packet.
They depend on efficient extraction to achieve high speed.
13
IP Summary
• In brief, we will see that IP can be summarised as a
Connectionless Datagram Delivery Service.
• No “connection” established (by IP) at either end.
• No guarentees provided with regard to delivery / feedback.
• No sequencing / streaming of data provided by IP (Datagram ID
No.s do not imply “sequence” numbers for processing).
• The glue that binds different datalink and physical layer
standards to provide a common virtual network where our
applications can reside and operate.
14
7
Download