1. Introduction - Recapitulation of assumed knowledge PA159: Net-Centric Computing I. Eva Hladká Faculty of Informatics Masaryk University Autumn 2010 Eva Hladká (Fl MU) 1. Recapitulation of assumed knowledge Autumn 2010 1 / 93 Course Introduction Course Organization o attending the lectures is optional o the knowledge acquired during PB156 course is assumed o course materials will be published on the course webpage (more or less in time ;-) ) o assessment methodology: o midterm exam + final exam (both in a written form) o no priority questions (like in PB156) on the exams course literature: □ slides, RFCs, ... o literature being announced in relevant course parts Eva Hladká (Fl MU) 1. Recapitulation of assumed knowledge Autumn 2010 2 / 93 Course Introduction Course Overview o the course goal: o to provide an advanced insight their applications o discussed topics: o advanced IPv6 functionalities advanced routing mechanisms o QoS in computer networks ad-hoc/sensor networks peer-to-peer networks/systems mobile services o etc. into the area of computer networks and Eva Hladká (Fl MU) 1. Recapitulation of assumed knowledge Autumn 2010 3 / 93 Recapitulation of assumed knowledge Recapitulation of assumed knowledge Eva Hladká (Fl MU) 1. Recapitulation of assumed knowledge Autumn 2010 4 / 93 Lecture overview Lecture overview 1) Course Introduction 2) Lecture overview 3^ Introduction o Computer Networks in General o Network Protocols o Standardization 4 Network Models o ISO/OSI Model o ISO/OSI vs. TCP/IP Model 5> TCP/IP Model o L1 - Physical Layer o L2 - Data Link Layer o L3 - Network Layer o L4 - Transport Layer o L7 - Application Layer Eva Hladká (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 5 / 93 Introduction Computer Networks in General Lecture overview Course Introduction F2I Lecture overview 3^ Introduction o Computer Networks in General o Network Protocols o Standardization Network Models 9 ISO/OSI Model • ISO/OSI vs. TCP/IP Model S TCP/IP Model • L1 - Physical Layer » L2 - Data Link Layer • L3 - Network Layer » L4 - Transport Layer a |7_Application layer Eva Hladká (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 6 / 93 Introduction Computer Networks in General Computer Networks Introduction o a group of computers and devices interconnected by communications channels that facilitate communications among users and allows users to share resources o can be used for various purposes: o facilitating communications (in various ways - text, speech, video, etc.) o sharing hardware o sharing files, data, and information sharing software o fundamental characteristics: o Delivery - the system must deliver data to the correct destination o Accuracy -the system must deliver data accurately o Timeliness - the system must deliver data in a timely manner Eva Hladká (Fl MU) 1. Recapitulation of assumed knowledge Autumn 2010 ľ / 93 Introduction Computer Networks in General Computer Networks Ideal vs. Real Networks Ideal Networks o transparent for users/applications o just end-to-end characteristics o unlimited throughput no losses no delay/latency and jitter keeps packet ordering data cannot be corrupted Real Networks have internal structure which influences data transmission limited throughput (sometimes) data losses o (sometimes) variable delay/latency and jitter (sometimes) do not keep packet ordering data can be corrupted Eva Hladká (Fl MU) 1. Recapitulation of assumed knowledge Autumn 2010 8 / 93 Introduction Computer Networks in General Computer Networks Required features o efficiency - efficient/maximal use of available throughput o fairness - the same approach to all the data flows (having the same priority) o decentralised management o fast convergence when adapting to a new state o multiplexing/demultiplexing reliability • data flow control - a protection in order to avoid network's (network devices') and hosts' congestion Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 9 / 93 Introduction Computer Networks in General Computer Networks Basic Approaches I/ o connection-oriented networks (circuit switching networks) o a connection (called a circuit) is set up between two devices, which is used for the whole communication o information about the nature of the circuit is maintained by the network - a state has to be maintained • circuit may either be a fixed one or created on an "as-needed" basis o easy (more or less automatic) implementation of the QoS □ e.g., the regular telephone system o connection-less (state-less) networks (packet switching networks) o no specific path is used for data transfer - the data is chopped up into small pieces (called packets) and sent over the network packets can be routed, combined or fragmented on the receiving end the data is read from the packets and re-assembled into the form of the original data no state has to be maintained o very hard implementation of the QoS (best-effort service) □ e.g., the Internet Eva Hladká (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 10 / 93 Introduction Computer Networks in General Computer Networks Basic Approaches II. connection-oriented network connection-less network Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 11 / 93 Introduction Network Protocols Network (Communication) Protocols I. o motivated by the need to communicate among several entities (at least two) o entity = anything capable of sending or receiving information o the form/method of the communication must be known to all the participating entities o they have to agree on a protocol human analogy: Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 12 / 93 Network (Communication) Protocols II. • the protocol defines "What" the subject of communication is, "How" the communication has to behave and "When" does it behave • they define: • syntax = structure/format of data (the order in which they are presented) • semantics = refers to the meaning of each section of bits (how should a particular pattern to be interpreted) • timing = when data should be sent and how fast they can be sent • examples of network protocols: • UDP, TCP, IP, IPv6, SSL, TLS, SNMP, HTTP, FTP, SSH, Aloha, CSMA/CD, ... Network Protocol Network Protocol is a set of rules that defines the format and the order of messages exchanged among two or more communicating entities, as well as the actions performed during sending/receiving that messages. Eva Hladká (Fl MU) .utumn 2010 13 / 93 Introduction Standardization Standardization o definition of norms/standards describing various actions, activities, forms/methods of communication, etc. (not only in IT) o main goals: o quality o security □ compatibility o interoperability o portability standards fall into two categories: o de facto - standards that have not been approved by an organized body but have been adopted as standards through widespread use (they are often established originally by manufacturers) o de jure - standards legislated by an officially recognized body standard IT organizations: o ISO, ITU-T, ANSI, IEEE, IETF (RFCs), IEC, etc. Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 14 / 93 Network Models Lecture overview Course Introduction F2I Lecture overview Fil Introduction • Computer Networks in General • Network Protocols • Standardization 4 Network Models o ISO/OSI Model o ISO/OSI vs. TCP/IP Model S TCP/IP Model • L1 - Physical Layer » L2 - Data Link Layer • L3 - Network Layer • L4 - Transport Layer a |7_Application layer Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 15 / 93 Network Models ISO/OSI Model ISO/OSI Model I. o 7-layer model proposed by OSI organization in order to ensure compatibility and interoperability of communication systems developed by various vendors the purpose of layered architecture: o each layer is responsible for particular functionality o it adds some control information to the data in order to do its job each layer communicates just with its neighbours each layer uses the services provided by the lower layer and provides its services to the higher layer o the functionality is isolated in the particular layer (once a layer changes, just the neighbouring layers have to adapt to such a change) o logically, the communication is performed just between peer layers; physically, the communication traverses all the lower layers o the layers are just an abstraction - the real implementations are more or less different o 7 layers not widely accepted == TCP/IP model Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 16 / 93 Network Models ISO/OSI Model ISO/OSI Model II. ISO / osi Application Layer network applications Presentation Layer data representation Session Layer sessions, session restoration Transport Layer process-process communication, reliability Network Layer network addressing (logical), routing Data Link Layer MAC and LLC (physical addressing) Physical Layer transmission media, signals, bit representation Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 17 / 93 Network Models ISO/OSI vs. TCP/IP Model ISO/OSI Model vs. TCP/IP Model ISO / osi Application Layer network applications Presentation Layer data representation Session Layer sessions, session restoration Transport Layer process-process communication, reliability Network Layer network addressing (logical), routing Data Link Layer MAC and LLC (physical addressing) Physical Layer transmission media, signals, bit representation TCP / IP Application Layer Transport Layer Internet Layer Network Access Layer Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 18 / 93 Network Models ISO/OSI vs. TCP/IP Model TCP/IP Hourglass Model Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 19 / 93 TCP/IP Model Lecture overview Course Introduction F2I Lecture overview Fil Introduction • Computer Networks in General • Network Protocols « Standardization Network Models 9 ISO/OSI Model • ISO/OSI vs. TCP/IP Model 5) TCP/IP Model o L1 - Physical Layer o L2 - Data Link Layer o L3 - Network Layer o L4 - Transport Layer o L7 - Application Layer Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 20 / 93 TCP/IP Model L1 - Physical Layer L1 - Physical Layer Introduction I. o Physical Layer: o provides the functionality for an interaction with transmission media o provides services for the Data Link Layer o the Data Link Layer passes/obtains data to/from the Physical Layer in the form of 0s and 1s organized into frames o the Physical Layer transforms the streams of bits (from frames) into signals spread through the transmission media o controls the transmission media; for example, decides about: □ sending/receiving the data (signals) data transformation (coding) into signals the number of logical channels simultaneously transferring data from various sources Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 21 / 93 TCP/IP Model LI - Physical Layer LI - Physical Layer Introduction II. • the main goal: to ensure a transmission of bits (= the content of passed frames) between sender and receiver o several standards (RS-232-C, CCITT V.24, CCITT X.21, IEEE 802.x) defining electrical, mechanical, functional, and procedural characteristics of interfaces used for connecting various transmission media and devices, e.g.: o parameters of the transmitted signals, their meaning and timing o mutual relationships of control and state signals • connectors' wiring o and many many others Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 22 / 93 TCP/IP Model L1 - Physical Layer Data link layer Gives services to Physical layer Services Bit-signal Bit-rate transformation Circuit control switching Bit Multiplexing synchronization Controls Transmission media Figure: Position of the Physical Layer. Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 23 / 93 TCP/IP Model L1 - Physical Layer L1 - Physical Layer Services o Bit-to-Signal Transformation o representing the bits by a signal - electromagnetic energy that can propagate through medium Bit-Rate Control the number of bits sent per second o Bit Synchronization o the timing of the bit transfer (synchronization of the bits by providing clocking mechanisms that control both sender and receiver) o Multiplexing o the process of dividing a link (physical medium) into logical channels for better efficiency Circuit Switching o circuit switching is usually a function of the physical layer o (packet switching is an issue of the data link layer) Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 24 / 93 TCP/IP Model L1 - Physical Layer L1 - Physical Layer Signals o data is transferred (via transmission media) in the form of (electromagnetic) signals □ the data have to be converted into the signals o signal = a function of time representing changes of physical (electromagnetic) characteristics of the transmission media o data that have to be transferred (0s and 1s) - digital (binary) o signals spread through the transmission media - analog or digital o some media suitable for both analog and digital transmission - wired media (coaxial cable, twisted pair), optical fibre o some media suitable just for analog transmission - ether (air) Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 25 / 93 TCP/IP Model LI - Physical Layer LI - Physical Layer Transmission Media o provide an environment for the functionality of physical layer o basic distinction: o guided (wired) media o provide a conduit from one device to another o twisted pair (LANs, up to 10Gbps), coaxial cable, optical fibre (backbones, hundreds of Gbps), etc. o unguided (wire-less) media transfer an electromagnetic wave without the use of physical conductor the signals are broadcasted (spread) via ether (air, vacuum, water, etc.) radio signals, microwave signals, infrared signals, etc. o for details see PV183: Computer Networks Technology Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 26 / 93 TCP/IP Model L1 - Physical Layer multiplexing - a technique of sharing an available bandwidth by concurrent communication channels o the goal is to maximize the utilization of the media o applied especially for optical fibres and non-wired media o for analog signals: o Frequency-Division Multiplexing (FDM) o Wave-Division Multiplexing (WDM) o for digital signals: Time-Division Multiplexing (TDM) Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 27 / 93 TCP/IP Model LI - Physical Layer LI - Physical Layer Resume o ensures the transmission of particular bits (0s and 1s) between the sender and receiver o transferred bits are transcoded into the form of signals spread through the transmission media o the use of analog signals requires a modulation o the use of digital signals requires a transcoding o especially because of synchronization problems o for the transmission, both wired (twisted pair, optical fibre, etc.) or non-wired (ether) media can be used o each of them is suitable for different conditions o the technique of sharing a single media by concurrent transmissions is called multiplexing o further information: o PB156: Computer Networks (doc. Hladká) o PV169: Communication Systems Basics (doc. Staudek) • PV183: Computer Networks Technology (dr. Pelikán) Eva Hladká (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 28 / 93 TCP/IP Model L2 - Data Link Layer o Data Link Layer: o receives packets (being passed from the Network Layer) and transforms them into frames o in cooperation with the Physical layer ensures the transmission of frames between communicating devices interconnected with a (shared) transmission media o i.e., just the local (inside a segment) delivery (LAN) o ensures the transmission reliability between these devices o ensures the flow control in order to avoid receiver congestion o controls the access of the devices to shared media (Medium Access Control) Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 29 / 93 TCP/IP Model L2 - Data Link Layer L2 - Data Link Layer Services o Framing o the incoming packets (being passed from the Network Layer) are encapsulated into frames o Addressing o provides the addresses of physical layer entities - physical/MAC addresses frames contain source and destination addresses of communicating entities o Error Control • it's not possible to eliminate the errors occurring on the physical layer o L2 layer ensures the required level of reliability of the data link (error detection and correction) Flow Control prevents the receiver congestion q stop-and-wait mechanism, sliding-window mechanism, . . . o Medium Access Control - MAC necessary in environments, where the transmission media is shared by several entities eliminates collisions caused by multiple (concurrent) transmissions Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 30 / 93 TCP/IP Model L2 - Data Link Layer L2 - Data Link Layer Error Control o a concept of redundancy is used o sender adds bits whose value is a function of transmitted data o receiver calculates the same function and if the values differ, it detects (tries to repair) an error o when using error detection only (or if the error is unrepairable), the receiver requests the sender to repeat the transmission o Error Detection, Automatic Request for Retransmission (ARQ) error detection and transmission repetition ensurance o suitable for little-lossy transmission media o even/odd parity, Cyclic Redundancy Check (CRC), etc. o Forward Error Correction (FEC) error detection and attempts to data correction (using redundant data) suitable for lossy transmission media (especially with high transmission latency) o e.g., Hamming code o for details see PV169: Communication Systems Basics Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 31 / 93 TCP/IP Model L2 - Data Link Layer L2 - Data Link Layer Medium Access Control (MAC) • the functionality responsible for coordination of multiple devices' access to shared transmission media The goal: the elimination of collisions caused by concurrent transmissions (emissions) o i.e., concurrent transmissions to a shared transmission environment o medium access protocols: o random-access protocols -Aloha, CSMA/CD, CSMA/CA o controlled-access protocols - based on reservations, polling, tokens, etc. o channelization protocols (multiplex-oriented access) - FDMA, TDMA, etc. Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 32 / 93 TCP/IP Model L2 - Data Link Layer L2 - Data Link Layer L2 Networks I. local area networks (LANs) o a systematic topology for simple networks bus, circle, star, tree, mesh, etc. wider networks are composed by interconnecting simple topologies (local area networks) common L2 interconnection devices: o bridge o transparent network interconnection (all the traffic passes the bridge) separates shared media (collisions do not pass the bridge) □ switch □ ~ multi-port bridge Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 33 / 93 TCP/IP Model L2 - Data Link Layer L2 - Data Link Layer L2 Networks II. o based on MAC addresses • Backward Learning Algorithm - the bridge "learns" the locations of network stations (nodes) by listening on the media (observing the source addresses) o the frames are switched based on the receiver address o characteristics: • it's possible to create networks with loops (cycles) o Distributed Spanning Tree Algorithm for the spanning tree calculation is used o not suitable for large networks o switch tables grow with the number of stations - low convergence Eva Hladká (Fl MU) 1. Recapitulation of assumed knowledge Autumn 2010 34 / 93 TCP/IP Model L2 - Data Link Layer L2 - Data Link Layer Distributed Spanning Tree Algorithm I. • the algorithm goal: to disable (disuse) some bridges' ports (in order to prevent loops) o every bridge sends periodical reports o once a bridge receives a report from its neighbour, it adapts its idea about the "best" path: it prefers the root with lower address it prefers lower path costs • in the case of same paths' costs it prefers lower address mechanism: root bridge selection (the lowest address) □ sequential growth of the tree • the "best" paths found define the active bridges' ports the other ports are disabled Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 35 / 93 TCP/IP Model L2 - Data Link Layer L2 - Data Link Layer Distributed Spanning Tree Algorithm I1. o root bridge selection phase o once started, all the bridges claim themselves as Root Bridges (and report this to the others) o each of them sends its report via all its ports o based on this information, the root bridge is selected (the lowest address) root ports selection phase o each bridge chooses its Root Port - the port with the lowest path cost to the Root Bridge o if two ports have the same costs, the one with lower Port ID is selected. The other is disabled (it becomes non-designated) in order to prevent loops active/inactive ports selection phase Root Bridge sets all its ports as active (Designated) □ the bridges communicate via all the links, which do not contain Root Ports, and try to determine the one with the lowest Bridge ID. Once the one is selected, it sets its corresponding port as active; the other disables its port. see the animation: http: //frakira.fi.muni.cz/~jeronimo/vyuka/Cisco-spanning_tree.swf Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 36 / 93 TCP/IP Model L2 - Data Link Layer L2 - Data Link Layer Résumé o ensures the transmission of frames between two communicating devices (determined by their MAC addresses) interconnected via shared transmission media o ensuring thé reliability of thé transfer o preventing thé récéivér from thé congestion o using thé médium access control (MAC protocols) o L2 networks (LANs): o (usually) bus, circlé, and star topologiés o thé ésséntial dévicés for building widér aréa nétworks aré bridgés and switchés • Backward Learning Algorithm to détérminé stations' location (nécéssary for framés' switching) Spanning Tree Algorithm is uséd for spanning tréé détérmination o further information: o PV169: Communication Systéms Basics (doc. Staudék) □ PV183: Computér Nétworks Téchnology (dr. Pélikan) o graph algorithms - PB165: Graphs and Nétworks (prof. Matyska, doc. Hladka, dr. Rudova) Eva Hladká (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 37 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Introduction o Network Layer: provides services for the Transport Layer: o receives segments from the Transport Layer and transforms them into packets • in cooperation with the Data Link Layer ensures the packets' transmission between communicating nodes (even between different LANs) o logically joins independent LAN networks o the upper layers are provided with an illusion of just a single wide-area network (WAN) o allows unique identification (addressing) of every host/device on the Internet ensures routing of passing packets o in cooperation with the Data Link Layer associates the L3-addresses with the L2/MAC-addresses (and vice versa) further services: multicast Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 38 / 93 TCP/IP Model L3 - Network Layer Figure: Position of the Network Layer. Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 39 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Services I. o Internetworking o logical gluing of heterogeneous physical networks together to look like a single network (from the upper layers' point of view) o by such an interconnection, an internetwork (shortly internet) is created o an illusion of a uniform environment provided by a single wide-area network o Packetizing o received segments are transformed into packets Fragmenting o a technique to solve the problem of heterogeneous MTUs - when a datagram is larger than the MTU of the network over which it must be sent, it is divided into smaller fragments which are each sent separately o Addressing the entity addresses used on the network layer - so-called IP addresses, unique throughout the whole network packets contain source and destination addresses of communicating entities Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 40 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Services II. o Address Resolution o ARP, RARP protocols Routing o the process of selecting paths in a network along which to send network traffic from a source to a particular destination o Control Messaging o providing basic information about unavailability to deliver a packet, about a network/host state, etc. - ICMP protocol Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 41 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Addressing o a requirement to uniquely identify every host/device connected to the Internet o a necessity to systematic address assignment o in order to simplify the routing process every device/interface is assigned an Internet address (IP address) o IPv4 address (32 bits) vs. IPv6 address (128 bits) 10000000 00001011 00000011 00011111 128.11.3.31 Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 42 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer IPv4 Addresses - types o Unicast Address - an identification of a single network interface o identification of a single sender/receiver o Broadcast Address - in this case, the data are sent to all the hosts on the particular LAN ("all-hosts broadcast") o the source address of such datagrams (sender identification) is unicast address o Multicast Address - used for an identification of a group of receivers (network interfaces) who applied for the data routers send such data to all the group members o the source address of such datagrams (sender identification) is unicast address Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 43 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer IPv6 Addresses o addresses used by the IPv6 protocol (see later) o (currently) final solution of IP address space shortage o IPv6 address has 128 bits (= 16 Bytes): o 2128 of possible addresses (« 3 x 1038 addresses => « 5 x 1028 addresses for every human on the Earth) o a hexadecimal notation instead of decadic notation (in pairs of bytes separated by ":") 128 bits = 16 bytes = 32 hex digits 1111110111101100 ••• 1111111111111111 5 fdec ■ ■ ba98 ■ ■ 7654 ■ ■ 3210 ■ ■ adbf| ; bbff ■ ■ 2922 ■ ■ ffff Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 44 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer IPv6 Addresses - address abbreviation Leading zeros might be omitted in every group: o 0074 might be written as 74, 000F as F, .. . o 3210 cannot be abbreviated! Unabbreviated Consecutive groups of zeros might be omitted: • and replaced by the symbol o just a single sequence of zero groups might be abbreviated! Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 45 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer IPv6 Addresses - types o Unicast Address - same as in IPv4 (an identification of a single network interface) o Multicast Address - same as in IPv4 (used for addressing a group of receivers) □ the data are delivered to all members of the particular groups o prefix ff00::/8 o Anycast Address - a newbie o identifies a group of receivers like multicast □ but the data are delivered just to a single member of such a group (the closest one) o IPv4 broadcast addresses are not used in IPv6 o they were substituted by particular multicast groups (e.g., a group of all hosts/routers on the particular LAN) Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 46 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Internet Protocol (IP) I. o the most widespread network layer protocol o ensures data (in pieces called datagrams) delivery, even through an intermediate nodes (called routers) - host-to-host delivery o hosts/interfaces are identified by their IP addresses o uses datagram approach to packet switching, the communication is connectionless o == routing o provides an unreliable (so-called best-effort) service o supplemented by a set of supporting protocols (ICMP, ARP, RARP, IGMP) used for nonstandard situations treatment, a distribution of information necessary for correct routing, L2 identification of network interfaces (MAC addresses), etc. o proposed and standardized in two versions: o Internet Protocol version 4 (IPv4) - 1981, RFC 791 o Internet Protocol version 6 (IPv6) - 1998, RFC 2460 Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 47 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Internet Protocol (IP) II. Supplementary protocols: IGMP ICMP IP Network ARP RARP layer Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 48 / 93 TCP/IP Model L3 - Network Layer Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 49 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer IPv4 Datagram II. • Version (VER) - IP protocol version • Header length (HLEN) - the length of IP datagram header (in 4B words) o because of the Option field, which makes the length of the header variable • Differentiated services (DS) or Type of service (TOS) - defines the class of the datagram for quality-of-service (QoS) purposes • necessary for a distinction of "important" (control datagrams, real-time data) and "less important" datagrams Total length - the length of the whole IP IP datagram (in B) o max. 216 - 1 = 65535 bytes • Identification, Flags, Offset - fields used for fragmentation o Time to live (TTL) - used to control the maximum number of hops (router) visited by the datagram o the sending nodes stores a number in this field (~ 2x the biggest number of hops between any two hosts in the network) o each router decrements this number by 1 o if this value equals to zero (TTL = 0), the datagram is discarded the purpose is to prevent a datagram from becoming an errant Eva Hladká (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 50 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer IPv4 Datagram III. o Protocol - higher-level protocol identification o specifies the final destination protocol to which the IP datagram should be delivered o this value helps in multiplexing/demultiplexing process o the identifiers are specified by IANA organization o e.g., 1 = ICMP, 2 = IGMP, 6 = TCP, 17 = UDP, etc. • see http://www.iana.org/assignments/protocol-numbers Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 51 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer IPv4 Datagram IV. o Header checksum - the checksum of the IP header o data are not included o data checksums are provided by the L4-level (Transport Layer) o the main reason for distinction: the checksums have to be recomputed on every router the datagram visits because of header changes (e.g., TTL field) o == computing the checksum from the header only is simpler = the processing is faster o Source IP address, Destination IP address - 32-bit IPv4 address identifying sender/receiver o Options - optional part of IP datagrams, used especially for network testing and debugging o Data - the data being transferred Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 52 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Internet Control Message Protocol (ICMP) I. o IP protocol provides unreliable (best-effort) service o without any mechanism to inform the sender about errors arisen during data delivery o without any mechanism for network state testing o Internet Control Message Protocol (ICMP) o RFC 792 o a supplementary protocol for IP protocol provides information about errors arsed during data delivery provides basic information about the network state o message examples: • Destination unreachable - "Destination" is a protocol, port, host, or network o Time exceeded - an information about TTL expiration or when all fragments that make up a message do not arrive at the destination host within a certain time limit o Echo request/reply - a request for reply Eva Hladká (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 53 / 93 TCP/IP Model L3 - Network Layer ICMP Encapsulation: Eva Hladká (FI MU) l. Recapitulation of assumed knowledge Autumn 20l0 54 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer IP Protocol version 6 (IPv6) - main features o larger address space - 128-bit IPv6 address, 2128 of unique addresses o better (simpler) header format - basic 40B header containing just the most important information allowance for extensions - via so-called extension headers • Support for real-time transfers - flows' tagging, flows' priorities o Support for more security -data authentication, encryption, and integrity support o Mobility support -via so-called home agents o Device autoconfiguration support - statefull and stateless autoconfiguration Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 55 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer IPv6 Datagram - basic header I. GO O VER PRI Flow label Payload length Next header Hop limit Source address ~~ Destination address Payload extension headers Data packet from the upper layer o fixed (40B) header length o checksum, options, and fragmenting information are not included in basic header any more o options and fragmenting information available via extension headers o checksum removed without any compensation (ensured on L2 and L4) Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 56 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer IPv6 Datagram - basic header II. o Version (VER) - version number of the IP (currently 6) o Priority (PRI), also Traffic Class -datagram priority with respect to traffic congestion o Flow label - designed to provide special handling for a particular flow of data o not widely used yet o Payload length - the total length of the IP datagram excluding the base header o Next header - defines the header that follows the base header in the datagram (extension header or transport header) o Hop limit - « TTL in IPv4 o Source/Destination address - IPv6 address of source/destination node Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 57 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer IPv6 Datagram - extension headers IPv6 Datagram With Two Extension Headers Carrying TCP Segment several extension headers have been defined o e.g., Hop-By-Hop Options, Routing, Fragment, Encapsulating Security Payload, Authentication Header, etc. Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 58 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer ICMPv6 o ICMP protocol version 6 (ICMPv6) o based on same mechanisms as the ICMPv4 o moreover, includes the functionality of ARP and IGMP protocols o using so-called Neighbour Discovery protocol working in cooperation with ICMPv6 Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 59 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Routing • Routing = the process of finding a path in the network between two communicating nodes o the route/path has to satisfy certain constraints o influenced by several factors: o static ones: network topology o dynamic ones: network load Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 60 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer The Global View Problem o the global knowledge of network topology is problematic • it's very difficult to acquire it • if yet acquired, it's not actual any more it has to be locally relevant o a local view of network topology represents a routing table o the difference between local and global knowledge can lead to: o cycles/loops (i.e., black holes) o oscillation (load adaptability) Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 61 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Routing - the goal o the main goal of routing is: o to find optimal paths o the optimality criterion is a metric - a cost assigned for passing through a network o to deliver a data packet to its receiver o the routing usually does not deal with the whole packet path o the router deals with just a single step - to whom should be the particular packet forwarded • somebody "closer" to the recipient o so-called hop-by-hop principle o the next router then decides, what to further do with the received packet Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 62 / 93 TCP/IP Model L3 - Network Layer The basic approaches divide based on the routing table creation/maintenance: o static (non-adaptive) o manually (by hand) edited records o suitable for a static topology and smaller networks o dynamic (adaptive) - these respond to network changes o complex (usually distributed) algorithms o e.g.: o centralized - a centre controls the whole routing o isolated - every node on its own • distributed - nodes' cooperation Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 63 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Routing - mathematical view o the routing can be seen as a problem of graph theory o a network can be represented by a graph, where: □ nodes represent routers (identified by their IP addresses) • edges represent routers' interconnection (a data link) • edges' value = the communication cost o the goal: to find paths having minimal costs between any two nodes in the network B DE Autumn 2010 64 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Routing - routing algorithms' required features Required features of any routing algorithm: o accuracy o simplicity o effectivity and scalability o to minimize an amount of control information (« 5% of the whole traffic!) • to minimize routing tables' sizes robustness and stability o a distributed algorithm is necessary fairness o optimality • "What should be treated as the best path?" Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 65 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Routing - basic approaches to distributed routing Basic approaches to distributed routing: o Distance Vector (DV) - Bellman-Ford algorithm o the neighboring routers periodically (or when the topology changes) exchange complete copies of their routing tables o based on the content of received updates, a router updates its information and increments its distance vector number o a metric indicating the number of hops in the network • i.e., "all pieces of information about the network just to my neighbors" o Link State (LS) o the routers periodically exchange information about states of the links, to which they are directly connected o they maintain complete information about the network topology - every router is aware of all the other routers in the network o once acquired, the Dijkstra algorithm is used for shortest paths computation • i.e., "information about just my neighbors to everyone" Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 66 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Distance Vector - RIP protocol o the principal actor of DV routing o RIPvl (RFC 1058) o RIPv2 (RFC 1723) - adds several features (e.g., an authentication of routing information) o the networks are identified using the CIDR mechanism the number of hops is used as a metric o transfer of a packet between two neighboring routers = 1 hop o infinity = 16 o == the RIP cannot be used for networks with minimal amount of hops between any two routers > 15 o the routers send the information periodically every 30 seconds o triggered updates when a state of a link changes o timeout 180s (detection of connection errors) usage: o suitable for small networks and stable links o not advisable for redundant networks Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 67 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Link State - OSPF protocol o Open Shortest Path First o currently the mostly used LS protocol o metric: cost • a number (in the range between 1 and 65535) assigned to each router's network interface o the lower the number is, the better the link/path is (i.e., will be preferred) o by default, every interface is automatically assigned a cost derived from the link's throughput o cost = 100000000/bandwidth (bw in bps) o might be manually edited o extensions: message authentication o routing areas - next layer of hierarchy o load-balancing - more links/paths with the same cost Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 68 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Routing - Link State vs. Distance Vector Link State Distance Vector O Complexity: O every node has to know the cost of every link in the network == O(nE) messages O once a link state changes, the change has to be propagated to every node O Speed of convergence: O(n2) alg., sends O(nE) messages sustains from oscillations O Robustness: wrongly functional/compromised router spreads wrong information just about the links it is directly connected to every router computes routing tables on its own = separated from routing information propagation = a form of robustness O Usage: suitable for large networks Complexity: once a link state changes, the change has to be propagated just to the closest neighbors; it is further propagated just in cases, when the changed state leads to a change in the current shortest paths tree Speed of convergence: O may converge more slowly than LS problems with routing loops/cycles, count-to-infinity problem Robustness: bad computation is spread through the network == may lead to a "confusion" of other routers (bad routing tables) Usage: suitable just for smaller networks Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 69 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Autonomous Systems • the goal of Internet's division into Autonomous Systems is a reduction of routing overhead o simpler routing tables, a reduction of exchanged information, etc. o a simplification of the whole network management o particular internets are managed by various institutions/organizations • autonomous systems = domains o a 16bit identifier is assigned to every AS/domain o Autonomous System Number (ASN) - RFC 1930 o assigned by ICANN (Internet Corporation For Assigned Names and Numbers) correspond to administrative domains o networks and routers inside a single AS are managed by a single organization/institution o e.g., CESNET, PASNET, ... a distinction according to the way an AS is connected to the Internet: Stub AS o Multihomed AS Transit AS Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 70 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Autonomous Systems - routing o separated routing because of scalability reasons: o interior routing routing inside an AS • under the full control of AS's administrator(s) o the primary goal is the performance o so-called Interior Gateway Protocols (IGP) (e.g., RIP, OSPF) exterior routing routing among ASs o the primary goal is the support of defined policies and scalability o so-called Exterior Gateway Protocols (EGP) (e.g., EGP, BGP-4) o a cooperation of interior and exterior routing protocols is necessary Autumn 2010 71 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer Autonomous Systems - exterior routing (BGP) o Border Gateway Protocol o currently version 4 (BGP-4) • proposed due to Internet's grow and demands on complex topologies support o supports redundant topologies, deals with loops/cycles o employs so-called Path Vector routing • not only paths' costs, but the full descriptions of the whole paths are exchanged o allows a definition of routing rules (policies) o makes use of the fully reliable TCP protocol • uses CIDR for paths' aggregation Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 72 / 93 TCP/IP Model L3 - Network Layer A classical solution of group communication in the network: o Just a single data copy goes every network link o A feature of the network (hop-by-hop service, no end-to-end service) o Non-reliable delivery (best effort, UDP, group address) o Spread wideness restricted by TTL (Time To Live) field of packets How to identify a group? o == multicast IP address o IPv4: class D (224.0.0.0 - 239.255.255.255) o IPv6: prefix ff00::/8 Two basic approaches to multicast routing: o Source Based Tree o Shared Tree (Core Based Tree) Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 73 / 93 TCP/IP Model L3 - Network Layer L3 - Network Layer IP Multicast - Source Based Tree vs. Core Based Tree Source Based Tree Core Based Tree o Top-down activity (from the constituent) o Periodic broadcast o Cutting the subtrees with no clients o Wideness restriction - TTL o Suitable for closely located groups o Drawbacks: overhead, flooding by broadcasts o Protocols: DVMRP (RIP), MOSPF (OSPF), PIM-DM A core is established - ensured by meeting points (MPs) A client contacts a MP Down-top activity (from the receiver) Reduces broadcast —> better scalability Drawback: a dependence on the core availability Protocols: CBT, PIM-SM Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 74 / 93 TCP/IP Model L4 - Transport Layer L4 - Transport Layer Introduction Transport Layer: o provides its services to the Application Layer: o obtains data coming from sending application and transforms them into segments received segments delivers to the destination application in cooperation with the network layer ensures data (segments) delivery between communicating applications/processes o providing transmission reliability, if required provides them with a logical communication channel o an illusion of direct physical interconnection o so-called process-to-process delivery o the lowest layer providing so-called end-to-end services • the headers generated on the sender's side are interpreted "only" on the receiver's side the transport layer data are seen by routers as a payload of transmitted packets Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 75 / 93 TCP/IP Model L4 - Transport Layer Quality of service Congestion control Application layer Gives services to | Transport layer Packetizing Addressing Connection control Reliability Receives services from Network layer Figure: Position of the Transport Layer. Eva Hladkaá (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 76 / 9S TCP/IP Model L4 - Transport Layer L4 - Transport Layer Services o Packetizing o the data provided by an application are transformed into packets (having a transport header added) o Connection Control o connection-oriented and connectionless services o Addressing o the addresses of transport layer entities (= network applications/services) -so-called ports o the packets contain source and destination ports (an identification of source and destination application) o an application is uniquely identified in the network by the pair IP_address:p ort Connection Reliability o Flow Control and Error Control o provided on the node-to-node principle by lower layers, L4 provides it on the end-to-end principle o ensures a reliability over best-effort service (IP) o Congestion Control and Quality of Service (QoS) ensurance Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 77 / 93 TCP/IP Model L4 - Transport Layer o addresses on L4 - port numbers (ports) o « addresses of services o identify a sending application on the sender node (identified by its IP address) o identify a receiving application on the receiver node (identified by its IP address) o ports are identified by 16-bit number o range 0 — 65535 Daytime client Daytime server 52,000 Transport layer ---------- 13 Transport layer Data I 13 152,000 r •^H 13 152,0001 Data" Eva Hladká (Fl MU) 1. Recapitulation of assumed knowledge Autumn 2010 78 / 93 TCP/IP Model L4 - Transport Layer L4 - Transport Layer Connection-oriented vs. Connection-less Services Connection-oriented services o prior to the transmission, a connection is established (and maintained during the whole transmission) packets are numbered □ their delivery/undelivery is explicitly acknowledged Connection-less services o packets are sent to the destination application without any connection being established • packets are not numbered (= they aren't acknowledged) o might be lost, delayed, delivered out-of-order, etc. Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 79 / 93 TCP/IP Model L4 - Transport Layer L4 - Transport Layer User Datagram Protocol (UDP) User Datagram Protocol (UDP) o the simplest transport protocol providing a connection-less and unreliable service o provides best-effort service • enriches the IP layer services just by process-to-process communication and simple error control if a reliability has to be ensured, it must be provided by the application o main features: simplicity, minimal overhead no connection establishment/maintenance necessity (brings a delay in the beginning of the transmission) no necessity to maintain state information by the communicating nodes small/simple header o selected applications: • processes requiring just a simple "request — reply" communication (e.g., the DNS (Domain Name Service)) a processes/protocols with internal flow and error control (e.g., TFTP (Trivial File Transport Protocol)) real-time transfers multicast transfers Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 80 / 93 TCP/IP Model L4 - Transport Layer 8 bytes - sender receiver network Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 87 / 93 TCP/IP Model L4 - Transport Layer L4 - Transport Layer Resume o ensures the communication of particular applications o providing an optional reliability ensurance o UDP protocol for fast, but non-reliable packet transmission o just the error control (using checksums) is provided o TCP protocol for fully-reliable byte-stream transmission o the transmission reliability ensured by repeated sending (ARQ mechanisms) o provides a mechanism for flow control (receiver protection from a congestion) - explicit information provided by the receiver provides a mechanism for congestion control (network protection from a congestion) - an estimation of available throughput (AIMD mechanism) o further information: o PB156: Computer Networks (doc. Hladka) • PV183: Computer Networks Technology (dr. Pelikan) Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 88 / 93 TCP/IP Model L7 - Application Layer L7 - Application Layer Introduction I. Application Layer: o provides services to users: o application programs specific for a particular purpose o e.g., electronic mail, WWW, DNS, etc. etc. o applications = the main reason for computer networks existence o comprises network applications/programs and application protocols o application protocols (HTTP, SMTP, etc.) are parts of network applications (web, email) o they are not applications on their own □ the protocols define a form of communication between communicating applications o application protocols define: o types of messages, which the applications exchange (request/response) • messages' syntax • messages' semantics (a semantics of particular fields) rules, when and how the messages are exchanged Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 89 / 93 TCP/IP Model L7 - Application Layer L7 - Application Layer Introduction II. Eva Hladká' (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 90 / 93 TCP/IP Model L7 - Application Layer L7 - Application Layer Basic Application Classification/Distinction According to employed communication model: o Client-Server model o Thin vs. Fat clients o Peer-to-peer model According to the way of accessing the information: o pull model - the data transfer is initiated by a client o push model - the data transfer is initiated by a server According to the demands on the computer network: o applications with low demands on the computer network o applications with high demands on the computer network Eva Hladká (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 91 / 93 TCP/IP Model L7 - Application Layer L7 - Application Layer Client-Server vs. Peer-to-peer Client Client-Server Peer-to-peer 1. Recapitulation of assumed knowledge Autumn 2010 92 / 93 TCP/IP Model L7 - Application Layer L7 - Application Layer Resume o provides services to users o acts as an interface between users and computer network o the applications can be distincted according to various criteria o client/server vs. peer-to-peer, pull vs. push model, demands on the computer network, etc. • examples of Internet's fundamental applications and application protocols: o name service (DNS) o World-Wide-Web (HTTP) o electronic email (SMTP) o file transfer (FTP) o multimedia transmissions (RTP/RTCP) o further information: o PB156: Computer Networks (doc. Hladka) o PV160: Net-centric computing II. (prof. Matyska) o PV188: Principles of Multimedia Processing and Transport (doc. Hladká, dr. Liska, Ing. Šiler) Eva Hladka (FI MU) 1. Recapitulation of assumed knowledge Autumn 2010 93 / 93