Transport and Network Layer 1 Introduction Responsible for moving messages from end-to-end in a network Closely tied together TCP/IP: most commonly used protocol o Used in Internet o Compatible with a variety of Application Layer protocols as well as with many Data Link Layer protocols 2 - Transport & Network Layer Protocols Transport end-to-end delivery of messages o Sets up virtual circuits (when needed) segmentation and reassembly o Breaking the message into several smaller pieces at the sending end o Reconstructing the original message into a single whole at the receiving end Interacts with Application Layer Network addressing and routing of messages o Selects the best path from computer to computer until the message reaches destination Performs encapsulation on sending end o Adds network layer header to message segments Performs decapsulation on receiving end o Removes the network layer header at receiving end and passes them up to the transport layer
Transmission Control Protocol - TCP Links the application layer to the network layer Performs packetization and reassembly o Breaks up a large message into smaller packets o Numbers the packets o Reassembles the packets at the destination end Ensures reliable delivery of packets Internet Protocol addressing and routing of packets o Two versions in current in use IPv4: a 192 bit (24 byte) header, uses 32 bit addresses. IPv6: Mainly developed to increase IP address space due to the huge growth in Internet usage (128 bit addresses) o Both versions have a variable length data field Max size depends on the data link layer protocol. e.g., Ethernet s max message size is 1,492 bytes, so max size of TCP message field: 1492 24 24 = 1444 bytes
TCP/IP 3 Transport Layer Functions Linking to the Application Layer TCP may serve several Application Layer protocols at the same time o Problem: Which application layer program to send a message to? o Solution: Port numbers located in TCP header fields; 2-byte each (source, destination) Standard port numbers o Usual practice numbers: 80 for HTTP, 25 for SMTP, 21 for FTP Nonstandard port numbers o Possible, but requires configuration of TCP o Can be used to enhance security from commonly known ports Segmenting
Session management Connection Oriented is provided by TCP o Setting up a virtual circuit, or a TCP connection o TCP asks IP to route all packets in a message by using the same path (from source to destination) o Packet deliveries are acknowledged o Used by HTTP, SMTP, FTP Connectionless Routing is provided by UDP Sending packets individually without a virtual circuit
o Each packet is sent independently of one another, and will be routed separately, following different routes and arriving at different times QoS Routing (provided by RTP) A special kind connection oriented routing with priorities More about User Diagram Protocol Protocol used for connectionless routing in TCP/IP suite that uses no acks, no flow control Uses only a small packet header o Only 8 bytes containing only 4 fields: Source port Destination port Message length Header checksum Commonly used for control messages that are usually small, such as DNS, DHCP, RIP and SNMP. Can also be used for applications where a packet can be lost, such as information rich video More about Q of S QoS defines and assigns priorities to classes of service Timeliness - timely delivery of packets o Packets be delivered within a certain period of time (to produce a smooth, continuous output o Required by some applications, especially real time applications (e.g., voice and video frames) o (e-mail doesn t require this) QoS routing o Defines classes of service, each with a different priority: Real-time applications such as VoIP- highest A graphical file for a Web page - a lower priority E-mail - lowest (can wait a long time before delivery) Asynchronous Transfer Mode (ATM) o A high-speed data link layer protocol TCP/IP protocol suite o Resource Reservation Protocol (RSVP) Sets up virtual circuits for general purpose real-time applications o Real-Time Streaming Protocol (RTSP) Sets up virtual circuits for audio-video applications o Real-Time Transport Protocol (RTP) Used after a virtual connection setup by RSVP or RTSP Adds a sequence number and a timestamp for helping applications to synchronize delivery Uses UDP (because of its small header) as transport
4 Addressing Addressing o Each device on the path between source and destination must have an address o Internet Addresses o Assignment of addresses o Translation between network layer addresses and other addresses (address resolution) About assignment of address Application Layer address (URL) o For servers only (clients don t need it) o Assigned by network managers and placed in configuration files. o Some servers may have several application layer addresses Network Layer Address (IP address) o Assigned by network managers, or by programs such as DHCP, and placed in configuration files o Every network on the Internet is assigned a range of possible IP addresses for use on its network Data Link Layer Address (MAC address) o Unique hardware addresses placed on network interface cards by their manufacturers ( based on a standardized scheme) Servers have permanent IP addresses, clients usually do not
Internet addresses and domain names IPv 4 32 bits Dotted Decimal Notation 134.139.1.2 IPv6 128 bits 3.2 x 10 38 address Subnets
Subnet mask To separate the subnet part of the address from the host part Dynamic Addressing Give out IP address for client computers on network Bootstrap Protocol (bootp) Dynamic Host Control Protocol (DHCP) Different approaches, but same basic operations: o A program residing in a client establishes connection to bootp or DHCP server o A client broadcasts a message requesting an IP address (when it is turned on and connected) o Server (maintaining IP address pool) responds with a message containing IP address (and its subnet mask) o IP addresses can also be assigned with a time limit (leased IP addresses) o When expires, client must send a new request Domain Name Service Used to determine IP address for a given URL Provided through a group of name servers o Databases containing directories of domain names and their corresponding IP addresses Large organizations maintain their own name servers o smaller organizations rely on name servers provided by their ISPs When a domain name is registered, IP address of the DNS server must be provided to registrar for all URLs in this domain o Example: Domain name: indiana.edu
o URLs: www.indiana.edu, www.kelly.indiana.edu, abc.indiana.edu How DNS workd Each client has an address table Use DNS server to resolve the address Mac Address Resolution Find MAC address of a host of a specific IP address ARP Broadcast an ARP message to all nodes on a LAN asking which node has a certain IP address Host with that IP address then responds by sending back its MAC address Store this MAC address in its address table Send the message to the destination node Example of a MAC address: 00-0C-00-F5-03-5A 5 Routing Process of identifying what path to have a packet take through a network from sender to receiver Routing Tables o Used to make routing decisions o Shows which path to send packets on to reach a given destination o Kept by computers making routing decisions Routers o Special purpose devices used to handle routing decisions on the Internet o Maintain their own routing tables
Type of Routing Centralized versus Decentralized Centralized routing
o o Decisions made by one central computer Used on small, mainframe-based networks Decentralized routing o Decisions made by each node independently of one another o Information needs to be exchanged to prepare routing tables o Used by the Internet More about decentralized routing Static routing versus dynamic routing Static routing o Fixed routing table created by network manager o Table changes when computers added or removed Dynamic Routing o Routing tables are updated dynamically o Routers exchange information for routers to update routing tables More about dynamic routing algorithms Distance vector versus link state Distance vector o Uses the least number of hops to decide the best route o RIP and RIP-2 Link state o Use a combination of information types to decide the best route: number of hops, congestion, speed of link o Nodes exchanged link state info periodically to keep the network up to date o More reliable Routing Protocols Rules to exchange info among routers, so that each can build and maintain routing tables RIP Interior routing protocols versus exterior protocols Exterior routing protocols operate between autonomous systems (networks of different companies) Interior routing protocols operate within an autonomous system; RIP, OSPF, EIGRP, ICMP
OSPF Other interior routing protocols Exterior routing protocol
For a computer to work in TCP/IP network Required Network layer addressing information o Computer s own IP address o Its subnet mask To determine what addresses are part of its subnet o Local DNS server s IP address To translate URLs into IP addresses o IP address of the router (gateway) on its subnet To route messages going outside of its subnet Address information is obtained from a configuration file or provided by a DHCP server Servers also need to know their own application layer addresses (domain names) 6 - TCP/IP Example About Router
Case 1a:
7 Implications for Management Most organizations moving toward a single standard based on TCP/IP o Decreased cost of buying and maintaining network equipment o Decreased cost of training networking staff Telephone companies with non-tcp/ip networks are also moving toward TCP/IP o Significant financial implications for telcos o Significant financial implications for networking equipment manufacturers