Presentation is loading. Please wait.

Presentation is loading. Please wait.

Slides for Chapter 3: Networking and Internetworking From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson.

Similar presentations


Presentation on theme: "Slides for Chapter 3: Networking and Internetworking From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson."— Presentation transcript:

1 Slides for Chapter 3: Networking and Internetworking From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson Education 2005

2 Distributed Systems CHAPTER 3 Networking and Internetworking

3 3 OUTLINE  Communication Subsystem.  Types of Network.  Principles of Network.  Internet Protocols.  Network Case studies.

4 4 Communication Subsystem  The hardware and software within a distributed system which provides the communication facilities is known as the communication subsystem.  Consists of: Transmission media: providing the physical connectivity, e.g. wire, cable, fibre and wireless channels; Hardware devices: providing the linkage, e.g. routers, bridges, hubs, repeaters, network interfaces and gateways; Software components: managing the communication, e.g. protocol stacks, communication handlers and drivers.

5 5 Impact on Distributed Systems  The communication impact on a distributed system will be one of the delay introduced by the message passing.  The delay experienced by each individual message can be broken down into two factors: Latency: is the time which is necessary to set up the communication, i.e. it is the delay incurred from the time the message is sent until it starts to arrive at the destination. Transmission delay: determined by the length of the message and the data transfer rate, the speed of data transfer between two computers in the network, usually in bits per second. Message transmission time = latency + length / data transfer rate  Above equation is valid only for messages shorter than the maximum allowable length by the underlying network.  Longer messages are segmented and the transmission time is the summation of segments transmission times.

6 6 Network Types  Local Area Networks (LANs) High-speed communication on proprietary grounds (on-campus). Based on twisted copper wire, coaxial cable or optical fibre. Total system bandwidth is high and latency is low. Most typical solution: Ethernet with 100 Mbps  Metropolitan Area Networks (MANs) High-speed communication for nodes distributed over medium-range distances, usually belonging to one organization. Based on high bandwidth copper and optical fibre. Providing "back-bone" to interconnect LAN's. Technology often based on ATM, FDDI or DSL.

7 7 Network Types  Wide Area Networks Communication over long distances (cities, countries, or continents). Covers computers of different organizations. High degree of heterogeneity of underlying computing infrastructure. Involves routers to manage network and route messages to their destinations. Speeds up to a few Mbps possible, but around 50-100 Kbps more typical. Most prominent example: the Internet.  Wireless Networks End user equipment accesses network through short or mid range radio or infrared signal transmission Wireless WANs: GSM (up to about 20 Kbps), UMTS (up to Mbps), PCS. Wireless LANs/MANs: WaveLAN (2-11 Mbps, radio up to 150 meters). Wireless Personal Area Networks: Bluetooth (up to 2 Mbps on low power radio signal, < 10 m distance).

8 Figure 3.1 Network performance ExampleRangeBandwidth (Mbps) Latency (ms) Wired: LANEthernet1-2 kms10-10001-10 WANIP routingworldwide0.010-600100-500 MANATM250 kms1-15010 InternetworkInternetworldwide0.5-600100-500 Wireless: WPANBluetooth (802.15.1)10 - 30m0.5-25-20 WLAN WiFi (IEEE 802.11)0.15-1.5 km2-545-20 WMAN WiMAX (802.16)550 km1.5-205-20 WWAN GSM, 3G phone netsworldwide0.01-02100-500

9 9 Network Types  Internetworks Several networks linked together to provide common data communication facilities. Needed for developing open distributed systems that contain very large numbers of computers. Integrate a variety of local and wide area network technologies to provide the network capacity needed by each group of users. Interconnected by dedicated switching computers, routers, and general purpose computers, gateways. Addressing and transmission of data to included computers are supported by a software layer.

10 10 Network Principles Packet transmission  A packet is a sequence of binary data with addressing information to identify the source and destination computers.  A network message with arbitrary length is divided before transmission into packets of restricted length.  Restricted length packets are used: To allow each computer in the network to allocate sufficient buffer storage to hold largest possible incoming packet. To avoid long waiting for communication channels to be free if long messages ware transmitted without subdivision.

