Network-Oriented Software Development Course: CSc4360/CSc6360 Instructor: Dr. Beyah Sessions: M-W, 3:00 4:40pm Lecture 2
Topics Layering TCP/IP Layering Internet addresses and port numbers Encapsulation and demultiplexing Client-Server model Sockets API 2
Introduction TCP/IP allows communications between computers with different HW and SW Started in the 1960s Government funded project ARPANET Open System Definition of the protocol suite and many implementations are available 3
Layering Networking protocols usually developed in Layers Each layer handles a different facet of the communication TCP/IP is a four layer system Each layer has a different responsibility 4
Layering (Continued) 5
Layering (Continued) Link (data-link) Layer Part of the network card Deals with the physical interface to medium Handles appropriate Medium Access Protocol (MAC) (e.g., CSMA/CA 802.11) Network Layer Handles packet routing 6
Layering (Continued) Transport Layer Provides a flow of data between two hosts Two main protocols: Transmission Control Protocol and (TCP) and User Datagram Protocol (UDP) TCP: uses acknowledgements (ACKs), to ensure reliability; provides congestion control UDP: simpler than TCP; sends out datagrams; not reliable Application Layer Concerned with specifics of a particular application NOT with moving data across a network 7
Layering (Continued) Example: Two hosts on a LAN running FTP Each layer has one or more protocols to communicate with its peer at the same layer 8
Layering (Continued) What is the difference between an internet and the Internet? An internet is two or networks connected using a router. The Internet is a public interconnection of networks. Figure on next slide shows an internet consisting of two networks We can differentiate between an endsystem and an intermediate-system 9
Layering (Continued) Example: Two networks connected with a router 10
UDP and TCP are the predominant transport layer protocols Internet Protocol (IP) - main network layer protocol Internet Control Message Protocol (ICMP) control and error messages Internet Group Management Protocol (IGMP) used with multicasting TCP/IP Layering Address Resolution Protocol (ARP) - used to convert between IP layer address and link layer address 11
Internet Addresses Every device on the Internet must have an IP address IP Address: 32 bits (version 4) 128 bits (version 6) Written as four decimal numbers Ex. 140.252.13.33 (dotted-decimal notation) Three types of IP addresses: unicast, multicast, and broadcast 12
Internet Addresses (Continued) Five different classes of Internet addresses Can determine class by looking at first number of IP address Classes been replaced with Classless Interdomain Routing (CIDR) CIDR is more efficient 13
Encapsulation and The Domain Name System (DNS) As data is sent down the protocol stack, each layer adds its header and the upper layer s header and payload are encapsulated as the lower layers payload Protocol, application, etc. identifiers are stored in headers DNS resolves IP name www.gsu.edu with and IP address 131.96.5.88 14
Ethernet frames arrive at destination and go up the protocol stack Each header is read for routing and stripped off The data is passed to the next layer where the same occurs This repeats until the destination layer is reached Demultiplexing TCP uses source IP and source and destination ports to demultiplex 15
Client-Server Model Most networking applications are written using the client-server model The server usually provides some sort of service for the client Servers are categorized into two classes: iterative and concurrent Iterative I1. Wait for a client request to arrive I2. Process the client request I3. Send the response back to the client that sent request I4. Go back to step I1 Concurrent C1. Wait for a client request C2. Start a new server to handle client s request. Specifics of this process is OS dependent C4. Go back to step I1 Concurrent servers offer the advantage of servicing multiple clients simultaneously TCP servers are normally concurrent and UDP server are normally iterative 16
Port Numbers TCP and UDP user 16-bit port numbers Well-known services have reserved port numbers (e.g., telnet - TCP 23, FTP - TCP 21) Managed by Internet Assigned Numbers Authority (IANA) Reserved ports range from 1 to 1023 Clients usually use ephemeral ports 17
Application Program Interface (API) APIs allows applications to communicate with other applications or themselves Most common API that uses the TCP/IP protocols is called sockets Most popular sockets are UDP (datagram) sockets, TCP (stream) sockets, and RAW sockets 18
Summary Introduced TCP/IP protocol suite and terms and protocols and the concept of layering Distinguished between end-to-end (Transport and Application layers) and hop-by-hop (network and link layers), protocols Emphasized difference in reliable and unreliable communication Discussed the encapsulation and demultiplexing processes Discussed importance of IP addressing and port numbers in network communication 19