Subnetting and addresses revisited Smaller networks using one network address Hierarchy Better organization Better use of resources Addresses (network, host, broadcast) Grundlagen der Rechnernetze Introduction 73
Subnetting example [1] We have been given one class C network address: 217.110.20.0 that we want to divide it into two subnets. The questions are: How many hosts can we have in each subnet? What are the subnet addresses for these two subnets? What are corresponding subnet masks? What set of IP addresses cover these subnets? What are CIDR notations for subnets? Grundlagen der Rechnernetze Introduction 74
Subnetting example [1] We have been given one class C network address: 217.110.20.0 that we want to divide it into two subnets. The questions are: How many hosts can we have in each subnet? 2 subnets = address space of 2^7 addresses Number of hosts = 2^7 host address broadcast address = 126 Grundlagen der Rechnernetze Introduction 75
Subnetting example [1] We have been given one class C network address: 217.110.20.0 that we want to divide it into two subnets. The questions are: What are the subnet addresses for these two subnets? 217.110.20.0 217.110.20.128 Grundlagen der Rechnernetze Introduction 76
Subnetting example [1] We have been given one class C network address: 217.110.20.0 that we want to divide it into two subnets. The questions are: What are corresponding subnet masks? 255.255.255.128 255.255.255.128 Grundlagen der Rechnernetze Introduction 77
Subnetting example [1] We have been given one class C network address: 217.110.20.0 that we want to divide it into two subnets. The questions are: What set of IP addresses cover these subnets? 217.110.20.0 217.110.20.127 217.110.20.128 217.110.20.255 Grundlagen der Rechnernetze Introduction 78
Subnetting example [1] We have been given one class C network address: 217.110.20.0 that we want to divide it into two subnets. The questions are: What are CIDR notations for subnets? 25 for both networks 217.110.20.0 / 25 217.110.20.128 / 25 Grundlagen der Rechnernetze Introduction 79
Subnetting example [2] We have been given one class C network address: 217.110.20.0 that we want to divide it into three subnets, the first having 101 hosts, second 44 and the third 60. The questions are: What are the subnet addresses for these three subnets? What are corresponding subnet masks? What set of IP addresses cover these subnets? What are CIDR notations for subnets? Grundlagen der Rechnernetze Introduction 80
Subnetting example [2] We have been given one class C network address: 217.110.20.0 that we want to divide it into three subnets, the first having 101 hosts, second 44 and the third 60. The questions are: Actual first question is what are the sizes of those three subnets 64 < 101 < 128 => 32 < 44 < 64 => 32 < 60 < 64 => Grundlagen der Rechnernetze Introduction 81
Subnetting example [2] We have been given one class C network address: 217.110.20.0 that we want to divide it into three subnets, the first having 101 hosts, second 44 and the third 60. The questions are: What are the subnet addresses for these three subnets? 217.110.20.0 217.110.20.128 217.110.20.192 Grundlagen der Rechnernetze Introduction 82
Subnetting example [2] We have been given one class C network address: 217.110.20.0 that we want to divide it into three subnets, the first having 101 hosts, second 44 and the third 60. The questions are: What are corresponding subnet masks? 255.255.255.128 255.255.255.192 255.255.255.192 Grundlagen der Rechnernetze Introduction 83
Subnetting example [2] We have been given one class C network address: 217.110.20.0 that we want to divide it into three subnets, the first having 101 hosts, second 44 and the third 60. The questions are: What set of IP addresses cover these subnets? 217.110.20.0 217.110.20.127 217.110.20.128 217.110.20.191 217.110.20.192 217.110.20.255 Grundlagen der Rechnernetze Introduction 84
Subnetting example [2] We have been given one class C network address: 217.110.20.0 that we want to divide it into three subnets, the first having 101 hosts, second 44 and the third 60. The questions are: What are CIDR notations for subnets? 217.110.20.0 / 25 217.110.20.128 / 26 217.110.20.192 / 26 Grundlagen der Rechnernetze Introduction 85
Addresses example Given are following IP addresses in CIDR notation. Determine whether these addresses are subnet, host or broadcast addresses. 1. 192.168.0.17 / 24 2. 14.195.1.191 / 26 3. 112.127.0.0 / 14 4. 112.127.0.0 / 16 Grundlagen der Rechnernetze Introduction 86
Addresses example Given are following IP addresses in CIDR notation. Determine whether these addresses are subnet, host or broadcast addresses. 1. 192.168.0.17 / 24 => Host address, host bits are different from 0 Grundlagen der Rechnernetze Introduction 87
Addresses example Given are following IP addresses in CIDR notation. Determine whether these addresses are subnet, host or broadcast addresses. 2. 14.195.1.191 / 26 => Broadcast address, host bits are all equal to 1 Grundlagen der Rechnernetze Introduction 88
Addresses example Given are following IP addresses in CIDR notation. Determine whether these addresses are subnet, host or broadcast addresses. 3. 112.127.0.0 / 14 => Host address, host bits are different from 0 Grundlagen der Rechnernetze Introduction 89
Addresses example Given are following IP addresses in CIDR notation. Determine whether these addresses are subnet, host or broadcast addresses. 4. 112.127.0.0 / 16 => Network address, host bits are equal to 0 Grundlagen der Rechnernetze Introduction 90
Protocols and layers Grundlagen der Rechnernetze Introduction 91
Protocol and interface Host 1 Host 2 High Level Object High Level Object Service Interface Service Interface Protocol Peer to peer Interface Protocol Grundlagen der Rechnernetze Introduction 92
Protocol and interface Host 1 Host 2 High Level Object Service Interface High Level Object Service Interface Interoperability Protocol vs algorithm Protocol Peer to peer Interface Protocol Grundlagen der Rechnernetze Introduction 93
Message sequence chart (MSC) H1 H2 Grundlagen der Rechnernetze Introduction 94
Message sequence chart (MSC) H1 H2 RTS RTS request to send CTS CTS clear to send Data Data useful data Grundlagen der Rechnernetze Introduction 95
Protocol state machine connection request/ connection response file request/ file response Wait for connection request Wait for file request close request Grundlagen der Rechnernetze Introduction 96
Example H N S Service primitives: File f GET_FILE(), void ABORT_FILE_RETRIVAL(),... States: CLIENT_IDLE, CLIENT_WAITS_FOR_FILE,... Timeline: if client waits 1000ms then change to state CLIENT_ERROR Message format: FILE_REQUEST_MESSAGE: CLIENT_ADR SERVER_ADR FILE_NAME Grundlagen der Rechnernetze Introduction 97
Protocol graph Host 1 Host 2 Protocol 1 Protocol 2 Protocol 1 Protocol 2 Protocol 3 Protocol 3 Protocol 4 Protocol 4 98
Message encapsulation Host 1 Application 1 Data Protocol 1 Host 2 Application 1 Data Protocol 1 H1 Data H1 Data Protocol 2 Protokoll 2 H2 H1 Data H2 H1 Data Protocol 3 Protocol 3 H3 H2 H1 Data 99
Multiplexing and demultiplexing Host 1 Host 2 Protocol 1 Protocol 2 Protocol 1 Protocol 2 Protocol 3 Protocol 3 Protocol 4 Protocol 4 100
Protocol stack practical example Source: Andrew S. Tanenbaum, Computer Networks, Fourth Edition, 2003 Grundlagen der Rechnernetze Introduction 101
OSI model OSI Open System Interconnection Communication subnet boundary Source: Andrew S. Tanenbaum, Computer Networks, Fourth Edition, 2003 Grundlagen der Rechnernetze Introduction 102
OSI model concepts Service set of operations that layer provides to the layer above it Protocol set of rules that determine the format and meaning of the packets (messages) that are exchanged Analogy with OO programming languages: services abstract data types; protocols implementation of services Source: Andrew S. Tanenbaum, Computer Networks, Fifth Edition, 2011 Grundlagen der Rechnernetze Introduction 103
OSI model OSI Principles: 1. A layer should be created where a different abstraction is needed. 2. Each layer should perform a well defined function. 3. The function of each layer should be chosen with an eye toward defining internationally standardized protocols. 4. The layer boundaries should be chosen to minimize the information flow across the interfaces. 5. The number of layers should be large enough that distinct functions need not be thrown together in the same layer out of necessity and small enough that the architecture does not become unwieldy. Source: Andrew S. Tanenbaum, Computer Networks, Fourth Edition, 2003 Grundlagen der Rechnernetze Introduction 104
OSI model Physical layer transmitting raw bits (or signal in general) over the communication channel Data link layer organizes raw data into the data frames (order of 100 1000 of bytes) and transmits frames sequentially. Sending back ACK in reliable services. Traffic regulation when we have fast transmitter and slow receiver. Control of access to the shared medium separate sublayer media access control Source: Andrew S. Tanenbaum, Computer Networks, Fourth Edition, 2003 Grundlagen der Rechnernetze Introduction 105
OSI model Network layer controls operation of subnet, determines how packets are routed from source to destination. Possible different types of routes static tables, routes that can be updated (at the start of each conversation) and highly dynamic routes. Handling congestion (too many packets received). Transport layer accepts data above it and splits it in smaller units, passing them to the lower layers. End to end layer carries communication from source to the destination. Delivering in the order in which bytes were sent or delivering isolated messages or broadcast to multiple destinations Source: Andrew S. Tanenbaum, Computer Networks, Fourth Edition, 2003 Grundlagen der Rechnernetze Introduction 106
OSI model Session layer allows different machines (users) to establish sessions: dialog control (whose turn is to transmit), token management (preventing two parties to attempt same critical operation) and synchronization. Presentation layer syntax and semantics of the information. Manages abstract data structures Application layer protocols needed by users Source: Andrew S. Tanenbaum, Computer Networks, Fourth Edition, 2003 Grundlagen der Rechnernetze Introduction 107
OSI model Source: Andrew S. Tanenbaum, Computer Networks, Fourth Edition, 2003 Grundlagen der Rechnernetze Introduction 108
Internet model (TCP/IP reference model) Source: Andrew S. Tanenbaum, Computer Networks, Fifth Edition, 2011 Grundlagen der Rechnernetze Introduction 109
Internet model (TCP/IP reference model) Link layer interface between hosts and transmission (not a layer in standard sense) Internet layer corresponds to network layer. Internet between the networks. Modeled over snail mail, series of packets delivered using one or more gateways. Internet Protocol (IP) and Internet Control Message Protocol (ICMP) Source: Andrew S. Tanenbaum, Computer Networks, Fifth Edition, 2011 Grundlagen der Rechnernetze Introduction 110
Internet model (TCP/IP reference model) Transport layer above internet layer, allows conversation between the source and destination. Transport Control Protocol (TCP) reliable transmission and User Datagram Protocol (UDP) connectionless protocol Application layer high level protocols. Early examples: Telnet (virtual terminal), FTP (file transfer), SMTP (electronic mail) Source: Andrew S. Tanenbaum, Computer Networks, Fifth Edition, 2011 Grundlagen der Rechnernetze Introduction 111
Internet protocols Source: Andrew S. Tanenbaum, Computer Networks, Fifth Edition, 2011 Grundlagen der Rechnernetze Introduction 112
Comparisons (critique) of OSI and TCP/IP model OSI model Model made before protocols were made (good and bad) Bad technology and implementations (empty layers, big and slow) TCP/IP Protocols then models Not general it cannot describe anything else but TCP/IP Does not distinguish services, services and protocols Link layer not a real layer; no distinction between physical and data layer In general a lot of ad hoc solutions Grundlagen der Rechnernetze Introduction 113