11 11 Network Principles Switching Schemes  A switching system is required to transmit information between two arbitrary nodes in the network using shared communications link.  Four types of switching are used in computer network: Broadcast: Requires no switches. All messages are sent to all connected computers. Each computer is responsible extracting messages addressed to itself. Used approach in Ethernet and wireless networks.

12 12 Network Principles Switching Schemes Circuit switching: Approach taken in the telephone system. A physical link is established between the sender and the receiver. Packet switching: Otherwise known as store-and-forward (postal system). At each switching node (connection point) a computer manages the packets by reading each one into memory, examining its destination, and choosing an outgoing circuit appropriately. Frame relay: Reading in and storing the whole of each packet introduces a performance overhead which can become significant. In ATM networks a frame of fixed size is used in place of a packet and only its header needs to be examined. The remainder of the frame is simply relayed as a stream of bits.

13 13 Network Principles Protocols  A well-known set of rules and formats used for communication between processes to perform a given task.  Implemented by a pair of software modules located in the sending and receiving computers.  Protocol software modules are arranged in a hierarchy of layers.  A complete set of protocol layers is referred to as a protocol suite or protocol stack.  Protocol layering brings benefits in simplifying and generalizing the software interface for access to the communication services, but it also carries significant performance costs.

14 Figure 3.2 Conceptual layering of protocol software Layer n Layer 2 Layer 1 Message sent Message received Communication medium SenderRecipient

15 Figure 3.3 Encapsulation as it is applied in layered protocols

16 16 Network Principles Protocols Protocol layers in the ISO model

17 17 Network Principles Protocols LayerDescription Application Protocols that are designed to meet the communication requirements of specific applications, often defining the interface to a service. Presentation Protocols at this level transmit data in a network representation that is independent of the representations used in individual computers, which may differ. Encryption is also performed in this layer, if required. Session Transport Network Data link Responsible for transmission of packets between nodes that are directly connected by a physical link. In a WAN transmission is between pairs of routers or between routers and hosts. In a LAN it is between any pair of hosts. Physical The circuits and hardware that drive the network. It transmits sequences binary data by analogue signalling (on cable circuits), light signals (on fibre optic circuits) or other electromagnetic signals (on radio and microwave circuits). At this level reliability and adaptation are performed, such as detection of failures and automatic recovery. This is the lowest level at which messages (rather than packets) are handled. Messages are addressed to communication ports attached to processes. Transfers data packets between computers in a specific network. In a WAN or an internetwork this involves the generation of a route passing through routers. In a single LAN no routing is required.

18 Issa Alsmadi18

19 Issa Alsmadi19

20 20 Network Principles Protocols  The task of dividing messages into packets before transmission and reassembling them at receiving computer is performed in the transport layer.  The transport layer is responsible for delivering messages to destinations with transport addresses.  A transport address is composed of the network address number of a host computer (an IP number in the Internet) and a port number.  Ports are software-definable destination points for communication within a host computer.  In the Internet there are typically several ports at each host computer with well-known numbers, each allocated to a given Internet service.

21 Figure 3.6 Internetwork layers

22 22 Network Principles Routing  A function required in all networks except LANs.  The best route for communication between points in the network is re-evaluated periodically to take into account the current traffic and any faults in the network: adaptive routing.  Packets delivery to their destinations is the collective responsibility of the routers located at connection points.  Routing algorithm, implemented by a program in the network layer at each point, has two functions: 1.Decide the routes for packets transmission (on hop-by-hop basis): Whenever a virtual circuit or connection is established in case of circuit- switched and frame-relay network layers. 2.Update its knowledge of the network based on traffic monitoring and the detection of failures.

23 23 Network Principles Routing Hosts Links or local networks A DE B C 1 2 5 4 3 6 Routers Routing in wide area network

24 24 Network Principles Routing Routing tables for the previous network Routings from DRoutings from E ToLinkCostToLinkCost A B C D E 3 3 6 local 6 1 2 2 0 1 A B C D E 4 4 5 6 2 1 1 1 0 Routings from ARoutings from BRoutings from C ToLinkCostToLinkCostToLinkCost A B C D E local 1 1 3 1 0 1 2 1 2 A B C D E 1 2 1 4 1 0 1 2 1 A B C D E 2 2 5 5 2 1 0 2 1

