Transcript Document
TCP/IP
TCP/IP
• The Transmission Control Protocol/Internetworking Protocol
(TCP/IP) is a set of protocols, or protocol suite, that defines
how all the transmissions are exchanged across the Internet.
• An internet under TCP/IP operates like a single network
connecting many computers of any size and type. Internally,
an internet (or, more generally, the Internet) is an
interconnection of independent physical networks linked
together by internetworking devices.
An internet According to TCP/IP
TCP/IP
• A host in TCP/IP is a computer.
• Transmission Control Protocol (TCP) was developed before
the OSI model. Therefore, the layers in the TCP/IP protocol do
not match exactly with those in the OSI model.
• The TCP/IP protocol is made of five levels: physical, data link,
network, transport and application.
TCP/IP and the OSI Model
TCP/IP
• At the transport layer TCP/IP defines two protocols: TCP and
User Datagram Protocol (UDP).
• At the network layer the main protocol defined by TCP/IP is
the Internetworking Protocol (IP).
• At the physical and data link layers, TCP/IP does not define
any specific protocol. It supports all the standard and
proprietary protocols.
Encapsulation
• The data unit created at the application layer is called a
message.
TCP/IP
•
TCP or UDP creates a data unit that is called either a
segment or a user datagram.
•
•
The IP layer creates a data unit called a datagram.
The movement of the datagram across the Internet is the
responsibility of the TCP/IP protocol.
Network Layer
•
At the network layer TCP/IP supports the IP protocol. IP, in
turn, contains four supporting protocols: ARP, RARP,
ICMP, and IGMP.
TCP/IP
Internetwork Protocol (IP)
• IP is the transmission mechanism used by the TCP/IP
protocols. It is an unreliable and connectionless datagram
protocol- a best-effort delivery service.
• The term best-effort mean that IP provides no error checking
or tracking.
• If reliability is important, IP must be paired with a reliable
protocol such TCP.
• IP transports data in packets called datagrams, each of which is
transported separately.
TCP/IP
• Datagrams can travel along different routes and may arrive out
of sequence or duplicated. IP does not keep track of the routes
and has no facility for reordering datagrams once they arrive.
Because it is a connectionless service, IP does not create
virtual circuits for delivery.
Datagram
• A datagram is a variable-length packet (up to 65,536 bytes)
consisting of two parts: header and data.
Datagram approach
IP Datagram
• Version
The first field defines the version number of the IP. The current
version is 4 (IPv4).
• Header length (HLEN)
The HLEN field defines the length of the header in multiples of
four bytes. The four bits can represent a number between 0 and
15, which, when multiplied by 4, gives a maximum of 60
bytes.
• Service type
The service type field defines how the datagram should be
handled. It includes bits that define the priority of the
datagram.
• Total Length
• Identification
The identification field is used in fragmentation. A datagram,
when passing through different networks, may be divided into
fragments to match the network frame size. When it happens,
each fragment is identified with a sequence number in this
field.
• Flags
The bits in the flags deal with the fragmentation
• Fragmentation offset
The fragmentation offset is a pointer that shows the offset in the
original datagram (if fragmented)
• Time to live
The time to live defines the number of hops a datagram can travel
before it is discarded. The source host, when it creates the
datagram, sets this field to an initial value. Then, as datagram
travels through the Internet, router by router, each router
decrements this value by 1. If this value becomes 0 before the
datagram reaches its final destination, the datagram is
discarded. This prevent the datagram from going back and
forth forever between routers.
• Protocol
The protocol field defines which upper-layer protocol data are
encapsulated in the datagram (TCP, UDP, etc)
• Header checksum
This is a 16-bit field used to check the integrity of the header, not
the rest of the packet.
• Source address
The source address field is a four-byte (32-bit) Internet address.
• Destination address
The destination address is a four-byte (32-bit) Internet address.
• Options
This field can carry information about routing, timing,
management, and alignment.
ADDRESSING
•Each Internet address
consists of four bytes (32
bits), defining three fields:
class type, netid, and
hostid.
•These parts are of
varying length, depending
on the class of the
address.
Internet Classes
•Currently class A and class B are full. Addresses are available
in class C only.
•Class D is reserved for multicast addresses. Multicasting allows copies of
a datagram to be passed to a select group of hosts rather than an individual
host.
IP Addresses in Decimal Notation
To make the 32-bit form shorter and easier to read, Internet addresses
are usually written in decimal form with decimal points
separating the bytes- dotted-decimal notation.
Class Ranges of Internet Addresses
Network and Host Addresses
A Network with Two Levels of Hierarchy
A Network with Three Levels of Hierarchy
Addresses with and without Subnetting
Masking
• Masking is a process that extracts the address of the physical
network from an IP address (if there are subnetworks),
otherwise the subnetwork address.
Masking
123
0 1 1 1 1 0 1 1
192
1 1 0 0 0 0 0 0
----------------------------------------------64
0 1 0 0 0 0 0 0
ARP
Other Protocols in the Network Layer
• TCP/IP supports four other protocols in the
network layer: ARP, RARP, ICMP, and IGMP.
• Address Resolution protocol (ARP) associates
an IP address with the physical address. ARP is
used to find the physical address of the node
when its Internet address is known.
• Reverse Address Resolution Protocol (RARP)
allows a host to discover its Internet address
when it knows only its physical address.
• Internet Control Message Protocol (ICMP)
is a mechanism used by hosts and routers to send
notifications of datagram problems back to the
sender.
If a router is unable to route or deliver the
datagram because of unusual conditions or
because of network congestion, ICMP allows
it to inform the original source.
• The Internet Message Protocol (IGMP) has
been designed to help a multicast router
identify the hosts in a LAN that are members
of a multicast group.