TCP_IP - Pravin Shetty > Resume

Download Report

Transcript TCP_IP - Pravin Shetty > Resume

TCP/IP Review
Revisit ideas about TCP/IP
and Internetworking
Reference:
Ch.9 “Data Communications…”
2nd Edn By Fred Halsall
Network Layer issues

Network services


Addressing



Network Services Access Point address (PORTS)
Network Point of Attachment address (MAC
address)
Routing


Connection-oriented vs Connectionless services
determination of gateways needed to route a NPDU
from source ES to destination ES.
Quality of Service

transit delay, costs limit, levels of security, expected
residual error probability
Network Layer issues

Packet size




Flow and congestion control



BER, transit delay, buffer size, processing
overheads;
all determine maximum packet size
large packets -> fragmentation and reassembly
Small packets -> inefficiency and congestion
Connection-Oriented -> inherent flow control
Connectionless -> flow control in Transport Layer
Error Reporting

Depends on network type. Each uses its own
method
Router
Internet IP
Connectionless network service: datagrams
 ISO defines Network Layer in 3 sublayers:

Subnet Independent Convergence protocol SNICP
 Subnet dependent Convergence protocol SNDCP
 Subnet dependent Access protocol SNDAP


ISO 8475 is SNICP corresponding to IP
Internet IP
IP Address structure
0
7-bit netid
10
110
1110
1111
Class A
24-bit hostid
14-bit netid
16-bit hostid
21-bit netid
multicast address
8bit hostid
Class B
Class C
Multicast
Reserved
Subnetting
Class A/B/C networks can be subnetted into
small networks, eg. Monash is 130.194.0.0
(class B) and divided into 256 class C subnets
 Address mask for this subnetting is

255.255.255.0

Each class A/B/C network is assigned by
central authority Network Information
Center.
IP data unit - Datagram
IP Fragmentation/Reassembly





Datagram data are fragmented into smaller transfer
units due to limitations of underneath networks
SNICP-IP layer- fragmentation & reassembly
Intranet fragmentation - the whole datagram is
reassembled at each gateway
Internet fragmentation - the datagram is only
reassembled at destination IP.
The time-to-live field defines the time left for the
datagram (seconds). Source IP is notified if time
expires using ICMP. Gateways simply decrement it!
IP Routing
SNDCP sublayer handles routing
 Routing table- IP address / NPA address.
 Centralised routing - central network
management system to handle routing
table
 Distributed routing - all hosts and
gateway maintain and cooperate so that
routing information is consistent.

IP routing within a Host
Autonomous systems





Routing information are passed around via Interior
gateways and Exterior gateways.
Hosts maintain sufficient routing info to forward
datagrams to other hosts or an interior gateway in
the same network
Interior gateways maintain sufficient routing info to
forward datagrams to other interior gateways.
Exterior gateways maintain sufficient routing info
to forward datagrams to another autonomous
system or interior gateway
Each may use different protocols….
Address Resolution Protocol ARP






concerned with host <-> Interior gateway routing.
source send ARP request to gateway stating its
IP/NPA and dest IP.
gateway relays the request to the destination
destination registers the source’s IP/NPA and
send ARP reply to source.
source registers the dest’s IP/NPA and resumes
sending IP data.
Reverse ARP informs host about it’s IP/NPA
mapping.
An interior gateway protocol:
Routing Information Protocol
routing between interior gateways
 distributed routing protocol based on
distance vector algorithm (DVA).
 distance is used as a routing metric between
two gateways: Hops or Netdelay
 Initially all gateways only know of the netid
of all adjacent networks and the IP/NPA
address pair of each gateway


Setup by administrator
RIP
The interior gateway maintains a table of
netid, distance, gateway
 each gateway sends this table to its
neighbours periodically, so that the whole
autonomous system’s networks are recorded
The distances are added up for each subnet
in system to form complete routing table
 Time taken for routes to stabilise depends on
network size and frequency of updates

Internet Control Message Protocol
 Used
in network management, to do:
 error
reporting (dest unreachable, time exceed)
 reachability testing (echo request/reply)
 congestion control (source quench)
 route-change notification (redirect)
 performance measuring (timestamp)
 subnet addressing (address mask
request/reply)
Transmission Control Protocol

Stream Oriented - guaranteed error-free delivery
 Virtual Circuit Connection
 Initial connection requires some setup messages
between hosts to establish parameters of channel
(eg buffer sizes, authorisation, error detection & recovery procedures..)





After connection, protocol software on both sides
verify that data is received correctly
If transfer fails, application software on both sides can
be notified and appropriate steps taken
Buffered Transfer - Efficient data communication
Unstructured Stream - Transfer boundary not sent
Full-Duplex connection - allows protocol control
signals (eq ACKs) sent as part of data travelling
opposite direction
18
TCP – Reliable Delivery

Positive acknowledgment with Retransmission


Arrival of each correct packet at destination is
acknowledged by replying with a control signal.
Sender keeps a copy of each transmitted packet
and waits for acknowledgement to arrive
 Sender also starts a timer when each packet is
transmitted. If Timer expires before ack is received,
the packet is retransmitted (and timer restarted)
 Packets identified by sequence number
 Duplicate Packets (already acknowledged) are
discarded
TCP Stream buffer and Flow Control
“Sliding Windows”





Simple positive acknowledgement waits for
acknowledgement before transmitting next packet
This wastes network bandwidth - especially where
transmission delays are high
Transmitting several packets and keeping copies
of unacknowledged packets is more efficient
Available storage space determines maximum
window size
Allows efficient communication and provides flow
control
TCP “Sliding Windows”
TCP “Sliding Windows”
Flow Control
 Window size can be changed during session
 As data is acknowledged, the window sizes may
be updated
 Reducing window size slows data flow
eg when receiver's buffer space is running low
 Setting window size to zero halts data exchange!
TCP - Congestion Avoidance





Receiver window size included in acknowledgements
Another window size is kept - Congestion Window size
 Actual Window =
MIN(receiver's window, congestion window)
 Usually Congestion window = Receiver's window
When timeout occurs, Halve Congestion window size
 Called "multiplicative decrease"
Retransmitted Segments also have timer “backed-off”
When next ACK arrives Congestion window is
incremented



Called “additive increase”
TCP provides quick and significant traffic reduction
Allows gateways to clear datagrams already queued
Implementation of TCP/IP
TCP/IP Applications
Transport Protocol Addresses:
TCP & UDP Port Numbers
# This file contains port numbers for well-known services defined by IANA
# Format:
# <service name> <port number>/<protocol> [aliases...]
[#<comment>]
discard
9/tcp
sink null
discard
9/udp
sink null
qotd
17/tcp
quote
#Quote of the day
qotd
17/udp
quote
#Quote of the day
ftp-data
20/tcp
#FTP, data
ftp
21/tcp
#FTP. control
telnet
23/tcp
smtp
25/tcp
mail
#Simple Mail Transfer Protocol
time
37/tcp
timserver
time
37/udp
timserver
domain
53/tcp
#Domain Name Server
domain
53/udp
#Domain Name Server
bootps
67/udp
dhcps
#Bootstrap Protocol Server
bootpc
68/udp
dhcpc
#Bootstrap Protocol Client
tftp
69/udp
#Trivial File Transfer
finger
79/tcp
http
80/tcp
www www-http
#World Wide Web