25 25 Network Principles Internetworking  Many subnets based on many network technologies are integrated to build an internetwork.  To make this possible, the following are needed: A unified internetwork addressing scheme enables packets to be addressed to any host connected to any subnets (provided by IP addresses in the Internet). A protocol defining the format of internetwork packets and giving rules of handling them (IP protocol in the Internet). Interconnecting components that route packets to their destination in terms of internetwork addresses (performed by internet routers in the Internet).  The next figure shows a small part of the Internet comprises several subnets interconnected by routers and contains also many connection devices as switches, gateways, and hubs.

26 26 Network Principles Internetworking router/ firewall

27 27 Network Principles Internetworking  Routers: Interconnected through subnets in an internetwork. Have distinct identities (IP addresses) within each subnet. Responsible for forwarding the internetwork packets arrived on any connection to the correct outgoing connection and maintain routing tables for that purpose.  Bridges: Link networks of different types.  Bridge/Routers: Link networks of the same type and perform routing functions.

28 28 Network Principles Internetworking  Hubs: Connecting together several segments of LAN cables. Have a number of sockets. A host computer can be connected to each socket.  Switches: Perform a similar function to routers but for LANs only. Routing the incoming packets only to the connected hosts. Build up routing tables by the observation of traffic.

29 29 Bridges Bridge Hub Bridges Bridges provide all the functionality of a hub.... Bridges filter frames by destination MAC, and segment a LAN into multiple collision domains. Bridges filter signal and timing errors. Bridges can be used to connect segments operating at different speeds. telnet Hub Bridges make it possible to segment your network into separate collision domains to minimize collisions and improve performance. Separate Collision Domains

30 A bridge has a table used in filtering decisions. It can check the destination address of a frame and decide if the frame should be forwarded or dropped. If the frame is to be forwarded, the decision must specify to port. A bridge has a table that maps address to ports.

31 15.31 A bridge connecting two LANs the bridge can check the physical/MAC addresses contained in the frame.

32 32 Transparent Bridges A transparent bridge does not need programming but observes all traffic and builds routing tables from this observation. This observation is called backward learning. Each bridge has two connections (ports) and there is a routing table associated with each port. A bridge observes each frame that arrives at a port, extracts the source address from the frame, and places that address in the port’s routing table. A transparent bridge is found with CSMA/CD LANs.

33 33

34 34 Transparent Bridges A transparent bridge can also convert one frame format to another, but this does not happen too often anymore since most networks are CSMA/CD. Note that some people / manufacturers call a bridge such as this a gateway or sometimes a router. The bridge removes the headers and trailers from one frame format and inserts (encapsulates) the headers and trailers for the second frame format.

35 15.35 A learning bridge and the process of learning

36 36 Remote Bridges A remote bridge is capable of passing a data frame from one local area network to another when the two LANs are separated by a long distance and there is a wide area network connecting the two LANs. A remote bridge takes the frame before it leaves the first LAN and encapsulates the WAN headers and trailers. When the packet arrives at the destination remote bridge, that bridge removes the WAN headers and trailers leaving the original frame.

37 37

38 38 Spanning Tree Algorithm What happens if you have many LANs interconnected with multiple bridges, such as shown in the next slide? Data that leaves one workstation could travel to a bridge, across the next network, into the next bridge, and back onto the first network. A packet may continue to cycle like this forever!

39 39

40 40

41 41 Spanning Tree Algorithm How do we stop this from happening? Disconnect one of the bridges? Maybe we want bridge redundancy in case one bridge fails. How about applying the spanning tree algorithm. How is the algorithm applied?

42 42 Spanning Tree Algorithm Step 1: Designate a Root Bridge Step 2: Mark one port of each bridge as the Root Port. The root port is the port with the least-cost path from that bridge to the root bridge. The root ports are denoted with an asterisk in Figure 8-7b. Step 3: The next step is to select a designated bridge for each LAN. A designated bridge has the least-cost path between that LAN and the root bridge. Mark the corresponding port that connects that LAN to its designated bridge with two asterisks (Figure 8-7b)

