Computer Networks Lecture Slides PDF

Summary

These are lecture slides on computer networks, and they cover topics like what is the internet, protocols, network edge and core. They also discuss performance, security, history and access networks.

Full Transcript

Computer Networks Dr. Keyvan Moataghed Slides are adapted from Computer Networking: A Top-Down Approach, 8th Edition © J.F Kurose and K.W. Ross 9/17/2024 Computer Networks 1 Part 1 9/17/2024...

Computer Networks Dr. Keyvan Moataghed Slides are adapted from Computer Networking: A Top-Down Approach, 8th Edition © J.F Kurose and K.W. Ross 9/17/2024 Computer Networks 1 Part 1 9/17/2024 Computer Networks 2 Introduction ❖Overview: What is the Internet? What is a protocol? Network edge: Hosts, access network, physical media Network core: Packet/circuit switching, internet structure Performance: Loss, delay, throughput Protocol layers and service models Security History 9/17/2024 Computer Networks 3 Introduction ❖ The Internet: a “nuts and bolts” view Billions of connected computing devices: mobile network ▪ hosts = end systems national or global ISP ▪ Running network apps at Internet’s “edge” Packet switches: forward packets (Fragments of data) local or ▪ Routers and switches are used Internet regional ISP Communication links ▪ For connectivity between nodes fiber home network content optics, copper wire , radio frequency, provider and satellite are used network datacenter ▪ Transmission rate is defined as network bandwidth Networks ▪ Collection of devices, routers, links: managed by ISP (Internet Service enterprise network Provider) organization 9/17/2024 Computer Networks 4 Introduction ❖ The Internet: a “nuts and bolts” view mobile network 4G ▪ Internet: “network of networks” national or global ISP Interconnects the ISPs Streaming ▪ Protocols are used for: Skype IP video Sending control and receiving messages local or regional ISP e.g., HTTP (Web), streaming video, Skype, TCP, IP, WiFi, 4G, Ethernet home network content provider HTTP network datacenter ▪ Internet standards Ethernet network RFC (Request for Comments) IETF (Internet Engineering Task Force) enterprise TCP network 9/17/2024 Computer Networks WiFi 5 Introduction ❖ The Internet: a “services” view ❑Infrastructure: mobile network That provides services to applications: national or global ISP Web, streaming video, multimedia teleconferencing, email, games, e-commerce, Streaming social media, inter-connected appliances, … Skype video local or regional ISP ❑Provides programming interface to distributed applications: home network content “hooks” allowing sending/receiving HTTP provider network datacenter apps to “connect” to, use Internet network transport service provides service options, analogous enterprise to postal service network 9/17/2024 Computer Networks 6 Introduction ❖ What is Protocol ? Human protocols: Network protocols: Devices (computers or Machines rather than humans) ▪ “what’s the time?”..“I have a question” All communication activity in Internet governed by protocols ▪ Received messages follow actions Hi TCP connection request Hi TCP connection response Got the time? GET http://gaia.cs.umass.edu/kurose_ross time 2:00 Protocols: Define the format, order of messages sent and received among network Devices, and actions taken on messages sent and received. 9/17/2024 Computer Networks 7 Introduction ❖ Network structure: mobile network national or global ISP Network edge: Hosts: clients and servers in data centers Access networks, physical media: local or Wired, wireless communication links regional ISP home network content Network core: provider network datacenter ▪ Interconnected routers network ▪ Network of networks enterprise network 9/17/2024 Computer Networks 8 Introduction ❖ Access networks: DSL (Digital Subscriber Line) central office telephone network DSL splitter modem DSLAM voice, data transmitted ISP at different frequencies over DSL access dedicated line to central office multiplexer ▪ Using existing landline telephone line to the central office DSLAM Data over DSL phone line goes to Internet Voice over DSL phone line goes to telephone net ▪ 24-52 Mbps dedicated downstream transmission rate ▪ 3.5-16 Mbps dedicated upstream transmission rate 9/17/2024 Computer Networks 9 Introduction ❖ Access networks: cable-based access cable headend … cable splitter modem C O V V V V V V N I I I I I I D D T D D D D D D A A R E E E E E E T T O O O O O O O A A L 1 2 3 4 5 6 7 8 9 Channels FDM (Frequency Division Multiplexing): different channels transmitted in different frequency bands 9/17/2024 Computer Networks 10 Introduction ❖ Access networks: cable-based access cable headend … cable splitter cable modem modem CMTS termination system data, TV transmitted at different frequencies over shared cable ISP distribution network ▪ HFC (Hybrid Fiber Coax) Asymmetric: up to 40 Mbps – 1.2 Gbps downstream transmission rate, 30-100 Mbps upstream transmission rate ▪ Network of cables, fiber attaches homes to ISP router homes share access network to cable headend 9/17/2024 Computer Networks 11 Introduction ❖ Access networks: home networks Wireless and wired devices to/from headend or central office often combined in single box cable or DSL modem WiFi wireless access router, firewall, NAT point (54, 450 Mbps) wired Ethernet (1 Gbps) 9/17/2024 Computer Networks 12 Introduction ❖ Wireless access networks Connects end system to router via access point (Base station, Wifi access point) Wireless local area networks Wide-area cellular access networks (WLANs) ▪ Provided by mobile operators, (10’s km) ▪ Within building (100 ft) ▪ Bit rate 10’s Mbps ▪ 802.11b/g/n (WiFi): transmission ▪ 4G (LTE) and 5G rate 11, 54, 450 Mbps Internet to Internet to Internet 9/17/2024 Computer Networks 13 Introduction ❖ Enterprise networks ▪ Is used by companies, universities, etc. ▪ Mix of wired, wireless link technologies, connecting a mix of switches and routers. ▪ Ethernet: wired access bit rate at 100Mbps, 1Gbps, 10Gbps, …. ▪ WiFi: wireless access points bit rate at 11, 54, 450 Mbps Enterprise link to ISP (Internet) institutional router Ethernet institutional mail, switch web servers 9/17/2024 Computer Networks 14 Introduction ❖ Access networks: data center networks mobile network ▪ High-bandwidth links (10s to 100s national or global ISP Gbps) connect hundreds to thousands of servers together, and to the Internet local or regional ISP home network content provider network datacenter network Courtesy: Massachusetts Green High Performance Computing enterprise Center (mghpcc.org) network 9/17/2024 Computer Networks 15 Introduction ❖ Host: Sends packets of information (Data, Voice, Video) Host transmission function: ▪ Host will take application message. ▪ It breaks into smaller chunks, known as packets, of length L bits and transmits at transmission rate R two packets, Link’s transmission rate, or link’s capacity, is the link bandwidth L bits each Bandwidth (capacity): It is the number of bits sent or received per unit of time (bits/sec or bps) over the link (physical media) 2 1 Access speed well known as the transmission rate R Latency (delay): Elements cause Delay “Length” of the link. host Propagation time for data (L-bit packet) to travel along the link R: link transmission rate in seconds = L (bits)/ R(bps) Packet transmission delay = time needed to transmit L-bit packet into link = L (bits) R (bits/sec) 9/17/2024 Computer Networks 16 Links: Physical Media ▪ bit: Propagates between transmitter/receiver pairs ▪ Physical link: The media lies between transmitter & receiver ▪ Media Types 1. Guided 2. Unguided 1- Guide Media ▪ Copper: unshielded twisted pair (UTP) two insulated copper wires; ▪ Category 5 ▪ Bandwidth:100 Mbps, 1 Gbps Ethernet ▪ Category 6, and 7, 10Gbps ▪ Coaxial cable: two concentric copper conductors' bidirectional transmission. ▪ Broadband: multiple channels on cable 9/17/2024 Computer Networks 17 Links: Physical Media 1- Guide Media ❖ Fiber glass: ▪ Glass fiber carrying light pulses, each pulse is a bit. ▪ High-speed point-to-point operation transmission (e.g., 10's-100's Gbps transmission rate) ▪ Not susceptible to electromagnetic noise 9/17/2024 Computer Networks 18 Links: Physical Media 2- Unguided ❖ Wireless radio: ▪ Signals propagate free in media are carried in electromagnetic spectrum ▪ Bidirectional, Multicast, or broadcast ▪ Propagation environment effects: Reflection Obstruction by objects Interference/noise 9/17/2024 Computer Networks 19 Links: Physical Media 2- Unguided Radio link types: ▪ Wireless LAN (WiFi) 10-100’s… Mbps; 10’s of meters ▪ Wide-area (e.g., 4G (LTE) cellular) 10’s Mbps over ~10 Km ▪ Bluetooth: cable replacement Short distances, limited rates ▪ Terrestrial microwave Point-to-point; 45 Mbps channels ▪ Satellite Up to 45 Mbps per channel 270 msec end-to-end delay Geosynchronous versus low altitude-- 9/17/2024 Computer Networks 20 The Network Core ❖ The Network Core ❖Nodes share link resources in a switched mobile network network: national or global ISP 1) Packet switching in the Internet 2) Circuit switching in the telephone network ❖Mesh of interconnected routers local or 1) Packet-switching: hosts break application- regional ISP layer messages into packets ❖Network forwards packets from one router home network to the next, across links on path from source to destination ❖Each packet is transmitted at the full link capacity enterprise network 9/17/2024 Computer Networks 21 Packet switching ❖ Packet-switching: Major functions: routing routing algorithm algorithm 1- Routing: local localforwarding forwardingtable table Determine source-destination paths header value output link 0100 3 0101 2 taken by packets Routing algorithms 0111 1001 2 1 2-Forwarding (Switching): 1 Moves arrived packets from router’s input 3 2 link to the appropriate router’s output link destination address in arriving packet’s header 9/17/2024 Computer Networks 22 Packet switching ❖ Packet-switching: Major functions: ❖ Store-and-forward: L bits per packet 3 2 1 source destination R bps R bps Packet transmission delay: takes L/R seconds to One-hop numerical example: transmit (push out) L-bit packet into link at R bps ▪ L = 10 Kbits Store and forward: entire packet must arrive at ▪ R = 100 Mbps router before it can be transmitted on next link ▪ one-hop transmission delay = 0.1 msec 9/17/2024 Computer Networks 23 Packet switching ❖ Packet-switching: Major functions: ❖ Packet-switching: Queueing R = 100 Mb/s A C D B R = 1.5 Mb/s E queue of packets waiting for transmission over output link Queueing occurs when packet arrives faster than it can be processed 9/17/2024 Computer Networks 24 Packet switching ❖ Packet-switching: Major functions: ❖ Packet-switching: Queueing R = 100 Mb/s A C D B R = 1.5 Mb/s E queue of packets waiting for transmission over output link Packet queuing and loss: If arrival rate (in bps) to the link exceeds transmission rate (bps) of link for some period of time: Packets will be queued, waiting to be transmitted on output link Packets can be dropped (lost) if memory (buffer) in router fills up 9/17/2024 Computer Networks 25 Circuit Switching ❖ Alternative to packet switching: Circuit Switching End-to-End resources are allocated to, reserved for “call” between source and destination 2nd circuit Each link has four circuits. Call gets 2nd circuit in top link and 1st circuit in right link. Dedicated resources: no sharing 1st circuit Circuit-like (guaranteed) performance Circuit segment idle if not used by call (no sharing) Used in traditional telephone networks Public Telephone Networks (PSTN). 9/17/2024 Computer Networks 26 Circuit Switching ❖ Circuit switching Types: 4 users 1- FDM (Frequency Division frequency Multiplexing) ▪ Each circuit is allocated certain frequency(s). time 2-Time Division Multiplexing (TDM) frequency ▪ Each circuit is allocated certain time slot(s). time 9/17/2024 Computer Networks 27 Packet switching versus circuit switching Packet switching Circuit switching Data is transmitted as chunks of packets. Data transmitted in time slots Guaranteed performance Packet contains “header” and “payload” Fast transfer of information after circuit is The packets are forwarded based on information in their established headers Wastes bandwidth if traffic is bursty Each packet travels independently Connection setup adds delay No link resources are reserved in advance Recovery from failure is slow Allows more users to use the network Designed for specific applications in the telephone The network can face congestion which causes packet network (e.g. ISDN: Integrated Service Digital delay and loss Network) Protocols are needed for reliable data transfer, congestion control 9/17/2024 Computer Networks 28 Packet switching versus circuit switching Packet switching example: Circuit switching example: users Users 200 Mbps 200 Mbps Number of packet switched users Nps =19 Per active user 20 Mbps Active 10% of time Active user 20 Mbps Probability specific user transmitting p=0.10 Active 10% of time Probability one specific user not transmitting 1-p Maximum number of users can use the link Probability when all other Nps-1 users are not 200 Mbps/20Mbps = 10 Circuit-switched users transmitting (1-p) (Nps-1) 9/17/2024 Computer Networks 29 Packet and Circuit switching Examples The probability that one specific user is busy, and the remaining users are not transmitting is (1-p) (N-1) The probability that exactly one (anyone) of the Nps users is busy Nps * p1(1-p) (N-1) The probability for 10 users out of 19 users transmitting and the other 9 users are not transmitting p10 (1-p)9 Probability of any 10 of 19 users are busy 19 10 𝟏𝟗! p (1-p)9 Ξ 𝟏𝟗! 𝟏𝟗−𝟏𝟎 ! p10 (1-p)9 10 19 is Binomial Coefficient 10 Probability more than 10 of 19 users are transmitting is: 19 σ19 𝒊=𝟏𝟏 𝑖 pi (1-p)19-i 9/17/2024 Computer Networks 30 Part 2 9/17/2024 Computer Networks 31 Protocols and Service Models Overview: Internet Structure Protocol Layers Service Models Security 9/17/2024 Computer Networks 32 Protocols and Service Models ❖ Internet structure: a “network of networks” mobile network ❑ Hosts connect to Internet via national or global ISP access Internet Service Providers (ISPs) ❑ Access ISPs are interconnected local or regional ISP Any two hosts (anywhere!) can send packets to home network content provider each other network datacenter network Resulting network of networks is very complex enterprise Evolution driven by economics, national network policies 9/17/2024 Computer Networks 33 Protocols and Service Models Internet structure: a “network of networks”: ❖ Internet Architecture: POP POP CMTS CMTS CMTS WiFi DSL WiFi DSL WiFi DSL Atlanta New York POP San Francisco ISP-2 Router ISP-3 Router ISP-1 Router Data IXP Tier 1 ISP Center IXP Router IXP Router Router Backbone 9/17/2024 Computer Networks 34 Protocols and Service Models Internet structure: a “network of networks” ❖ Internet Architecture: ❑ Backbone: Provides connectivity between different segments of the Internet The packets destined for a destination on the same ISP will be forwarded over the backbone. ❑ Tier 1 ISPs: They are building the backbone of the network; all users need to connect to them. The tier 1 doesn’t charge for transit traffic. ❑ IXP (Internet eXchange Point): Connects ISP to backbone. ❑ POP (Point Of Presence): The service is provided at this point to subscribers using DSL, CMTS, WiFi, or Cell phone. ❑ Data Center: Contains single servers and server farms. ❑ Virtualization: Provides a concept to access the server farm with out being physically present in data center. 9/17/2024 Computer Networks 35 Protocols and Service Models ❖ Internet structure: a “network of networks” … and content provider networks (e.g., Google, Microsoft, Akamai) may run their own network, to bring services, content close to end users access access net net access net access access net net access IXP access net net ISP A Content provider network access net IXP ISP B access net access ISP C net access net access net regional ISP access net access access net access net net 9/17/2024 Computer Networks 36 Protocols and Service Models ❖ Internet structure: a “network of networks” Tier 1 ISP Tier 1 ISP Google IXP IXP IXP IXP Regional ISP Regional ISP access access access access access access access access ISP ISP ISP ISP ISP ISP ISP ISP At “center”: small number of well-connected large networks 1) “tier-1” commercial ISPs (e.g., Level 3, Sprint, AT&T, NTT), national & international coverage 2) content provider networks (e.g., Google, Facebook): private network that connects its data centers to Internet, often bypassing 9/17/2024 tier-1, regional ISPs Computer Networks 37 Packet delay and loss Packets are queued in router buffers, waiting for turn for transmission ▪ The queue length grows when arrival rate to link (temporarily) exceeds output link capacity for transmission. ▪ Packet loss occurs when the memory to hold queued packets fills up packet being transmitted (transmission delay) A B packets in buffers (queueing delay) free (available) buffers: arriving packets dropped (loss) if no free buffers 9/17/2024 Computer Networks 38 Packet delay and loss ❖ Four sources of Packet Delay: transmission A propagation B nodal processing queueing dnodal = dproc + dqueue + dtrans + dprop dproc: nodal processing dqueue: queueing delay ▪ check bit errors ▪ time waiting at output link for ▪ determine output link transmission ▪ Delay is in microseconds ▪ depends on congestion level of router 9/17/2024 Computer Networks 39 Packet delay and loss transmission A propagation B nodal processing queueing dnodal = dproc + dqueue + dtrans + dprop dtrans: transmission delay: dprop: propagation delay: ▪ L: packet length (bits) ▪ d: length of physical link ▪ R: link transmission rate (bps) ▪ s: propagation speed (~2x108 m/sec) ▪ dtrans = L/R ▪ dprop = d/s dtrans and dprop 9/17/2024 very differentComputer Networks 40 Packet delay and loss ❖ Packet queueing delay ▪ a: average packet arrival rate average queueing delay ▪ L: packet length (bits) ▪ R: link bandwidth (bit transmission rate) L.a arrival rate of bits “traffic : R service rate of bits intensity” traffic intensity = La/R 1 ▪ La/R ~ 0: avg. queueing delay small ▪ La/R -> 1: avg. queueing delay large ▪ La/R > 1: more “work” arriving is more than can be serviced - average delay infinite! 9/17/2024 Computer Networks 41 Packet delay and loss ❖ Internet delays and routes ▪ what do “real” Internet delay & loss look like? ▪ Using software tools, example “Traceroute” ▪ Traceroute: It provides delay measurement from source to router along end-to-end Internet path towards destination. For all routers in the path to router i : sends three packets that will reach router i on path towards destination (with time-to-live field value of i) router i will return packets to sender sender measures time interval between transmission and reply 3 probes 3 probes 3 probes 9/17/2024 Computer Networks 42 Packet delay and loss ❖ Packet loss: ▪ Queue (buffer) preceding link in buffer has finite capacity ▪ Packet arriving to full queue will be dropped ▪ Lost packet may be retransmitted by previous node, by source end system, or not at all buffer (waiting area) packet being transmitted A B packet arriving to full buffer is lost 9/17/2024 Computer Networks 43 Packet delay and loss ❖ Throughput: ▪ Throughput: rate (bits/time unit) at which bits are being sent from sender to receiver Instantaneous: rate at a given point in time Average: rate over longer period of time link pipecapacity that can carry linkthat pipe capacity can carry Rsfluid bits/sec at rate R c bits/sec fluid at rate serverserver, sends with bits (fluid) into pipe (Rs bps) (Rc bps) file of F bits to send to client 9/17/2024 Computer Networks 44 Packet delay and loss ❖ Throughput: Rs < Rc What is average end-end throughput? Rs bits/sec Rc bits/sec Rs > Rc What is average end-end throughput? Rs bits/sec Rc bits/sec bottleneck link link on end-to-end path that constrains end-to-end throughput 9/17/2024 Computer Networks 45 Packet delay and loss ❖ Throughput: network scenario: ▪ Per-connection end-end Rs throughput: Rs Rs min(Rc,Rs,R/10) ▪ In practice: Rc or Rs is R often bottleneck Rc Rc Rc * Check out the online interactive exercises for more examples: http://gaia.cs.umass.edu/kurose_ross/ 10 connections (fairly) share backbone bottleneck link R bits/sec 9/17/2024 Computer Networks 46 Network security ❖Packet interception (Sniffing): ▪ Could be because of broadcast media (shared Ethernet, wireless) ▪ Could use promiscuous network interface reads/records all packets (e.g., including passwords!) passing by A C src:B dest:A payload IP spoofing: B Injection of packet with false source address. A C src:B dest:A payload B 9/17/2024 Computer Networks 47 Network security ❖Denial of Service (DoS): Attackers make resources unavailable such as server, bandwidth to legitimate traffic by overwhelming resource with bogus traffic. Operation: 1. Select target 2. Break into hosts around the network 3. Send packets to target from compromised hosts target 9/17/2024 Computer Networks 48 Network security ❖Defense Methods: Authentication: Proving you are who you say you are. ▪ Cellular networks provide hardware identity via SIM card; no such hardware assist in traditional Internet. Confidentiality: Encryption Integrity checks: Digital signatures to prevent and detect tampering Access restrictions: Using password-protected VPNs Firewalls: Specialized “Nodes” in access and core of networks: ▪ Off-by-default: filter incoming packets to restrict senders, receivers, applications ▪ Detecting and providing DOS (Denial of Service) attacks 9/17/2024 Computer Networks 49 Part 3 9/17/2024 Computer Networks 50 Protocol layers and service models ❖Layering Approach to provide design of complex systems: ▪ Explicit structure provides identification, relationship between system’s pieces. ▪ Modularization eases maintenance, updating of system. 9/17/2024 Computer Networks 51 Protocol layers and service models Reference Models ❖There are two reference models: 1. The TCP/IP protocol is used but the model is not used. 2. The ISO OSI protocols are not used the model has still validity and layers are relevant. 9/17/2024 Computer Networks 52 Protocol layers and service models 1. The TCP/IP protocol Layered Internet protocol stack ▪ Application: Supporting network applications HTTP, IMAP, SMTP, DNS ▪ Transport: Process-to-Process data transfer Application Layer Transport Layer TCP, UDP Network Layer ▪ Network: Routing of datagrams from source to destination Link Layer IP, routing protocols Physical Layer ▪ Link: data transfer between neighboring network elements Ethernet, 802.11 (WiFi), PPP ▪ Physical: bits “on the wire or on the air” 9/17/2024 Computer Networks 53 Protocol layers and service models 1. The TCP/IP protocol Layered Internet protocol stack Services, Layering and Encapsulation: M application Application exchanges messages to implement some application application service using services of transport layer Ht M transport Transport-layer protocol transfers M (e.g., reliably) from transport one process to another, using services of network layer network ▪ transport-layer protocol encapsulates network application-layer message, M, with link transport layer-layer header Ht to create a link transport-layer segment Ht used by transport layer protocol to physical implement its service physical source 9/17/2024 Computer Networks destination 54 Protocol layers and service models 1. The TCP/IP protocol Layered Internet protocol stack Services, Layering and Encapsulation: M application application Ht M transport Transport-layer protocol transfers M (e.g., reliably) from transport one process to another, using services of network layer network Hn Ht M network Network-layer protocol transfers transport-layer segment [Ht | M] from one host to another, using link layer services link Hl Hn Ht M link Link-layer protocol transfers datagram [Hn| [Ht |M] from host to neighboring host, using network-layer services physical link-layer protocol encapsulates network datagram [Hn| [Ht physical |M], with the link-layer header Hl to create a link-layer frame source destination 9/17/2024 Computer Networks 55 Protocol layers and service models 1. The TCP/IP protocol Layered Internet protocol stack Services, Layering and Encapsulation: M application M application message Ht M transport Ht M transport segment network Hn Ht M Hn Ht M network datagram link Hl Hn Ht M Hl Hn Ht M link frame physical physical source destination 9/17/2024 Computer Networks 56 Protocol layers and service models 1. The TCP/IP protocol Layered Internet protocol stack Encapsulation: source message M application segment Ht M transport datagram Hn Ht M network link frame Hl Hn Ht M link physical physical switch destination Hn Ht M network M application Hl Hn Ht M link Hn Ht M Ht M transport physical Hn Ht M network Hl Hn Ht M link router 9/17/2024 physical Computer Networks 57 Protocol layers andto service Introduction Networks models 2. ISO (International Standard Organization) OSI (Open System Interconnection) Reference Model Application Layer Application Layer Presentation Layer Presentation Layer Session Layer Session Layer Transport Layer Transport Layer Network Layer Network Layer Network Layer Network Layer Data Link Layer Data Link Layer Data Link Layer Data Link Layer Physical Layer Physical Layer Physical Layer Physical Layer User A User B 9/17/2024 Computer Networks 58 Introduction to Networks 2. ISO (International Standard Organization) OSI (Open System Interconnection) Reference Model ❖ Each layer has specific function ❖ The function for each layer should be isolated from the function of other layer. ❖ It has defined the function and protocol for each layer, the protocols are no more used, but reference model is used. Application Layer Layer 1, Physical Layer: Presentation Layer ❖ Handles electrical, mechanical (number of pins in connectors), Session Layer Transport Layer ❖ Bit timing (correct 0, 1 bit streams) Network Layer ❖ Medium dependency (Metal, Radio Frequency, or Fiber Glass). Data Link Layer Physical Layer 9/17/2024 Computer Networks 59 Introduction to Networks 2. ISO (International Standard Organization) OSI (Open System Interconnection) Reference Model Layer 2, Data Link Layer: ❑ Encapsulates the bits into Frames. Application Layer ❑ Transports bits to the network in frames, the errors in frames Presentation Layer are not visible to the network layer. Session Layer ❑ It can provide backpressure control that the slow processing devices are not flooded with Transport Layer too many frames. Network Layer Data Link Layer Layer 3, Network Layer: Physical Layer ❑ Routes the packets from source to destination, provides paths using static or dynamic tables. ❑ Will isolate the failed nodes by dynamically updating the routing paths. ❑ Controls congestions and load adaptation to meet QoS (Quality of Service). ❑ May provide packet fragmentation for large packets and address translations if the packet travels to other networks. 9/17/2024 Computer Networks 60 Protocol layers and service models 2. ISO International Standard Organization OSI (Open System Interconnection) Reference Model Layer 4, Transport Layer: Is End-to-End layer, between source address and destination address. Will fragment the information (Video, Voice, or Data) from higher layers. Application Layer Provides confirmation of arrived fragments at destination using ACK. Presentation Layer As well transmits packet with no delivery confirmation. Session Layer Broadcast mode is used to transmit to multiple destinations the packets. Transport Layer Layer 5, Session Layer: Network Layer Data Link Layer Provides session between two end devices. Physical Layer Controls protocol for request and response. Session synchronization and resuming the idle session after inactivity time. 9/17/2024 Computer Networks 61 Protocol layers and service models 2. ISO International Standard Organization OSI (Open System Interconnection) Reference Model Layer 6, Presentation Layer: Will handle representation of syntax and format. Application Layer For communication between devices for language Presentation Layer Session Layer presentation and translation. Transport Layer Layer 7, Application Layer: Network Layer Data Link Layer Users use this layer for communications, Physical Layer HTTP (Hyper Text Transfer Protocol) is used for search and browsing. 9/17/2024 Computer Networks 62 Protocol layers and service models 2.ISO (International Standard Organization) OSI (Open System Interconnection) Reference Model Two layers not found in the Internet protocol stack (TCP/IP) ▪ presentation: allow applications to interpret meaning of Application Layer data, e.g., encryption, compression, machine-specific Presentation Layer conventions Session Layer ▪ session: synchronization, checkpointing, recovery of data Transport Layer exchange Network Layer ▪ Internet stack “missing” these layers! Data Link Layer these services, if needed, must be implemented in Physical Layer application The seven layers OSI/ISO reference model 9/17/2024 Computer Networks 63 Internet history ❖ 1961-1972: Early packet-switching principles ▪ 1961: Kleinrock - queueing ▪ 1972: theory shows effectiveness of ARPAnet public demo packet-switching NCP (Network Control Protocol) ▪ 1964: Baran - packet-switching first host-host protocol in military nets first e-mail program ▪ 1967: ARPAnet conceived by ARPAnet has 15 nodes Advanced Research Projects Agency ▪ 1969: first ARPAnet node operational 9/17/2024 Computer Networks 64 Internet history ❖ 1972-1980: Internetworking, new and proprietary networks 1970: ALOHAnet satellite Vinton Cerf and Bob Kahn’s network in Hawaii internetworking principles: 1974: Vinton Cerf and Bob Kahn ▪ minimalism, autonomy - no - architecture for interconnecting internal changes required to networks interconnect networks ▪ best-effort service model 1976: Ethernet at Xerox PARC ▪ stateless routing late70’s: proprietary architectures: ▪ decentralized control DECnet, SNA, XNA define today’s Internet architecture 1979: ARPAnet has 200 nodes 9/17/2024 Computer Networks 65 Internet history ❖ 1980-1990: new protocols, a proliferation of networks 1983: deployment of TCP/IP ▪ New national networks: CSnet, 1982: smtp e-mail protocol BITnet, NSFnet, Minitel defined ▪ 100,000 hosts connected to 1983: DNS defined for name- confederation of networks to-IP-address translation 1985: ftp protocol defined 1988: TCP congestion control 9/17/2024 Computer Networks 66 Internet history ❖ 1990, 2000s: Commercialization, the Web, new applications Early 1990s: ARPAnet Late 1990s – 2000s: decommissioned ▪ Instant messaging, P2P file sharing 1991: NSF lifts restrictions on ▪ network security to forefront commercial use of NSFnet (decommissioned, 1995) ▪ est. 50 million host, 100 million+ users Early 1990s: Web ▪ hypertext [Bush 1945, Nelson 1960’s] ▪ backbone links running at Gbps ▪ HTML, HTTP: Berners-Lee ▪ 1994: Mosaic, later Netscape ▪ late 1990s: commercialization of the Web 9/17/2024 Computer Networks 67 Internet history ❖ 2005-present: Aggressive deployment of broadband home access (above 5 Billion users) Social networks, wireless networks service providers (Google, FB (Meta), Microsoft) create their own networks Bypass commercial Internet to connect “close” to end user, providing “instantaneous” access to the social media, search, video content, … Enterprises, e-commerce run their services in “cloud” (e.g., Amazon Web Services, Microsoft Azure) About 18 Billion devices attached to Internet (2017) 9/17/2024 Computer Networks 68 Part 4 9/17/2024 Computer Networks 69 Application layer: overview ❑ Concept of application-layer protocols ❑ Transport layer service models ❑ Client-server paradigm ❑ Peer-to-Peer paradigm ❑ Popular application-layer protocols ❑ Video streaming systems, CDNs ❑ HTTP (Hyper Text Transfer Protocol) ❑ Programming network applications 9/17/2024 Computer Networks 70 Creating network app ❖ Provide programs that: application transport ▪ They run on (different) end systems mobile network network data link physical national or global ISP ▪ communicate over network ▪ Examples: Web server software communicates with browser software No need to write software for local or network-core devices regional ISP ▪ Network-core devices do not run user’s home network application content provider applications. transport network network datacenter application network ▪ But instead operate at the lower layers— data link transport physical network data link specifically at the network layer and below. physical ▪ applications on end systems allow for rapid enterprise network app development and deployment. 9/17/2024 Computer Networks 71 Examples of network apps ❖ Social networking ❖ Web Browser ❖ Text messaging ❖ E-mail ❖ Multi-user network games ❖ Streaming video (YouTube, Hulu, Netflix) ❖ P2P file sharing ❖ Voice over IP (e.g., Skype) ❖ Real-time video conferencing (e.g., Zoom) ❖ Internet search ❖ Remote login 9/17/2024 Computer Networks 72 Client-server Concept Concept: Client requests for information the server provides the requested information. mobile network ❑Server: national or global ISP ▪ Host provides requested services, always-on ▪ Permanent and well-known IP address ▪ Often placed in data centers, for scaling using multiple hosts (virtual server) local or regional ISP ❑Clients: ▪ Contact, communicate with server home network content provider ▪ May be intermittently connected network datacenter network ▪ May have dynamic IP addresses ▪ Do not communicate directly with each other ▪ Examples: Web-Browser, Email, IMAP (Internet Messageenterprise network Access Protocol), FTP (File Transfer Protocol) 9/17/2024 Computer Networks 73 Peer-Peer Concept ❖Peers communicate directly with each other: The peers are not owned by a service provider, mobile network national or global ISP they are desktops and laptops controlled by users. Not always-on server Peers request service from other peers, they local or provide service in return to other peers regional ISP Self scalability : New peers bring new service home network content capacity, as well as new service demands provider network datacenter Peers are intermittently connected, and they network change their IP addresses Examples: P2P file sharing (Music) enterprise network 9/17/2024 Computer Networks 74 Inter Processes communication Process: Process is a program running within the same host. Processes communicate using IPC (Inter Process Communication) defined by OS (Pipes, Shared Memory, Message Queues). Processes in different hosts communicate by exchanging messages (Client-Server, P2P). Socket: Process sends and receives messages via socket (IP + Port Number) Sending process sends the message outdoor and relies on transport infrastructure to deliver message to the socket at receiving process. 9/17/2024 Computer Networks 75 Inter Processes communication Clients, Servers IPC (Inter Process Communication) Process: Client process: Process that initiates communication. Server process: Process that waits to be contacted. Note: Applications with P2P (Peer-to-Peer) architectures have both client processes and server processes. 9/17/2024 Computer Networks 76 Inter Processes communication ❖The process sends and receives messages, using socket. The sending process sends out the message. The sending process relies on transport infrastructure to deliver its message to the socket at the receiving side’s process. The two sockets are located one on each side, one on transmit and one on the receiver side. application application socket controlled by process process app developer transport transport network network controlled link by OS link Internet physical physical 9/17/2024 Computer Networks 77 Inter Processes communication ❖Addressing processes: Identifier: ▪ Includes both IP address and port numbers associated with process on the host. ▪ The host device to receive messages needs unique IPv4 (32-bits) address or IPv6 (128-bits) and a port number. ▪ Example of port numbers: HTTP server: ✓ IPv4 address: 128.119.245.12 ✓ port number: 80 ✓ Transport Protocol: TCP 9/17/2024 Computer Networks 78 Transport service requirements ❑ Data integrity Provides data integrity to the applications needed such as file transfer, web transactions which require 100% reliable data transfer Some apps can tolerate some losses such as audio. ❑ Timing Some apps such as Internet telephony, video, and interactive games require low delay to be effective. ❑ Throughput Some apps such as multimedia require minimum amount of throughput to be effective. Other apps (elastic apps) make use of whatever throughput the network provides. ❑ Security Encryption and data integrity of data. 9/17/2024 Computer Networks 79 Transport protocols ❑Transmission Control Protocol (TCP) ❖ Connection-oriented: A path setup required between sending and receiving processes. ❖ Provides reliable transport: Reliable transmission between sending and receiving processes. ❖ Flow control: Sender won’t overflood the receiver ❖ Congestion control: It will adjust the traffic when network is overloaded ❖ Does not provide: Timing, minimum throughput guarantee, and security ❑User Datagram Protocol (UDP) ❖ Connectionless-oriented: No connection setup is required between two end points ❖ Unreliable data transfer: No reliable transmission between sending and receiving process ❖ Does not provide: Reliability, flow control, congestion control, and timing 9/17/2024 Computer Networks 80 Applications and their Transport protocols Application Application Underlying layer protocol transport protocol Internet telephony SIP, RTP, proprietary TCP, UDP (e.g., Skype) Email SMTP [RFC 2821] TCP Remote terminal access Telnet [RFC 854] TCP Web HTTP [RFC 2616] TCP File transfer FTP [RFC 959] TCP HTTP (e.g., YouTube), TCP, UDP Streaming multimedia RTP [RFC 1889] 9/17/2024 Computer Networks 81 Securing TCP ❑ TCP and UDP connections: No encryption Cleartext passwords sent into socket traverse Internet in cleartext. ❑TLS (Transport Layer Security) and SSL (secure socket layer) Both TLS and SSL provide encrypted TCP connections Data integrity End-Point authentication Cleartext sent into socket will traverse Internet encrypted 9/17/2024 Computer Networks 82 Application-layer protocol ❑An application-layer protocol defines: ❖Type of messages exchanged: Requests and Responses ❖Message syntax: Positions of fields in the messages and how fields are delineated ❖Message semantics: The meaning of information in the fields ❖Rules: When and how the processes send and respond to the messages ❖NOTE: Open protocols: Defined in the RFCs, public has access to protocol definition and allows for interoperability (examples:HTTP, SMTP) 9/17/2024 Computer Networks 83 The Web ❑World Wide Web (WWW): ❖A platform for deploying applications and sharing information, portably and securely. ❖Distributed database of pages linked together through HTTP (Hypertext Transport Protocol) ❖History of HTTP (Hyper Text Transfer Protocol) First HTTP implementation - 1990 at CERN (European Organization for Nuclear Research) HTTP/0.9 – 1991 with simple messages GET command for the Web HTTP/1.0 – 1992 with Client/Server information, simple caching HTTP/1.1 – 1996, 2014 revision as in RFCs 7230, 7231, 7232, 7233, 7234, 7235 HTTP/2.0 - 2015 HTTPS (HTTP with encryption) 9/17/2024 Computer Networks 84 The Web ❑World Wide Web (WWW): ❖Web components Infrastructure: Based on Clients and Servers concept. Content: URL: naming content HTML: formatting content of web page Protocol for exchanging information: HTTP, HTTPS (Secure) ▪ The web page consists of objects, each can be HTML file, JPEG image, Java applet, audio file,… ▪ The web page consists of base HTML-file which includes several referenced objects, each addressable by a URL, e.g., www.someschool.edu/someDept/pic.gif host name path name 9/17/2024 Computer Networks 85 HTTP overview ❑Client/Server Model: ❖ Client: Browser uses requests, receives, (using HTTP protocol) and “displays” Web objects. ❖ Server: Web server sends (using HTTP protocol) objects in response to requests. PC running ❑ HTTP uses TCP: Firefox browser ❖ Client initiates TCP connection (creates socket) to server on port 80 ❖ Server accepts TCP connection from client server running Apache Web ❖ HTTP messages (application-layer protocol server messages) exchanged between browser (HTTP client) and Web server (HTTP server) iPhone running ❖ TCP connection closed Safari browser 9/17/2024 Computer Networks 86 HTTP Connections and State ❑HTTP protocol is “stateless” ❖ Server maintains no information about past client’s requests ❖ Each request-response is treated independently ❖ Protocols which maintain “state” are complex! ❖ Past history (state) must be maintained ❖ If server/client crashes, their views of “state” may be inconsistent, must be reconciled. 9/17/2024 Computer Networks 87 HTTP connection types 1) Non-persistent HTTP ❖TCP connection opened to a server ❖At most, one object sent over TCP connection ❖TCP connection closed Downloading multiple objects required multiple connections 2) Persistent HTTP ▪ TCP connection opened to a server ▪ Multiple objects can be sent over one single TCP connection between client, and server ▪ TCP connection closed 9/17/2024 Computer Networks 88 Non-persistent HTTP User enters URL: www.jfk.edu/someDepartment/home.index (ex: containing text, references to 10 jpeg images) Client Server 1a. HTTP client initiates TCP connection to HTTP server 1b. HTTP server at host www.jfk.edu (process) at www.jfk.edu on port 80 waiting for TCP connection at port 80 “accepts” connection, notifying client 2. HTTP client sends HTTP request message (containing URL) into TCP connection 3. HTTP server receives request message, socket. Message indicates that forms response message containing time client wants object requested object, and sends message someDepartment/home.index into its socket 9/17/2024 Computer Networks 89 Non-persistent HTTP (Continue) User enters URL: www.jfk.edu/someDepartment/home.index (Ex: containing text, references to 10 jpeg images) Client Server 4. HTTP server closes TCP 5. HTTP client receives response connection. message containing html file, displays html. Parsing html file, finds 10 referenced jpeg objects 6. Steps 1-5 repeated for each of 10 jpeg objects time 9/17/2024 Computer Networks 90 Non-persistent HTTP: response time RTT (Round Trip Time): Time for a small packet to travel from client to server and back initiate TCP HTTP response time (per object): connection ▪ one RTT to initiate TCP connection RTT ▪ one RTT for HTTP request and first few request file bytes of HTTP response to return RTT time to ▪ object/file transmission time transmit file file received Non-persistent HTTP response time = 2RTT+ file transmission time time time 9/17/2024 Computer Networks 91 Persistent and non-persistence HTTP (HTTP 1.1) Non-persistent HTTP issues: ▪ Requires 2 RTTs per object ▪ OS overhead for each TCP connection ▪ Browsers often open multiple parallel TCP connections to fetch referenced objects in parallel Persistent HTTP (HTTP1.1): ▪ Server leaves connection open after sending response ▪ The subsequent HTTP messages between same client/server sent over open connection ▪ The client sends requests as soon as it encounters a referenced object ▪ As little as one RTT for all the referenced objects. 9/17/2024 Computer Networks 92 HTTP message types ❑ Two types of HTTP messages: request, response HTTP request message: ▪ Are in ASCII (human-readable format) carriage return character line-feed character request line (GET, POST, GET /index.html HTTP/1.1\r\n HEAD commands) Host: www-net.cs.umass.edu\r\n User-Agent: Mozilla/5.0 (Macintosh; Intel Mac OS X 10.15; rv:80.0) Gecko/20100101 Firefox/80.0 \r\n header Accept: text/html,application/xhtml+xml\r\n lines Accept-Language: en-us,en;q=0.5\r\n Accept-Encoding: gzip,deflate\r\n Connection: keep-alive\r\n \r\n carriage return, line feed at start of line indicates end of header lines 9/17/2024 * Check out the online interactive exercises for more examples: http://gaia.cs.umass.edu/kurose_ross/interactive/ Computer Networks 93 HTTP request messages (methods) POST method: ▪ User’s input sent from client to server in entity body of HTTP POST request message GET method: (for sending data to server): ▪ Includes user data in URL field of HTTP GET request message (following a ‘?’): HEAD method: ▪ In request’s headers (only) that would be returned if specified URL were requested with an HTTP GET method. PUT method: ▪ To upload new file (object) to server ▪ Completely replaces file that exists at specified URL with content in entity body of POST HTTP request message was sent www.somesite.com/animalsearch?monkeys&banana 9/17/2024 Computer Networks 94 HTTP response message status line (protocol HTTP/1.1 200 OK status code status phrase) Date: Tue, 08 Sep 2020 00:53:20 GMT Server: Apache/2.4.6 (CentOS) OpenSSL/1.0.2k-fips PHP/7.4.9 mod_perl/2.0.11 Perl/v5.16.3 Last-Modified: Tue, 01 Mar 2016 18:57:50 GMT header ETag: "a5b-52d015789ee9e" lines Accept-Ranges: bytes Content-Length: 2651 Content-Type: text/html; charset=UTF-8 \r\n data, e.g., requested data data data data data... HTML file 9/17/2024 Computer Networks 95 HTTP response status codes ❑ Status code Appears in the 1st line in server-to-client response message. ❖ Examples of status codes: 200 OK Request succeeded, requested object later in this message 301 Moved Permanently Requested object moved, new location specified later in this message (in Location: field) 400 Bad Request Request msg not understood by server 404 Not Found Requested document not found on this server 505 HTTP Version Not Supported 9/17/2024 Computer Networks 96 Maintaining client/server state: cookies a stateful protocol: client makes ❖HTTP GET/response interaction is stateless two changes to X, or none at all No notion of multi-step exchanges of HTTP X messages to complete a Web “transaction” ❑No need for client/server to track “state” of multi-step X exchange X’ t’ ❑All HTTP requests are independent of each other X’ ’ ❑No need for client/server to “recover” from a partially- X’’ completed-but-never-completely-completed transaction time time 9/17/2024 Computer Networks 97 Maintaining user/server state: cookies Web sites and client browser use cookies to maintain the state between transactions Four components: 1) Cookie header line of HTTP response message 2) Cookie header line in next HTTP request message 3) Cookie file kept on user’s host, managed by user’s browser 4) back-end database at Web site Example: ▪ Susan uses browser on laptop, visits specific e-commerce site for the first time ▪ When initial HTTP requests arrive at site, site creates: Unique ID (cookie) Entry in backend database for ID Subsequent HTTP requests from user to this site will contain cookie ID value, allowing site to identify Susan 9/17/2024 Computer Networks 98 Maintaining user/server state: cookies client server ebay 8734 usual HTTP request msg Amazon server cookie file creates ID usual HTTP response 1678 for user backend create ebay 8734 set-cookie: 1678 entry database amazon 1678 usual HTTP request msg cookie: 1678 cookie- access specific usual HTTP response msg action one week later: access ebay 8734 usual HTTP request msg amazon 1678 cookie: 1678 cookie- specific usual HTTP response msg action 9/17/2024 time Computer Networkstime 99 HTTP cookies For What cookies are used: ▪ Authorization ▪ Shopping carts ▪ Recommendations ▪ User session state (Web e-mail) How to keep the state? ▪ The protocol endpoints maintain the state at sender/receiver over multiple transactions ▪ In the messages cookies in HTTP messages carry state Cookies and privacy: ▪ Cookies permit sites to learn a lot about you on their site. ▪ Third party persistent cookies (tracking cookies) allow common identity (cookie value) to be tracked across multiple web sites 9/17/2024 Computer Networks 100 Web caches Web caches satisfy client requests without involving origin server. ▪ User configures browser to point to a (local) Web cache ▪ Browser sends all HTTP requests to cache if object is in the cache, then the cache returns the object to the client else cache requests the object from origin server, will cache received object, then returns object to the client. ▪ Caching will reduce response time for Web cache client request, cache is closer to client. client origin server Enables content providers to more effectively deliver content. 9/17/2024 Computer Networks client 101 Conditional Getting Cache client server Don’t send object if cache has up-to- HTTP request msg date cached version If-modified-since: object not Improvement: No object transmission modified delay and use of network resources. HTTP response before HTTP/1.0 ▪ client: specify date of cached copy in 304 Not Modified HTTP request If-modified-since: ▪ server: response contains no object if HTTP request msg If-modified-since: object cached copy is up-to-date: modified HTTP/1.0 , status code 304 Not Modified HTTP response after HTTP/1.0 200 OK 9/17/2024 Computer Networks 102 HTTP Versions ❑ HTTP1.1: Provided multiple, pipelined GETs over single TCP connection ❖Server responds in-order FCFS (First-Come-First-Served) scheduling to the GET requests ❖By using FCFS, small object may have to wait for transmission HOL (Head-Of-Line) blocking behind large object(s) ❖Loss recovery (retransmitting lost TCP segments) stalls object transmission, causes delay for clients to get the object. ❑ HTTP/2: [RFC 7540, 2015] Increased flexibility at server in sending objects to client: ❖ methods, status codes, most header fields unchanged from HTTP 1.1 ❖ Transmission’s order of requested objects based on client-specified object priority not FCFS. ❖ Divides objects into frames, schedules frames to mitigate HOL (Head-Of-Line) blocking. ❑ HTTP/3: Has security, per object error- and congestion-control (more pipelining) over UDP. 9/17/2024 Computer Networks 103 HTTP/1: HOL (Head-Of-Line) blocking HTTP 1.1: client requests 1 large object (e.g., video file) and 3 smaller objects client server GET O4 GET O3 GET O 2 GET O1 object data requested O1 O2 O1 O3 O2 O3 O4 O4 9/17/2024 objects delivered in order requested: Computer Networks O2, O3, O4 wait behind O1 104 HTTP/2: mitigating HOL blocking HTTP/2: objects divided into frames; frame transmission interleaved client server GET O4 GET O3 GET O 2 GET O1 object data requested O2 O4 O3 O1 O2 O3 O1 O4 9/17/2024 O2, O3, O4 delivered quickly, O1 slightly delayed Computer Networks 105 HTTP/2 to HTTP/3 ❑ HTTP/2 over single TCP connection means: Recovery from packet loss still stalls all object transmissions ▪ Like HTTP 1.1, browsers have incentive to open multiple parallel TCP connections to reduce stalling, increasing overall throughput ▪ No security over pure TCP connection ❑ HTTP/3: ▪ Adds security, per object error- and congestion-control (more pipelining) over UDP. 9/17/2024 Computer Networks 106 Part 5 9/17/2024 Computer Networks 107 Application layer user E-mail: agent Three major components: mail server user agent 1) User agents SMTP mail user 2) Mail servers server agent 3) SMTP (Simple Mail Transfer Protocol) SMTP SMTP user User Agent: mail agent It is a software module which composing, server user editing, and reading mail messages agent Note: user The outgoing, incoming messages are stored agent outgoing on the server message queue user mailbox 9/17/2024 Computer Networks 108 Application layer user agent Email servers: mail user server agent ▪ Mailbox contains incoming messages for user SMTP mail user server agent ▪ Message queue of outgoing (to be SMTP sent) mail messages user mail SMTP agent SMTP protocol: server user Between mail servers to send agent email messages user agent ▪ Client: sending mail to server outgoing message queue ▪ Server: receiving mail sent to server user mailbox 9/17/2024 Computer Networks

Use Quizgecko on...
Browser
Browser