Академический Документы
Профессиональный Документы
Культура Документы
CHAPTER 3
OUTLINE
Communication Subsystem.
Types of Network.
Principles of Network.
Internet Protocols.
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.
Dr. Almetwally mostafa 4
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.
Dr. Almetwally mostafa 5
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
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.
Dr. Almetwally mostafa 6
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. 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 Networks
Wireless LANs/MANs:
WaveLAN (2-11 Mbps, radio up to 150 meters).
Range
Bandwidth Latency (Mbps) (ms) 10-1000 1-150 0.5-600 0.5-2 1.5-20 0.01-02 1-10 10 100-500 5-20 5-20 5-20 100-500
0.010-600 100-500
Internetwork Internet
Bluetooth (802.15.1) 10 - 30m WiFi (IEEE 802.11) WiMAX (802.16) GSM, 3G phone nets 550 km worldwide
0.15-1.5 km 2-54
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 Pearson Education 2005
Network Types
Internetworks
together
to
provide
common
data
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.
Dr. Almetwally mostafa 9
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.
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.
Dr. Almetwally mostafa 10
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.
Dr. Almetwally mostafa 11
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.
Dr. Almetwally mostafa 12
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. The application, presentation, and session layers are not distinguish in the Internet protocol stack:
The application and presentation layers are implemented as a single middleware layer. The session layer is integrated with the transport layer.
Dr. Almetwally mostafa 13
Message received
Communication medium
Recipient
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 Pearson Education 2005
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 Pearson Education 2005
Network Principles
Protocols
Message s ent Lay ers Application Pres entation Sess ion Transport Network Data link Phy sic al Sender Communic ation medium Recipient Message rec eiv ed
Network Principles
Protocols
Description
Protocols that are designed to meet the communication requirements of specific applications, often defining the interface to a service. independent of the representations used in individual computers, which may differ. Encryption is also performed in this layer, if required.
Layer
Application
Presentation Protocols at this level transmit data in a network representation that is Session Transport Network
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.
Data link
Physical
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.
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).
17
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 communication within a host computer. points for
In the Internet there are typically several ports at each host computer with well-known numbers, each allocated to a given Internet service.
Dr. Almetwally mostafa 18
I nt ernetwork I nt ernetwork packet s Network interf ac e Network-specif ic pac kets Underly ing net work
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 Pearson Education 2005
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 circuitswitched and frame-relay network layers.
2. Update its knowledge of the network based on traffic monitoring and the detection of failures.
Dr. Almetwally mostafa 20
Network Principles
Routing
1 Links 6 E 4
B 2
C
5 Routers
Network Principles
Routing
0 1 2 1 2
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.
Dr. Almetwally mostafa 24
Network Principles
Internetworking
138.37.95.241
138.37.95.240/29 subnet
router/ firewall
hammer 138.37.94.251
Campus router
Staff subnet
138.37.88
138.37.88.251
Student subnet
138.37.94
bruno 138.37.88.249
Eswitch
Eswitch
henry 138.37.88.230
file server
web server
hub
hub
desktop computers
138.37.95.248/29 subnet
138.37.88.xx
desktop computers
sickle
138.37.94.xx
138.37.95.249
Campus router
25
Network Principles
Internetworking
Routers:
Bridges:
Bridge/Routers:
Network Principles
Internetworking
Hubs:
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.
Dr. Almetwally mostafa 27
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:
Internet Protocols
Layers Application Messages (UDP) or Streams (TCP) Transport UDP or TCP packets Internet IP datagrams Network interface Network-specific frames Message
Underlying network
TCP/IP layers
Dr. Almetwally mostafa 29
IP header TCP
Ethernet header IP
Ethernet frame
Instructors Guide for Coulouris, Dollimore and Kindberg Distributed Systems: Concepts and Design Edn. 4 Pearson Education 2005
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.
Dr. Almetwally mostafa 31
Internet Protocols
Application Application
TCP
IP
UDP
Internet Protocols
IP Addressing
Used scheme for assigning addresses to networks and the computers connected to them must satisfy the following requirements:
Routing: support a flexible and efficient routing scheme, but addresses themselves should not contain routing information.
Dr. Almetwally mostafa 33
Internet Protocols
IP Addressing
The IP address:
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 (224 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.
Internet Protocols
IP Addressing
7 Clas s A: 0 Network ID 14 Clas s B: 1 0 Network ID 21 Clas s C: 1 1 0 Network ID 28 Clas s D (multic ast): 1 1 1 0 Multicast address 27 Clas s E (reserv ed): 1 1 1 1 0 unus ed 24 Host ID 16 Host ID 8 Host ID
Internet Protocols
IP Addressing
octet 1 Network ID Class A: Class B: Class C: Class D (multicast): Class E (reserved): 1 to 127 128 to 191 192 to 223 224 to 239 240 to 255 0 to 255 0 to 255 Network ID 0 to 255 0 to 255 0 to 255 0 to 255 0 to 255 0 to 255 Multicast address 1 to 254 1 to 254 Network ID 0 to 255 octet 2 octet 3 Host ID 0 to 255 Host ID 0 to 255 Host ID 1 to 254 0 to 255 Range of addresses 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
Internet Protocols
IP Protocol
Network protocol of the Internet protocol stack.
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. IP addresses may need to be mapped to physical network addresses.
Ethernet has 48-bit addresses.
Address resolution
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.
header IP address of source IP address of destination up to 64 kilobytes data
IP packet layout
Dr. Almetwally mostafa 38
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, ).
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.
Dr. Almetwally mostafa 39
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.
Transmitted in a single hope without routing. IP layer uses the Address Resolution Protocol (ARP) to determine the network address of local destination host
Dr. Almetwally mostafa 40
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.
Internet Protocols
IP Routing
1 Links 6 E 4
B 2 C 5 Routers
Routings from C To Link Cost
B 2 C local E 5 Default 5 1 0 1 42
Default Routing
Dr. Almetwally mostafa
Internet Protocols
IP Routing
Classless Inter Domain Routing (CIDR) is a scheme introduced in 1996 to face the shortage of IP addresses. CIDR scheme is used to allocate IP addresses and manage entries of routing tables. Main problem: scarcity of Class B addresses, while plenty of Class C addresses were available. Solution: allocate batches of contiguous Class C addresses to subnets of more than 255 hosts and vice versa. For efficient routing: add mask field to routing tables used to select the portion of an IP address that is compared with the table entry.
Internet Protocols
IP Routing
CIDR Example:
net X: 2048 addresses 194.24.0.0 - 194.24.7.255, mask 255.255.248.0 net Y: 4096 addresses 194.24.16.0 - 194.24.31.255, mask 255.255.240.0 net Z: 1024 addresses 194.24.8.0 - 194.24.11.255, mask 255.255.252.0
address
X Y Z 11000010 00011000 00000000 00000000 11000010 00011000 00010000 00000000 11000010 00011000 00001000 00000000
mask
11111111 11111111 11111000 00000000 11111111 11111111 11110000 00000000 11111111 11111111 11111100 00000000
Internet Protocols
IP Version 6 (IPv6)
Adopted in 1994 to face the addressing limitations of IPv4.
Addresses long are 128-bits (~ 3x1038 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.
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.
Dr. Almetwally mostafa 45
Internet Protocols
IP Version 6 (IPv6)
Payload length (16 bits) Version (4 bits) Priority (4 bits) Flow label (24 bits) Next header (8 bits) Hop limit (8 bits)
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. The transmission of packets to multiple hosts using a single address. Deliver a packet to at least one of the hosts subscribed to the relevant address.
Allow implementing of security at the IP level without the need for security-aware implementations of application programs. Internet protocol stack, routers software, and application programs require upgrading to support the migration to IPv6.
Dr. Almetwally mostafa 47
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.
The mobile host is allocated a permanent IP address, corresponding to its home" domain. When the mobile host is roaming:
A home agent runs on a fixed machine in the home domain. A foreign agent correspondingly running on a fixed machine at the temporary domain.
Dr. Almetwally mostafa 48
Internet Protocols
MobileIP
Sender 2. Address of FA returned to sender 4. Subsequent IP packets send to FA directly Mobile host MH
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 rerouted, 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.
Dr. Almetwally mostafa 50
Internet Protocols
TCP and UDP
TCP and UDP provide the communication capabilities of Internet in a useful form for application programs.
TCP and UDP are transport protocols that accomplish process-to-process communication by the use of ports.
Port numbers are used for addressing messages to processes within a particular computer and are valid only within that computer. UDP (User Datagram Protocol)
Internet Protocols
TCP and UDP
UDP (User Datagram Protocol) cont.
Transmit messages of up to 64 bytes in size with minimal additional costs and delays above IP transmission:
No setup costs. No administrative acknowledgement messages.
Dr. Almetwally mostafa 52
Internet Protocols
TCP and UDP
TCP (Transport Control Protocol)
The sending process divides the data stream into a sequence of data segments and transmits them as IP packets:
Each TCP segment is attached with a sequence number.
Internet Protocols
TCP and UDP
TCP (Transport Control Protocol) cont.
A segment acknowledgements system is used to control the flow of stream between the sender and receiving processes:
The receiver sends from time to time an acknowledgement to the sender giving the sequence number of the highest successfully received segment. Acknowledgements are carried in the normal data segments if there is a reverse flow of data. If any segment is not acknowledged within a specified timeout the sender retransmits it.
The incoming buffer at the receiver is used to balance the flow between the sender and the receiver:
The buffer may overflow if the receive operations more slowly than the send operations. Incoming segments are dropped when the buffer is overflowed. The sender is obliged to retransmit that dropped segments.
Dr. Almetwally mostafa 54
Internet Protocols
Domain Names
The Internet supports a scheme of symbolic domain names for hosts and networks because IP addresses are not very memorable for human users. The domain name is represented in a hierarchical fashion designed to reflect the organizational hierarchy and independent of the physical arrangement of the Internet (location transparency). In order for communication to take place a domain name must be translated into an IP address. The translation of domain names is carried out using the Domain Name Service (DNS). DNS is implemented as a server process can be run on host computers anywhere in the Internet.
Dr. Almetwally mostafa 55
Internet Protocols
Domain Names
There are at least two DNS servers in each domain and often more. The servers in each domain hold a partial map of the domain name tree below their domain. The domain map tree must consist of all of the domain and host names within its own domain; often it will contain more. Name resolution is carried out recursively from right to left, issuing request to other DNS servers in relevant domains as necessary. The resulting translation is cached at the server handling the original request so that the future requests for the same domain can be resolved without reference to other servers.
Dr. Almetwally mostafa 56
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 organizations policies and forming part of an attack.
Some filtering actions are applicable at the IP or TCP level but others require higher level interpretation of messages.
User control: the organization discriminate between its users by allowing some access to external services but inhibiting others from doing so.
Dr. Almetwally mostafa 57
Internet Protocols
Firewalls
Router/ filter Protected intranet
Internet
web/ftp server
Firewall configuration
Dr. Almetwally mostafa 58