43 43 Spanning Tree Algorithm Step 4: If a port has no asterisks, that port is redundant and can be “removed”. Keep all ports with one or two asterisks. The resulting configuration is shown in Figure 8-7c. Note there is now only one way to get to any LAN or bridge from any other LAN or bridge.

44 44

45 45 Internet Protocols  The Internet emerged from the development of the TCP/IP protocol suite.  TCP stands for Transmission Control Protocol and IP for Internet Protocol.  Many application services and application-level protocols now exist based on TCP/IP including: The Web (HTTP). E-mail (SMTP, POP). File transfer (FTP). Net News (NNTP). Telnet (telnet).

46 46 Internet Protocols Messages (UDP) or Streams (TCP) Application Transport Internet UDP or TCP packets IP datagrams Network-specific frames Message Layers Underlying network Network interface TCP/IP layers

47 Figure 3.13 Encapsulation in a message transmitted via TCP over an Ethernet Application message TCP header IP header Ethernet header Ethernet frame port TCP IP

48 48 Internet Protocols  TCP is a transport protocol that can be used to support applications directly or additional protocols can be layered on it to provide additional features.  TCP is a reliable connection-oriented protocol used to transport streams of data.  Another transport protocol (User Datagram Protocol UDP) is used to meet traditional message-based communication.  IP is the underlying network protocol that provide the basic transmission mechanism for the Internet and other subnets.  Success of TCP/IP is based on their independence of underlying transmission technology enabling internetworks to built up from many heterogeneous networks and data links.

49 Three different kinds of addresses Host names (e.g., www.cnn.com) IP addresses (e.g., 64.236.16.20) MAC addresses (e.g., 00-15-C5-49-04-A9)

50 50 MAC Address vs. IP Address  MAC addresses Hard-coded in read-only memory when adaptor is built Like a social security number Flat name space of 48 bits (e.g., 00-0E-9B-6E-49-76) Portable, and can stay the same as the host moves Used to get packet between interfaces on same network  IP addresses Configured, or learned dynamically Like a postal mailing address Hierarchical name space of 32 bits (e.g., 12.178.66.9) Not portable, and depends on where the host is attached Used to get a packet to destination IP subnet

51  TCP—Transmission Control Protocol, reliable connect-oriented transfer of a byte stream. TCP Internet Protocol UDP Protocol Layering: The Internet is build this way

52  UDP—User Datagram Protocol, best-effort connectionless transfer of individual messages.  UDP just sends or receives raw packets with a best- effort approach, also layered above IP TCP Internet Protocol UDP Protocol Layering: The Internet is build this way

53  DNS, VoIP, and many more applications use UDP packets to communicate data TCP Internet Protocol SSH, FTP, HTTP, SMTP UDP DNS, VoIP Protocol Layering: The Internet is build this way

54 54 Layers in the Example

55 55 Layers in the Example Send HTTP Request to neon Establish a connection to 128.143.71.21 at port 80 Open TCP connection to 128.143.71.21 port 80 Send a datagram (which contains a connection request) to 128.143.71.21 Send IP datagram to 128.143.71.21 Send the datagram to 128.143.137.1 Send Ethernet frame to 00:e0:f9:23:a8:20 Send Ethernet frame to 00:20:af:03:98:28 Send IP data-gram to 128.143.71.21 Send the datagram to 128.143.7.21 Frame is an IP datagram IP datagram is a TCP segment for port 80

56 56 Layers and Services  Service provided by TCP to HTTP: reliable transmission of data over a logical connection  Service provided by IP to TCP: unreliable transmission of IP datagrams across an IP network  Service provided by Ethernet to IP: transmission of a frame across an Ethernet segment  Other services: DNS: translation between domain names and IP addresses ARP: Translation between IP addresses and MAC addresses

57 57 Sending a packet from Argon to Neon

