TCPIP Review Revisit ideas about TCPIP and Internetworking
TCP/IP Review Revisit ideas about TCP/IP and Internetworking Reference: Ch. 9 “Data Communications…” 2 nd Edn By Fred Halsall www. infotech. monash. edu
Network Layer issues • Network services – Connection-oriented vs Connectionless network 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 www. infotech. monash. edu 2
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 www. infotech. monash. edu 3
Router www. infotech. monash. edu 4
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 www. infotech. monash. edu 5
Internet IP www. infotech. monash. edu 6
IP Address structure 0 7 -bit netid 1 0 1 1 Class A 24 -bit hostid 14 -bit netid Class B 16 -bit hostid 21 -bit netid multicast address 8 bit hostid Class C Multicast Reserved www. infotech. monash. edu 7
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. 0 • Each class A/B/C network is assigned by central authority Network Information Center. www. infotech. monash. edu 8
IP data unit - Datagram www. infotech. monash. edu 9
IP Fragmentation and 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! www. infotech. monash. edu 10
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. www. infotech. monash. edu 11
IP routing within a Host www. infotech. monash. edu 12
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…. www. infotech. monash. edu 13
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. www. infotech. monash. edu 14
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 (either 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 www. infotech. monash. edu 15
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 the system to form a complete routing table • Time taken for routes to stabilise depends on network size and frequency of updates www. infotech. monash. edu 16
Internet Control Message Protocol ICMP • Used for 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) www. infotech. monash. edu 17
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 www. infotech. monash. edu 18
TCP – Reliable Delivery • Based on 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 acknowledgement is received, the packet may be retransmitted (and timer restarted) • Packets identified by sequence number • Duplicate Packet (already acknowledged) is discarded www. infotech. monash. edu 19
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 www. infotech. monash. edu 20
TCP “Sliding Windows” www. infotech. monash. edu 21
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! www. infotech. monash. edu 22
TCP - Congestion Avoidance • Receiver window size included in acknowledgements • Another window size is also 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” • TCP provides quick and significant traffic reduction • Allows gateways to clear datagrams already queued www. infotech. monash. edu 23
Implementation of TCP/IP www. infotech. monash. edu 24
TCP/IP Applications www. infotech. monash. edu 25
Transport Protocol Addresses: TCP & UDP Port Numbers # Copyright (c) 1993 -1999 Microsoft Corp. # 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-http #World Wide Web www. infotech. monash. edu 26
End… www. infotech. monash. edu
- Slides: 27