Download - TCP/IP Review
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
Connection-oriented vs Connectionless services Addressing
Network Services Access Point address (PORTS) Network Point of Attachment address (MAC address)
Routing 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 BER, transit delay, buffer size, processing overheads;
all determine maximum packet size large packets -> fragmentation and reassembly Small packets -> inefficiency and congestion
Flow and congestion control Connection-Oriented -> inherent flow control Connectionless -> flow control in Transport Layer
Error Reporting Depends on network type. Each uses its own method
Router
Internet IPConnectionless network service: datagramsISO defines Network Layer in 3 sublayers:
Subnet Independent Convergence protocol SNICP
Subnet dependent Convergence protocol SNDCPSubnet dependent Access protocol SNDAP
ISO 8475 is SNICP corresponding to IP
Internet IP
IP Address structure
7-bit netid 24-bit hostid0
14-bit netid 16-bit hostid01
21-bit netid 8bit hostid011
multicast address0111
1111
Class A
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 gatewaysdistributed routing protocol based on distance
vector algorithm (DVA).distance is used as a routing metric between
two gateways: Hops or NetdelayInitially all gateways only know of the netid of
all adjacent networks and the IP/NPA address pair of each gatewaySetup 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 recordedThe 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)
18
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
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# This file contains port numbers for well-known services defined by IANA# Format:# Format:# <service name> <port number>/<protocol> [aliases...] [#<comment>]# <service name> <port number>/<protocol> [aliases...] [#<comment>]discard 9/tcp sink nulldiscard 9/tcp sink nulldiscard 9/udp sink nulldiscard 9/udp sink nullqotd 17/tcp quote #Quote of the dayqotd 17/tcp quote #Quote of the dayqotd 17/udp quote #Quote of the dayqotd 17/udp quote #Quote of the dayftp-data 20/tcp #FTP, dataftp-data 20/tcp #FTP, dataftp 21/tcp #FTP. controlftp 21/tcp #FTP. controltelnet 23/tcptelnet 23/tcpsmtp 25/tcp mail #Simple Mail Transfer Protocolsmtp 25/tcp mail #Simple Mail Transfer Protocoltime 37/tcp timservertime 37/tcp timservertime 37/udp timservertime 37/udp timserverdomain 53/tcp #Domain Name Serverdomain 53/tcp #Domain Name Serverdomain 53/udp #Domain Name Serverdomain 53/udp #Domain Name Serverbootps 67/udp dhcps #Bootstrap Protocol Serverbootps 67/udp dhcps #Bootstrap Protocol Serverbootpc 68/udp dhcpc #Bootstrap Protocol Clientbootpc 68/udp dhcpc #Bootstrap Protocol Clienttftp 69/udp #Trivial File Transfertftp 69/udp #Trivial File Transferfinger 79/tcpfinger 79/tcphttp 80/tcp www www-http #World Wide Webhttp 80/tcp www www-http #World Wide Web