58 58 DNS: The IP address of “neon.tcpip-lab.edu ” is 128.143.71.21 ARP: What is the MAC address of 128.143.137.1? Sending a packet from Argon to Neon DNS: What is the IP address of “neon.tcpip-lab.edu ” ? ARP: The MAC address of 128.143.137.1 is 00:e0:f9:23:a8:20 128.143.71.21 is not on my local network. Therefore, I need to send the packet to my default gateway with address 128.143.137.1 frame 128.143.71.21 is on my local network. Therefore, I can send the packet directly. ARP: The MAC address of 128.143.137.1 is 00:20:af:03:98:28 ARP: What is the MAC address of 128.143.71.21? frame

59 59 Internet Protocols IP Application TCPUDP A programmer’s conceptual view of an Internet TCP/IP

60 60 Internet Protocols IP Addressing  Used scheme for assigning addresses to networks and the computers connected to them must satisfy the following requirements: Universal: any host on Internet can send a message to any other. Assign Unique IP address to each host in the Internet. Sufficient: defining large addressing space and using it efficiently. IPv4 (1984): 32-bit addresses for 2 32 (~ 4 billion) addresses, but insufficient due to: i) Unforeseen growth of internet.ii) Inefficient use of address space. IPv6 (1994): 128-bit addresses for 2 128 (~ 3x10 38 ) addressable nodes. Routing: support a flexible and efficient routing scheme, but addresses themselves should not contain routing information.

61 61 Internet Protocols IP Addressing  The IP address: 32-bit numeric identifier containing: A unique network identifier within the Internet, allocated by the Internet Network Information Center (NIC). A unique host identifier within that network, assigned by its manager. Written as a sequence of four decimal numbers separated by dots. Has equivalent symbolic domain name represented in a hierarchy. Has five classes: Class A: reserved for very large networks (2 24 hosts on each). Class B: allocated for organization networks contain more than 255 hosts. Class C: allocated to all other networks (less than 255 hosts on each). Class D: reserved for multicasting but this is not supported by all routers. Class E: unallocated addresses reserved for future requirements.

62 62 Internet Protocols IP Addressing Internet addressing structure

63 63 Internet Protocols IP Addressing Decimal representation of Internet addressing octet 1octet 2octet 3 Class A: 1 to 127 0 to 255 1 to 254 Class B: 128 to 191 Class C: 192 to 223 224 to 239 Class D (multicast): Network ID Host ID Multicast address 0 to 255 1 to 254 0 to 255 1 to 254240 to 255 Class E (reserved): 1.0.0.0 to 127.255.255.255 128.0.0.0 to 191.255.255.255 192.0.0.0 to 223.255.255.255 224.0.0.0 to 239.255.255.255 240.0.0.0 to 255.255.255.255 Range of addresses

64 64 Internet Protocols IP Protocol  Transmits datagrams from one host to another via intermediate routers with the following characteristics: No guarantee of delivery. Duplication possible. Unbounded delay. No order preservation.

65 65 Internet Protocols IP Protocol  When an IP datagram (up to 64 Kbytes) is longer than the Maximum Transfer Unit (MTU) of the underlying network: It is broken into smaller packets at the source and reassembled at its final destination. Each packet has a fragment identifier to enable out-of-order fragments to be collected. data IP address of destination IP address of source header up to 64 kilobytes IP packet layout

66 66 Internet Protocols IP Routing  IP network layer routes packets from their source to their destination using a routing algorithm: Distance-vector algorithm: Router Information Protocols (RIP-1, RIP-2, ……). Link state algorithms class. Open Shortest Path First (OSPF) protocol.  Different routing algorithms may co-exist since routing tables contain identical information for all algorithms.  However, for routing table creation and update, the same algorithm needs to be used.  Therefore, the Internet is divided into topological areas and one algorithm used in every area.

67 67 Internet Protocols IP Routing  Internet topological map is partitioned into autonomous systems which are subdivided into areas. Every autonomous system has a backbone area. The collection of routers connect non-backbone areas to the backbone and the links that interconnect those routers are the Internet backbone. Backbone links are usually of high bandwidth and are replicated for reliability.

