Professional Documents
Culture Documents
Tcpip Basicc
Tcpip Basicc
• Two standards:
– IBM’s proprietary SNA
– ISO’s Reference Model for Open Systems Interconnection (OSI model)
The OSI Model
7 Application
6 Presentation
Upper Layer
5 Session directly assist the
user
4 Transport
3 Network
Lower Layer Layer Function
connects one node 2 Data Link
to another Application Provides services directly to an
1 Physical application program
Presentation Presentation of information to
user in a format that the user will
understand
Layer Function Session Controls the user to user dialogue
– its direction and
Network Choosing the next node and the link to
synchronization
it
Transport Raises the quality of service
Data Link Controls the flow of messages on the
provided by the network to the
chosen link
level required by user
Physical Connecting to the physical medium
that provides the link
The Internet Protocol Suite
Application HTTP Telnet DNS
Network IP
• IP is an unreliable protocol
– It is unconcerned with whether a packet reaches its eventual destination, or
whether they arrive in the original order
– IP cannot tell if packets were lost or whether they were received out of order
• The protocol field in the header information identifies which higher level TCP/IP
protocol sent the data. When data arrives at its destination this field tells IP
which protocol module to pass it on to.
•The time-to-live (TTL) field, specifies how long the packet is allowed to reamin in
the internet delivery system and is decremented by by every router that the
packet passes through. When it reaches zero the packet is discarded and the
sender. This prevents packets from traveling the Internet forever.
•The checksum is an error detection checksum covering only the fields of the
header.
ARP & ICMP: Accompanying Protocols
• Address Resolution Protocol (ARP) finds out the physical
address corresponding to an IP address
– When an IP Packet is received, an ARP request is brodcasted on the network.
When a host recognizes an ARP request containing its own IP address, it sends
an ARP reply containing its hardware address. This address is cached.
– There is also a Reverse ARP (RARP) protocol. This is used by a host to find out its
own IP address if it has no way of doing this except via the network.
• TCP sends data using IP, in blocks which are called segments.
•The Port number identifies a particular user within a machine (which is
identified by the IP address
• The sequence number identifies the position in the data stream
•The acknowledgement number is used to convey back to the sender that data
has been received correctly.
•The window size gives the number of bytes the receiver can accept.
•The checksum covers both header and data
•The urgent pointer identifies the start of data in the stream that must be
processed urgently.
What is a Port?
• Refers in this context a software port
• Multiple applications or upper layer protocols may use TCP
simultaneously
– Ports are used to map TP data to a specific process
– The combination of an IP address and a port number is called a socket
– Sockets can be full duplex (data transmitted in both directions) or half duplex
• Typical Port numbers:
– 20/21 FTP
– 23 Telnet
– 25 Simple Mail Transfer Protocol
– 37 Time
– 53 Domain Name System
– 80 HTTP
– 110 POP3
– 443 HTTPS
TCP Communication: Making a Connection
• A connection must be established before any data is sent
• Segments are only sent between client and server if there is data to
flow.
• No status polling takes place.
• To Start:
– The server listens out for connection requests.
– The client requests a connection by sending specifying its own port number and the
port that it wants to connect to .
– The SYN (synchronize sequence numbers) flag is set and the client’s initial data
sequence number is specified.
• Next:
– The server responds with a segment in which the header contains its own initial data
sequence number.
• To complete the connection :
– the client acknowledges the server’s data sequence number by sending back a
segment with the ACK flag set and the acknowledgement field containing the
server’s data sequence number plus one.
TCP Communication: Data Transmission
• TCP is a sliding window protocol, and does not wait for
acknowledgement
• For efficiency:
– TCP can specify an acknowledgement delay in the hope that within that time
some data will need to be sent the other way, and the two can ride together
– The Nagle algorithm allows a TCP segment containing less data than the
receiver’s advertised window size can only be sent if the previous segment has
been acknowledged. This allows aggregation of small amounts of data
TCP Communication: Error Correction
• In error situations TCP can:
– detect whether data has been successfully received at the other end
– take steps to rectify the situation.
– inform the sending application of the problem and failure, if all else fails,
•Two different application one using UDP and another using TCP may use the
same port number. The two data streams are distinguished by the protocol field
in the IP address header
•The checksum is optional.
Unicast, Broadcast, Multicast
Applications of IP Multicast:
Pay TV
File Transfer
Financial Information