Computer Network Chapter #1 Computer Network: A large number of separate but interconnected computers to share the resources. Goals Resource Sharing a. Physical Resources - Printers, b. Storages like tape backup systems c. Information/Date High reliability Saving money Network Types Personal Area Networks(PAN) Local Area Network(LAN) Metropolitan Area Networks (MAN) Wide Area Networks(WAN) Internet: collection of interconnected networks. Data Communication Type Simplex: Data travel one way, Examples are PA system in school, Radio. Half duplex: Data communication in either direction but not simultaneously, Examples are CB-radio, Walky Talky. Full duplex: They travel to both direction at once, Examples are Telephone, Mobile. Network Topology It is the physical interconnection of the elements (node) of a computer network s LAN is one example of the physical or logical topology. Bus: Each machine is connected to a single bus. Star: Each machine is connected to a central hub with a point-to-point connection. Ring: Each computer is connected to the network in a closed loop. Mesh: That is fully connected to each other. Tree: It is also known as Hierarchical Network, is connected to one or more another node. Summarized by: Faisal Fagihi 1 Date: 2018-01- 04
Protocol: is an agreement between the communicating parties on how communication is to proceed OSI Reference Model Application layer 7 Supplying services to application procedures such as Email or file transfer) that are outside the OSI model Presentation layer 6 It is responsible for data translation and code formatting. Session layer 5 The session layer allows users on different machines to establish sessions between them Transport layer 4 The basic function of the transport layer is to accept data from above Network layer 3 key design issue is determining how packets are routed from source to destination. Router work on network layer Data link layer 2 The main task of the data link layer is to transform a raw transmission facility into a line Switch and bridge work on Data link layer Physical layer 1 is concerned with transmitting raw bits over a communication channel. Hub works on Physical layer. TCP/IP Model Encapsulation: When data moves from upper layer to lower level of TCP/IP protocol stack (outgoing transmission) each layer includes a bundle of relevant information called a header along with the actual data. Decapsulation: The reverse process of encapsulation (or decapsulation) occurs when data is received on the destination computer. Summarized by: Faisal Fagihi 2 Date: 2018-01- 04
Chapter #2 Client-server Server - always-on host - permanent IP address - data centers for scaling Clients - communicate with server - intermittently connected - dynamic IP - do not communicate directly with each other P2P architecture no always-on server arbitrary end systems directly communicate peers request service from other peers. o self-scalability new peers bring new service capacity. peers are intermittently connected and change IP addresses complex management Some sample codes: 200 OK 301 Moved Permanently 400 Bad Request 404 Not Found 505 HTTP Version Not Supported FTP transfer file to/from remote host client/server model ftp: RFC 959 ftp server: port 21 Summarized by: Faisal Fagihi 3 Date: 2018-01- 04
Sample return codes 331 Username OK, password required 125 data connection already open; transfer starting 425 Can t open data connection 452 Error writing files Electronic mail: mail servers mailbox contains incoming messages for user message queue of outgoing (to be sent) mail messages SMTP protocol between mail servers to send email messages o o client: sending mail server server : receiving mail server uses TCP to reliably transfer email message from client to server, port 25 direct transfer: sending server to receiving server three phases of transfer o o o handshaking (greeting) transfer of messages closure Summarized by: Faisal Fagihi 4 Date: 2018-01- 04
Chapter #3 reliable, in-order delivery (TCP) congestion control flow control connection setup unreliable, unordered delivery: UDP no-frills extension of best-effort IP pipelining: sender allows multiple, in-flight, yet-to-be-acknowledged pkts go-back-n selective repeat Go-back-N: sender can have up to N unacked packets in pipeline receiver only sends cumulative ack sender has timer for oldest unacked packet Selective Repeat: sender can have up to N unacked packets in pipeline rcvr sends individual ack for each packet sender maintains timer for each unacked packet Summarized by: Faisal Fagihi 5 Date: 2018-01- 04
Chapter #4 Network layer functions forwarding: move packets from router s input to appropriate router output routing: determine route taken by packets from source to dest. Connection, connection-less service datagram network provides network-layer connectionless service virtual-circuit network provides network-layer connection service Virtual circuits call setup, teardown for each call before data can flow each packet carries VC identifier (not destination host address) every router maintains state for each passing connection used to setup, maintain teardown VC used in ATM not used in today s Internet dumb end systems telephones complexity inside network Datagram networks no call setup at network layer packets forwarded using destination host address no state about end-to-end connections smart end systems (computers) can adapt, perform control, error recovery simple inside network, complexity at edge IP addressing IP address: 32-bit identifier for host, router interface interface: connection between host/router and physical link routers typically have multiple interfaces host typically has one active interface (e.g., wired Ethernet, wireless 802.11) one IP address associated with each interface subnet part - high order bits host part - low order bits Summarized by: Faisal Fagihi 6 Date: 2018-01- 04
ICANN (Internet Corporation for Assigned Names and Numbers) allocates addresses manages DNS assigns domain names, resolves disputes DHCP (Dynamic Host Configuration Protocol) allow host to dynamically obtain its IP address from network server when it joins network can renew its lease on address in use allows reuse of addresses (only hold address while connected/ on ) support for mobile users who want to join network (more shortly) NAT (network address translation) local network uses just one IP address as far as outside world is concerned: range of addresses not needed from ISP: just one IP address for all devices can change addresses of devices in local network without notifying outside world can change ISP without changing addresses of devices in local network devices inside local net not explicitly addressable, visible by outside world (a security plus) ICMP used by hosts & routers to communicate network-level information error reporting: unreachable host, network, port, protocol echo request/reply (used by ping) ICMP message: type, code + first 8 bytes of IP datagram causing error Summarized by: Faisal Fagihi 7 Date: 2018-01- 04
IPv6 32-bit address space soon to be completely allocated. header format helps speed processing/forwarding datagram format: fixed-length 40-byte header (20 byte in IPv4) checksum: removed entirely to reduce processing time at each hop options: allowed, but outside of header, indicated by Next Header field ICMPv6: new version of ICMP additional message types, e.g. Packet Too Big tunneling: IPv6 datagram carried as payload in IPv4 datagram among IPv4 routers. Broadcast routing deliver packets from source to all other nodes flooding: when node receives broadcast packet, sends copy to all neighbors problems: cycles & broadcast storm Spanning Tree Protocol (STP) is a network protocol that builds a logical loopfree topology for Ethernet networks. Summarized by: Faisal Fagihi 8 Date: 2018-01- 04
Chapter #5 links wired links wireless links LANs layer-2 packet: frame, encapsulates datagram Link layer services framing, link access: encapsulate datagram into frame, adding header, trailer MAC addresses used in frame headers to identify source destination. reliable delivery between adjacent nodes flow control. error detection. error correction. half-duplex and full-duplex Error detection Error detection not 100% reliable! Parity checking single bit parity: detect single bit errors two-dimensional bit parity: detect and correct single bit errors Cyclic redundancy check more powerful error-detection coding view data bits, D, as a binary number choose r+1 bit pattern (generator), G goal: choose r CRC bits, R, such that <D,R> exactly divisible by G (modulo 2) receiver knows G, divides <D,R> by G. If non-zero remainder: error detected! can detect all burst errors less than r+1 bits widely used in practice (Ethernet, 802.11 WiFi, ATM) Multiple access links, two types: point-to-point PPP for dial-up access point-to-point link between Ethernet switch, host broadcast (shared wire or medium) old-fashioned Ethernet upstream HFC 802.11 wireless LAN Summarized by: Faisal Fagihi 9 Date: 2018-01- 04
Multiple access protocols distributed algorithm that determines how nodes share channel. Collision: if node receives two or more signals at the same time MAC protocols: taxonomy channel partitioning divide channel into smaller pieces (time slots, frequency, code) allocate piece to node for exclusive use random access channel not divided, allow collisions recover from collisions taking turns nodes take turns polling: master node invites slave nodes to transmit in turn single point of failure (master) TDMA: time division multiple access access to channel in "rounds" each station gets fixed length slot (like one packet in each round) unused slots go idle example: 6-station LAN, 1,3,4 have pkt, slots 2,5,6 idle FDMA: frequency division multiple access channel spectrum divided into frequency bands each station assigned fixed frequency band unused transmission time in frequency bands go idle example: 6-station LAN, 1,3,4 have pkt, frequency bands 2,5,6 idle Random access examples slotted ALOHA all frames same size time divided into equal size slots (time to transmit 1 frame) nodes start to transmit only slot beginning nodes are synchronized if 2 or more nodes transmit in slot, all nodes detect collision Pros: single active node can continuously transmit at full rate of channel highly decentralized: only slots in nodes need to be in sync simple Cons: collisions, wasting slots idle slots clock synchronization Summarized by: Faisal Fagihi 10 Date: 2018-01- 04
ALOHA unslotted Aloha: simpler, no synchronization when frame first arrives collision probability increases: CSMA, CSMA/CD. MAC (or LAN or physical or Ethernet) address: used locally to get frame from one interface to another physically-connected interface. 48-bit MAC address (for most LANs) burned in NIC ROM, also sometimes software settable MAC address allocation administered by IEEE manufacturer buys portion of MAC address space (to assure uniqueness) ARP: address resolution protocol ARP table: each IP node (host, router) on LAN has table IP/MAC address mappings for some LAN nodes: < IP address; MAC address; TTL> TTL (Time To Live): time after which address mapping will be forgotten (typically 20 min) Ethernet first widely used LAN technology simpler, cheap kept up with speed race: 10 Mbps 10 Gbps Ethernet: physical topology bus: popular through mid 90s all nodes in same collision domain (can collide with each other) star: very successful these days active switch in center nodes do not collide with each other. Ethernet frame structure sending adapter encapsulates IP datagram (or other network layer protocol packet) in Ethernet frame Summarized by: Faisal Fagihi 11 Date: 2018-01- 04
Ethernet switch A link-layer device : store, forward Ethernet frames examine incoming frame s MAC address, selectively forward frame to oneor-more outgoing links. transparent hosts are unaware of presence of switches plug-and-play, self-learning switches do not need to be configured switch learns which hosts can be reached through which interfaces when frame received, switch learns location of sender: incoming LAN segment records sender/location pair in switch table Switches vs. routers both are store-and-forward: routers: network-layer devices (examine network-layer headers) switches: link-layer devices (examine link-layer headers) both have forwarding tables: routers: compute tables using routing algorithms, IP addresses switches: learn forwarding table using flooding, learning, MAC addresses Summarized by: Faisal Fagihi 12 Date: 2018-01- 04
Chapter #6 Data Link Layer Design Issues The function of the data link layer is to provide services to the network layer. Framing Error Control Flow Control Elementary Data Link Layer Protocols An Unrestricted Simplex Protocol A Simplex Wait and Watch Protocol A Simplex Protocol for a Noisy Channel Ethernet is connection media access method that allows all host on a network to share the same bandwidth of a link. Two kinds of Ethernet exist: Classic Ethernet: which solves the multiple access problem using the multiple access techniques. Thick Ethernet: is a classic Ethernet snaked around the building as a single long cable to which all the computers were attached. Thin Ethernet: which bent more easily and made connections using industry-standard BNC connectors. Switched Ethernet: In which devices called switches are used to connect different computers. Fast Ethernet Gigabit Ethernet 10-Gigabit Ethernet: 10 Gbps is a truly prodigious speed, 1000x faster than the original Ethernet. A repeater is a physical layer device that receives, amplifies (i.e., regenerates), and retransmits signals in both directions. Summarized by: Faisal Fagihi 13 Date: 2018-01- 04
Chapter #7 Bluetooth is a proprietary open wireless technology standard for exchanging data over short distances (using short wavelength radio transmissions in the ISM band from 2400-2480 MHz) from fixed and mobile devices, creating personal area networks(pans) with high levels of security. Guided Transmission Media (Physical Media) Magnetic Media Copper Media - Twisted Pairs STP Shielded Twisted Pair - Thick or Thin UTP Unshielded Twisted Pair CAT 3,4,5,5e&6 Coaxial Cable Fiber Optics Single Mode Multi-Mode Unguided Transmission Media (Wireless Transmission) The Electromagnetic Spectrum Radio Transmission (Radio Frequency RF) Microwave Transmission Satellites Communication. Wireless telephones come in two basic varieties: Cordless phones. Mobile phones. Mobile phones have gone through three distinct generations, with different technologies: Analog voice. (1G) Digital voice. (2G) Digital voice and data (Internet, e-mail, etc.). (3G) Summarized by: Faisal Fagihi 14 Date: 2018-01- 04