68 68 Internet Protocols IP Routing  The need to store information from every node in the IP address space to every other node leads to routing table size explosion.  Two possible solutions: Topological grouping of IP addresses, so that addresses in one topological area are all routed to a central router of that area. For example, all addresses 194.0.0.0 to 195.255.255.255 in Europe. Routers outside Europe can have a single table entry to route all addresses in this range to the closest European router, which then perform detailed routing. Problem: before 1993, IP addresses were assigned without regard to geographic location, still in use. Usage of default routes: Not all nodes in a subnet need to store complete routing information as long as key routers close to backbone have complete routing information.

69 69 Internet Protocols IP Routing Default Routing Routings from C ToLinkCost B C E 2 local 5 1 0 1 Default5- Hosts Links or local networks A DE B C 1 2 5 4 3 6 Routers

70 70 Internet Protocols IP Version 6 (IPv6)  Adopted in 1994 to face the addressing limitations of IPv4.  Addresses long are 128-bits (~ 3x10 38 addressable entities).  Address space is partitioned: One partition will hold the entire range of IPv4 addresses. Two partitions used to organize the address space: One according to the geographical locations of the addressed nodes. The other according to their organizational locations.  Improved routing speed: No checksum applied to the packet content, only to its header. No datagram fragmentation occurs inside network Supporting a mechanism for determining the smallest datagram size (MTU) before a packet is transmitted.

71 71 Internet Protocols IP Version 6 (IPv6) Source address (128 bits) Destination address (128 bits) Version (4 bits)Priority (4 bits)Flow label (24 bits) Payload length (16 bits)Hop limit (8 bits)Next header (8 bits) IPv6 header layout

72 72 Internet Protocols IP Version 6 (IPv6)  Multimedia streams and other real-time data elements can transmitted in identified flow. The priority and flow label fields can be used to enable handling specific packets more rapidly or with higher reliability than others. Flow labels enable resources to be reserved in order to meet timing requirements of specific real-time data streams.  Support multicast (as IPv4 ): The transmission of packets to multiple hosts using a single address.  Support a new mode of transmission called anycast: Deliver a packet to at least one of the hosts subscribed to the relevant address.  Internet protocol stack, routers software, and application programs require upgrading to support the migration to IPv6.

73 73 Internet Protocols MobileIP  Support for roaming of laptop computers, personal digital assistants (PDAs), wearable computing devices, etc.  IP addresses are bound to subnet addresses, but roaming may leave subnet boundary.  MobileIP allows IP communication to continue transparently with respect to current location of the mobile host.

74 74 Internet Protocols MobileIP Sender Home Mobile host MH Foreign agent FA Internet agent 1. First IP packet addressed to MH 2. Address of FA returned to sender 3. First IP packet forwarded to FA 4. Subsequent IP packets send to FA directly MobileIP routing mechanism

75 75 Internet Protocols MobileIP  The home agent keeps track of the current IP address of the mobile host and acts as a proxy during periods of disconnection.  When the mobile machine is registered with the foreign agent, the foreign agent contacts the home agent, notifying it of the new temporary IP address.  Requests for the server are captured by home agent and re- routed, embedded in MobileIP packets, to the foreign agent: The sender sends first IP packet addressed to the mobile host. The Home agent receive the packet as a proxy for the mobile host. The home agent returns the address of the foreign agent to the sender. The home agent forwards the first IP packet to the foreign agent. Subsequent IP packets sent to the foreign agent directly.

76 76 Internet Protocols Firewalls  The purpose of a firewall is to monitor and control all communication into and out of an intranet.  A firewall is implemented by a set of processes that act as a gateway applying a security policy determined by the organization.  The firewall security policy may include any or all of the following: Service control: determine which services on internal hosts are accessible for external access and reject all other incoming service requests. Filtering actions are based on the contents of IP packets and the included TCP and UDP requests. Behavior control: prevent behavior that infringes the organization’s policies and forming part of an attack. User control: the organization discriminate between its users by allowing some access to external services but inhibiting others from doing so.

77 77 Internet Protocols Firewalls Internet Router/ Protected intranet filter web/ftp server Firewall configuration


Download ppt "Slides for Chapter 3: Networking and Internetworking From Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edition 4, © Pearson."

Similar presentations


Ads by Google