Presentation is loading. Please wait.

Presentation is loading. Please wait.

Prepared by: Eng. Ali H. Elaywe1 Arab Open University - AOU T209 Information and Communication Technologies: People and Interactions Twelfth Session.

Similar presentations


Presentation on theme: "Prepared by: Eng. Ali H. Elaywe1 Arab Open University - AOU T209 Information and Communication Technologies: People and Interactions Twelfth Session."— Presentation transcript:

1 Prepared by: Eng. Ali H. Elaywe1 Arab Open University - AOU T209 Information and Communication Technologies: People and Interactions Twelfth Session

2 Prepared by: Eng. Ali H. Elaywe2  This session is based on the following references: Book N: Networks Part1: Local Area Network (Continued) Part 2: Internet Protocols Reference Material

3 Prepared by: Eng. Ali H. Elaywe3  Ethernet Although the early mainframe and minicomputer systems provided experience of connecting terminals to computers, the first standard for a local area network of autonomous computers was Ethernet, developed by a consortium of companies (Xerox, DEC and Intel) in the mid-1970s  Frame We tend to use packet when talking generally (in the Internet) about Data Communication concepts, using the more precise terms when appropriate, for example, frame when talking about Ethernet Continue Sub-Topic 1.2: Ethernet (The Continue of Part1 of Book N)

4 Prepared by: Eng. Ali H. Elaywe4  Collision If two computers send a data frame at the same time, and they are sharing a common channel, then the signals interfere and the data is corrupted – this is described as a collision A protocol is needed to specify how the computers are to share a common communication channel. This is described as medium access control  Collision Domain Ethernet LANs use a shared channel, which can either be a bus, a star arrangement based around a hub, or combinations of the two. In all cases the shared channel is referred to as a collision domain, an intuitive label reflecting the fact that frames sent within the collision domain can collide with other frames Continue Sub-Sub-Topic 1.2.1: Ethernet Fundamentals

5 Prepared by: Eng. Ali H. Elaywe5  Twisted pair Is one type of medium that can be used to connect computers together Each cable contains four separate wires, one pair (two wires) being used by each computer to send signals. Each send pair then becomes the receive pair for the other computer. So each computer is connected to two pairs, sending frames on one, and receiving frames on the other The name ‘twisted pair’ is derived from the way the wires are twisted together within the cable The ‘twisting’ helps to increase the maximum length that can be used between two computers Continue

6 Prepared by: Eng. Ali H. Elaywe6  Crosstalk When electrical signals are sent over an electrical medium, such as twisted pair, the signal is attenuated (weakened) and distorted by the characteristics of that medium. In particular, signals from one wire can spill over into the other, an effect known as crosstalk. The twisting of the pairs helps to reduce crosstalk Continue

7 Prepared by: Eng. Ali H. Elaywe7  Carrier Sense Multiple Access with Collision Detection (CSMA/CD) The computers in an Ethernet LAN use a number of procedures to increase the likelihood of successful transmission. The Ethernet protocol is called carrier sense multiple access with collision detection (CSMA/CD) and this name encompasses the main procedures ‘Carrier sense’ means that computers do not just transmit at any time. Instead, they first monitor the communication channel to see if it is in use. Once a computer detects that the channel is free, then it can transmit Collision detection:Once a computer in an Ethernet LAN has started to transmit, it monitors the channel, to see whether its frame has collided with a frame from another computer. This is the ‘collision detection’ part of the protocol. If a collision does occur, the computers stop transmitting. Each waits for a short, randomly chosen, time interval (so that they do not simply collide again), and then re-transmits Continue

8 Prepared by: Eng. Ali H. Elaywe8  Repeater A repeater makes a copy of any packet received on one of its ports and sends it out on all other ports.  Propagation delay One characteristic of networks that the CSMA/CD protocol has to overcome is the time it takes for a frame to travel across the network. For example, it takes a finite time for each frame to travel along cables and through repeaters. The time it takes the beginning of a packet to travel between two points is called the propagation delay, often shortened to just delay Continue

9 Prepared by: Eng. Ali H. Elaywe9  Round Trip Delay For the ‘collision detect’ part of the protocol (CSMA/CD) to work properly, it is necessary that the transmitting computer ‘knows’ when it can stop monitoring for a collision. Once this point is reached, it can send the rest of its frame without worrying about collisions In practice, the worst case scenario occurs when a frame transmitted at one end of a collision domain collides with another frame at the farthest end. This is when a transmitted frame from one computer collides with a frame that has just been transmitted by the computer that is the furthest network distance away This is the worst case because this is the longest period of time for a collision to be detected by the transmitting computer, which has to wait for notice of the collision to propagate back. This time period is called the round trip delay, because it is the time it takes for a frame to take a ‘round trip’ to the furthest limit of the network Continue

10 Prepared by: Eng. Ali H. Elaywe10  Slot time Since computers connected to Ethernet only detect collisions while transmitting (or sending) frame So any frame must be able to cover the round trip distance within the time it takes a computer to send the minimum length frame. This period is called the slot time, and is specified at 512 bits (in CSMA/CD protocol ), the number of bits that can be transmitted in the worst- case round-trip delay. The slot time is defined in bits, rather than time because Ethernet can operate at different bit-rates Continue

11 Prepared by: Eng. Ali H. Elaywe11 The round trip delay can be calculated from the minimum frame length (512bits) and the bit rate Delay = number of bits sent / bit rate When designing a network, it is the slot time that determines the maximum distance between any two computers The original choice of slot time was based upon what was believed to be a sensible limit for a collision domain using the cables and repeaters of the time Slot time is less of a determining factor in a modern network; but still has to be met Continue

12 Prepared by: Eng. Ali H. Elaywe12  Activity 14 (reflection) What is the maximum round trip delay for an Ethernet frame operating at 10 Mbit/s? The round trip delay can be calculated from the minimum frame length and the bit rate Delay = number of bits sent / bit rate = 512 / 10 × 10 6 seconds = 51.2 µs You should be able to see that the round trip delay for an Ethernet system operating at 100 Mbit/s is 5.12 µs Continue

13 Prepared by: Eng. Ali H. Elaywe13  Buffer Slot time can be calculated for any network by adding together the delay due to cable runs and network devices within a single collision domain. Devices such as repeaters use a buffer to store frames while new frames are prepared for transmission on all ports. Storage in a buffer introduces a delay Continue

14 Prepared by: Eng. Ali H. Elaywe14  Activity 16 (self-assessment) Why is it that, once a computer has monitored for the slot time, and detected no collisions, it can transmit the rest of its frame without risk of collision? If no collision has been detected in the slot time, then no other computer, even the one at the furthest limits of the collision domain, has tried to transmit. Once this point is reached, then all other computers will detected the transmitting computer’s frame through the carrier-sense (CS) part of the protocol, as by this time the frame will have reached all nodes within the same collision domain Continue

15 Prepared by: Eng. Ali H. Elaywe15  Activity 17 (exploratory) What would happen if this computer was sending a very large frame? Once a computer has passed the slot time without detecting a collision, it has gained control of the channel, and any other computer trying to access the channel will have to wait. In principle this would contradict the equal access principle underlying the ‘multiple access’ part of the protocol You will see later, that for this reason Ethernet frames also have a maximum size Continue

16 Prepared by: Eng. Ali H. Elaywe16  Backoff algorithm In order to minimize repeat collisions, Ethernet uses an algorithm commonly known as the backoff algorithm, where each computer waits a random integral number of slot times before trying again Traffic is a term used to describe the quantity of data on a network over a given time The CSMA/CD protocol ensures that access to the channel is shared fairly amongst the computers within a collision domain Collisions are a normal part of operation, and with the correct operation of the backoff algorithm, frames are normally transmitted successfully However, if the total traffic being carried in a collision domain reaches the point where there are excessive collisions, and the backoff algorithm regularly reaches its limits, then frames will be discarded Continue

17 Prepared by: Eng. Ali H. Elaywe17  Activity 18 (self-assessment) Why does separating the attempts to transmit, of two computers, by at least one slot time ensure they do not collide? The slot time is chosen to allow a frame to propagate across the extremes of a collision domain and back again; called the round trip delay Therefore, if one computer waits for one slot time before beginning to transmit, it is certain to detect if another computer had started to transmit one slot time earlier Continue

18 Prepared by: Eng. Ali H. Elaywe18 Frames that are discarded are not re-transmitted by the Ethernet protocol. As traffic increases towards this critical situation, users may notice delays as their networking software tries to cope with the high collision rate and lost frames  Best effort service Ethernet will tend to share the misery evenly amongst all the computers. This mode of operation, where each computer competes on an even playing field, without rules to ‘guarantee’ delivery is referred to as a best effort service Continue

19 Prepared by: Eng. Ali H. Elaywe19  Activity 20 (self-assessment) How long does it take an Ethernet network operating at 10 Mbit/s to send 64 bytes? 64 bytes = 64 × 8 bits = 512 bits time taken = number of bits to be transferred / bit rate = 512 / 10 × 10 6 seconds = 0.0000512 s = 51.2 µs Continue

20 Prepared by: Eng. Ali H. Elaywe20  Activity 21 (self-assessment) Two computers are joined by 300 metres of cable. If a packet travels along the cable at a speed of 1.77×10 8 m/s, how long will it take for a packet to travel between the two computers? The time taken is the distance traveled divided by the speed. (If you are not sure about this, think of a journey of 120 km at 60 km per hour: it would take 2 hours, which is calculated by dividing 120 by 60.) So time = distance / speed which can be written very briefly as t = d / v where I have written v for speed because mathematicians often use the term ‘velocity’ and hence use v. So here t = 300 / (1.77 ×10 8 )s = 0.00000169 s = 1.69 µs Continue

21 Prepared by: Eng. Ali H. Elaywe21  Activity 22 (self-assessment) A repeater introduces a delay of 3.5 µs. What length of cable is this equivalent to, if the propagation speed is 1.77×10 8 m/s? Here we need to treat the repeater’s delay as a time when otherwise the signal would have been traveling at 1.77 × 10 8 meters per second, and find out how far it would have traveled. This distance can be found from distance = speed × time or d = v × t (Think of a journey of 2 hours at 40 km per hour: you would travel 80 km, which is calculated by multiplying 40 by 2.) Before I can do the calculation I have to convert 3.5 µs into seconds (because the speed is in meters per second): 3.5 × 10): 3.5 × 10 -6 seconds. Then d = 1.77 × 10 8 × 3.5 × 10 -6 m = 619.5 m Continue

22 Prepared by: Eng. Ali H. Elaywe22  Activity 23 (self-assessment) Given a propagation velocity of 1.77×10 8 m/s and a delay of 3.5 µs introduced by each repeater, what is the round trip delay for two computers at either end of a 2500 m link that includes three repeaters? We will do the calculation by finding the one-way time and then doubling it for the round trip. The signal travels 2500 m. Using the formula t = d / v (as in Activity 21) gives t = 2500 / (1.77×10 8 ) s = 0.0000141 s = 14.1 µs The three repeaters add a further 3 × 3.5 µs delay, which is 10.5 µs. So the total one-way time is 14.1 + 10.5 µs = 24.6 µs The round-trip delay is twice this value: 49.2 µs, or just under 50 µs

23 Prepared by: Eng. Ali H. Elaywe23  Framing and Frame The principal function of Ethernet is to transfer data between the computers that it serves. The process of adding extra bits, for the purposes of controlling the transmission of data between computers, is called framing, and the combination of the data and the control bits is called a frame In an Ethernet frame the control information is contained in a header at the beginning of the frame, and includes the address of the computer the data is being sent to – the destination address The Ethernet frame is shown in Figure 1 The frame if it is divided into sections, which are called fields Continue Sub-Sub-Topic 1.2.2: The Ethernet frame

24 Prepared by: Eng. Ali H. Elaywe24 Continue Figure 1 An Ethernet frame

25 Prepared by: Eng. Ali H. Elaywe25  Fields of Ethernet frame The length of each field is given in bits or bytes, and all the fields before the data make up the header. The field after the data is called the trailer A- Preamble field: The first field is called the preamble, and it allows a little time for the electronics of the receiver to recognize that it is receiving a valid frame. For this reason these bits are not considered to be available for carrier sense, and are not usually counted when specifying the frame length Continue

26 Prepared by: Eng. Ali H. Elaywe26 B- Destination and source address fields: The next field gives the destination address, immediately followed by the computer’s own address (the source address) Both fields are of 48 bits and allow any receiver reading the frame to determine whether the frame is intended for it (destination), and where it has come from (source) Addresses in Ethernet are divided into two parts:  1- The first 24 bits are organizationally unique identifiers (OUI) allocated to manufacturers of network interfaces by the IEEE standards association  2- The second 24 bits are used by a manufacturer to identify each of the interfaces they produce. This gives each network interface card a unique address; this is also called the media access control (MAC) address ssment) Continue

27 Prepared by: Eng. Ali H. Elaywe27  Activity 24 (self-assessment) An Ethernet frame has a maximum frame size of 1518 bytes (excluding preamble). How many bits is this? There are 8 bits in a byte, so the maximum sized frame is: 1518 × 8 bits = 12 144 bits  Activity 25 (self-assessment) How many different addresses are available to each manufacturer? Each manufacturer is allocated 24 bits. This provides for a theoretical maximum of 2 24 = 16 777 216 unique addresses Continue

28 Prepared by: Eng. Ali H. Elaywe28 C- Type / length field: The next field is called type/length. The binary value of this field determines whether this is used for type or length:  1- In type mode, the value indicates which type of packet is being carried in the data field. For example, a unique value is used to indicate when an IP packet is carried in the Ethernet frame  2- When the type is not given, then the ‘value’ of the field indicates the length of the data in the data field D- Data field: The data field is the longest field in the frame, and can contain between 46 and 1500 bytes of data The maximum size has been chosen to ensure that each computer in a domain has equal access to the channel After a computer has transmitted one frame, it has to release the channel and compete with any other computer trying to send data. If a computer has more information to transmit than can be contained in the data field of one frame, then it will need to divide this information between a number of frames Continue

29 Prepared by: Eng. Ali H. Elaywe29  Activity 26 (revision) Explain why it is necessary to have a maximum frame size when using the CSMA/CD protocol, if each computer is to have equal access to the channel Once a computer has transmitted for a period in excess of the slot time, the CSMA/CD protocol does not allow another computer to access the channel until the first has finished sending its frame. There has to be a maximum frame size to allow all computers a chance to compete for access to the channel periodically, especially when the network is carrying a lot of traffic Continue

30 Prepared by: Eng. Ali H. Elaywe30 E- Frame check sequence field: The last field in each frame contains a frame check sequence called CRC (cyclic redundancy check) This is a special arithmetic procedure applied to each frame at the transmitter. By applying a similar procedure at the receiver, and comparing it with the contents of this last field, it is possible to determine if any errors have occurred during transmission. If errors are detected the frame is discarded

31 Prepared by: Eng. Ali H. Elaywe31  Activity 27 (revision) (How ??) How does a computer connected to Ethernet by twisted pair detect a collision? Computers using twisted pair cables operate in half-duplex mode. In this configuration frames do not actually collide on the channel, but they do pass each other at some point between the two transmitting computers. Detection that more than one computer has been active is made at the computer, which can sense data on its transmit and receive paths simultaneously. Collisions can only be detected when a computer is sending a frame Continue

32 Prepared by: Eng. Ali H. Elaywe32  Activity 28 (exploratory) If the minimum frame length is 512 bits (64 bytes), why is the minimum data field size only 46 bytes? Looking back at Figure 1 we can see that the data field is the only one with a variable length. We'll add together the fixed parts starting at the left hand end. We do not include the 64 bit preamble as this is used by the receiver to detect a frame. This leaves a 48 bit destination address, a 48 bit source address, a 16 bit length and a 32 bit frame check sequence. This gives a total of: 48 + 48 + 16 + 32 = 144 bits With a slot time of 512 bits, this means the data field must have a minimum length of 512 – 144 = 368 bits = 46 bytes Continue

33 Prepared by: Eng. Ali H. Elaywe33  In this sub-topic we are going to consider when it becomes necessary to extend LANs beyond a single collision domain, and how this can be achieved  However there are limits to how far a simple LAN can grow The two main limits on the growth of a LAN are the 1- physical distances involved and the 2- slot time defined in the Ethernet standard. Computers sharing a collision domain must meet the delay requirements of the slot time. As networks cover larger distances the propagation delay will increase, and new frames will need to be copied by repeaters, as the signals that represent the bits become attenuated or weak Continue Sub-Sub-Topic 1.2.3: Extended LANs

34 Prepared by: Eng. Ali H. Elaywe34  As you will see in the next section, loss of signal can be overcome with repeaters, but delay is less easily dealt with. The impact of delay has become more significant as the speed at which Ethernet operates has increased, from the dominant 10 Mbit/s used on bus technology, to the 100 Mbit/s and 1 Gbit/s systems that are common with hub operation  So Ethernet LANs can operate at different data rates. Each data rate can be carried on different types of cables, including twisted pair, co-axial cable and fibre optic  The use of Ethernet on each medium is identified by a code, 10baseT, for example. This code can be interpreted as 10 Mbit/s (10), operating over twisted pair cable (baseT) Continue

35 Prepared by: Eng. Ali H. Elaywe35  For each media type and bit-rate the IEEE standards organization has laid down guidelines for the maximum delay for cable segments and network devices For example, the standard specifies that a maximum of 100 metres of cable should be used between a computer and a hub using 10baseT Continue

36 Prepared by: Eng. Ali H. Elaywe36  Activity 29 (self-assessment) Each frame contains two addresses. Explain how these are used, within a single collision domain, for computer A to reach B, and for B to know who to send a reply to. Just like the post office mail, each computer has a unique address, and when A sends a frame to B it writes B’s address in the header; this is called the destination address. Every computer receives a copy of the frame, but only B’s address matches the destination address in the header. As well as writing the destination address in the header, A also writes its own address; called the source address. If B wishes to send frames to A then it uses the source address in the header as its destination address Continue

37 Prepared by: Eng. Ali H. Elaywe37  Activity 30 (self-assessment) If the minimum frame length is kept at 512 bits, what is the slot time for 10, 100 and 1000 Mbit/s? The slot time is calculated by working out how long it takes to send 512 bits. At 10 Mbit/s:  slot time = 512 / 10 × 10 6 s = 51.2 µs At 100 Mbit/s:  slot time = 512 / 100 × 10 6 s = 5.12 µs At 1000 Mbit/s:  slot time = 512 / 1000 × 10 6 s = 0.512 µs Continue

38 Prepared by: Eng. Ali H. Elaywe38  A- Extended LAN by using repeaters: A single continuous section of LAN cable, called a segment The LAN can be extended by using repeaters to connect segments as shown in Figure 2 A repeater is a device which regenerates digital signals. Provided the input signal is strong enough for the ‘1’s and ‘0’s to be recognizable, a repeater will re-create a digital signal at its original level. In terms of the OSI Reference Model, a repeater is at the physical layer. However there are limits to the number of repeaters which can be used in a LAN, mainly because they introduce delay Continue

39 Prepared by: Eng. Ali H. Elaywe39 Figure 2(a) shows a simple repeater with just two connections (often called ports). It lies in a length of cable between two computers and regenerates a signal before passing it on Figure 2(b) shows a slightly different sort of repeater. It lies at the ‘hub’ of a star network and not only regenerates a signal coming in from one computer but broadcasts it to all the other computers A hub has a finite number of ports, and this limits the number of computers that can be connected to it. Once the limit is reached, two (or more) hubs can simply be connected together to form a larger network Continue

40 Prepared by: Eng. Ali H. Elaywe40 Continue Figure 2 Extending a LAN using repeaters

41 Prepared by: Eng. Ali H. Elaywe41  B- Using a bridge to divide a LAN: Increasing the size of a LAN by adding more computers usually increases the amount of data being sent over the LAN. This will degrade the performance of the LAN, as it becomes more and more congested This problem can be alleviated by using a bridge, rather than a repeater, to divide the LAN into separate collision domains A bridge filters frames by reading the destination address in the frame. The bridge will only forward a frame onto a connected collision domain if the frame is addressed to a computer on the opposite side of the bridge Continue

42 Prepared by: Eng. Ali H. Elaywe42 In Figure 3, a bridge separates the LAN into three collision domains, each containing three computers. Using a bridge to link collision domains means that a frame sent by a computer to another computer in the same collision domain is not transmitted onto any other collision domains A frame sent from a computer in one collision domain to a computer in another collision domain is only passed onto that collision domain by the bridge. So the amount of data on each collision domain is lower than it would have been without the bridge Bridges are often called switching hubs in commercial literature, which reflects the way a switching matrix is used to interconnect ports. These can have many ports, and can be referred to as multi-port bridges Continue

43 Prepared by: Eng. Ali H. Elaywe43 Continue Figure 3 Using a bridge to divide a LAN

44 Prepared by: Eng. Ali H. Elaywe44 A bridge needs a way of deciding, from the destination address of a frame, whether the frame should be forwarded to a connected collision domain and, in the case of a multi-port bridge, which collision domain to forward it to. This information is stored by the bridge in a forwarding table, which lists the addresses of all the computers on the LAN, and the port number which gives access to that destination address Bridges learn where to forward frames addressed to particular computers by building a forwarding table through the analysis of source and destination addresses The bridge uses the forwarding table to decide where to forward every packet Continue

45 Prepared by: Eng. Ali H. Elaywe45  Activity 31 (self-assessment) Figure 4 shows a bridge connecting three collision domains, using ports A, B and C. Construct a forwarding table, after the bridge has received the following frames: [to 02 : from 01], [to 07 : from 02], [to 05 : from 08], [to 03 : from 02]  The bridge constructs the following forwarding table. It does this by recording the source address against the port number for any packet it receives  Destination, port  01, A  02, A  08, B Continue

46 Prepared by: Eng. Ali H. Elaywe46 Continue Figure 4 Bridge ports

47 Prepared by: Eng. Ali H. Elaywe47  Broadcast and multicast addresses: 1- A broadcast address is recognized by all interfaces. This means that it is received and read by all computers, and forwarded by all bridges 2- A multicast address is a designated address that can be received by many computers  C- Router concepts: Routing is the process of finding a path through a network from source to destination So far we have discussed breaking up LANs into smaller collision domains, but often what is required is to join existing, separate LANs into a single larger one The complex routing of data, often needed in a larger LAN, can be carried out by devices called routers Continue

48 Prepared by: Eng. Ali H. Elaywe48 A router uses information about the structure of the network as a whole, and hence can choose an optimum route for sending frames from one computer to any other on the LAN Router operation is very similar to that of a bridge, and routing decisions are also based upon address information contained in packets that are read by the router  D- Gateways: Routers are also used to interface between a LAN and a WAN. When carrying out this function the routers are sometimes called gateways, reflecting their role of extending the reach of a user beyond the boundary of a LAN In practice the terminology for connecting devices (repeaters, bridges, routers, gateways), is not always consistent, as the combination of functions which can be carried out by a given device may depend on the manufacturer Continue

49 Prepared by: Eng. Ali H. Elaywe49  Relate devices to the layers of the OSI Reference Model: A helpful way to think about these devices is to relate them to the layers of the OSI Reference Model. Repeaters and hubs operate at the physical layer; bridges (or switching hubs) are at the data link layer; routers are network layer devices; gateways can operate at the network layer or above

50 Prepared by: Eng. Ali H. Elaywe50  A landmark ‘Ethernet’ paper published by two Xerox PARC scientists in 1976 can be found in the Module 3 Companion, and its bibliographic reference is: Metcalfe, R. and Boggs, D. (1976): Ethernet: Distributed Packet Switching for Local Computer Networks, Communications of the ACM, volume 19, no 7 Continue Sub-Sub-Topic 1.2.4: A seminal paper on Ethernet

51 Prepared by: Eng. Ali H. Elaywe51  Activity 34 (exploratory) Would you describe the collision domains described in this book as more like a tree or a star?  This Book describes the topology of the networks as more like a star. This is due largely to the use of repeater hubs. This change in topology stems from the high reliability and low cost of hubs, which has negated some of the reliability concerns. It is testimony to the robust design of Ethernet that it has survived this shift in network design

52 Prepared by: Eng. Ali H. Elaywe52  Introduction Ethernet is the protocol for LANs TCP/IP (transmission control protocol and internet protocol) family of protocols is used for the Internet For any part of the journey that crosses a LAN, TCP/IP packets are carried in the data field of Ethernet frames, a process called encapsulation  So why do we need TCP, IP and Ethernet? TCP, IP and Ethernet all occupy different layers in the OSI Reference Model TCP is at the transport layer, IP at the network layer and Ethernet covers both the data-link and physical layers Continue Topic 2: Internet Protocols

53 Prepared by: Eng. Ali H. Elaywe53 Ethernet provides a best-effort delivery across local area networks using the CSMA/CD protocol, which works well within the confines of a LAN, which is after all essentially local, and uses local addressing The internet protocol uses network addresses that cover the entire Internet, and uses these to determine if a packet is local or should be sent on via a router IP still provides a best effort service, but one that extends over the entire global reach of the Internet For many of the applications that are run over the Internet it is not good enough to rely upon a best effort service, after all in a global Internet you are much more likely to encounter network problems TCP does provide a reliable service on top of IP Continue

54 Prepared by: Eng. Ali H. Elaywe54  Activity 38 (exploratory) The header of an Ethernet frame contains various fields dedicated to specific tasks. If I told you that IP uses packets to send data across wide area networks, which two fields from the Ethernet frame would be needed to route an IP packet, and why? The two most important fields for the routing of packets are the destination and source addresses The destination address can be used by a network node to determine where a packet should be delivered The source address can be used by the destination node to address any reply. Both of these are contained in each IP packet, so it is always possible for a packet to find its way across a network Continue

55 Prepared by: Eng. Ali H. Elaywe55  Activity 39 (exploratory) Why do you think packets travelling across the Internet are more likely to encounter network problems, when compared to packets that remain within the boundary of a LAN?  1- The scale:The Internet is enormous, it carries millions of packets, all trying to navigate their way across and between countries. Just the difference in scale between this and a LAN is likely to lead to more problems.  2- Management: A LAN can be planned and managed reasonably accurately. After all, the LAN manager should have a good idea about the traffic generated by all of the users. Also if a user has a particular need, say for extra bandwidth for a short period, they can ask the manager to ensure that this is not a problem. The demands made upon the Internet are much more variable, and different parts of the network are owned and operated by different organizations. Getting an overall picture of traffic demands is much more difficult than within the controlled domain of a LAN

56 Prepared by: Eng. Ali H. Elaywe56  Figure 5 shows three local area networks connecting into a WAN cloud. A cloud is used because the detail contained within it is not needed for our explanation  The principle function of a WAN is to provide communication over very large distances, for example, within a country, between countries or between continents  A group of networks joined together so that they appear as a single network is called an internetwork; hence, the term Internet, which is a global internetwork a backbone is a very high bandwidth communication link/medium to connect together the major nodes of the Internet Continue Sub-Topic 2.1: Wide area network

57 Prepared by: Eng. Ali H. Elaywe57 Continue Figure 5 Wide area network

58 Prepared by: Eng. Ali H. Elaywe58  Router: Each LAN connects to the WAN via a router A router is a switching device very similar to a bridge It operates at the network layer of the OSI model, and makes routing decisions based upon the address information supplied by the packets it receives For example, a router is able to terminate the Ethernet protocol, extract the data and address information (if necessary) and re-package the data in a format suitable for transmission across the WAN

59 Prepared by: Eng. Ali H. Elaywe59  LANs, WANs and Internet etc. use Layered Protocols for data communication purposes  Each layer in a communication process is given a particular responsibility. How it discharges that responsibility is determined by rules of communication, called protocols Continue Sub-Topic 2.2: Protocols

60 Prepared by: Eng. Ali H. Elaywe60  Activity 42 (exploratory) I can think of three elements within a computer which this module has mentioned as necessary to send a word- processed file between two networked computers. Can you list them? 1- Application software 2- Network interface card 3- CSMA/CD software Continue

61 Prepared by: Eng. Ali H. Elaywe61  Activity 43 (self-assessment) You were introduced to the OSI Reference Model in Book M. Describe, in your own words, the function of the four lowest layers. 1- The transport layer provides a service concerned with communication between destination and source 2- The network layer controls the routing of data through the network 3- The data link layer looks after the transmission of data across a link. It checks the data integrity across this link 4- The physical layer deals with the transmission of the bits

62 Prepared by: Eng. Ali H. Elaywe62  TCP, IP and Ethernet each occupy different layers, and when they operate together they illustrate nicely how easy it is for a packet at one layer to be carried by the one below  The technique of packaging the information used in a higher layer into the packets of a lower layer is called encapsulation  Each layer takes data from the layer above, applies protocols, and passes the new packet onto the layer below  The layers build up, one upon another, to form a layered architecture, often called a protocol stack  The way encapsulation works when TCP/IP is encapsulated into an Ethernet frame is shown in Figure 6 Continue Sub-Sub-Topic 2.2.1: Encapsulation

63 Prepared by: Eng. Ali H. Elaywe63 Continue Figure 6 Encapsulation and layers

64 Prepared by: Eng. Ali H. Elaywe64  At the top of the stack Application data is placed in the data field of a TCP packet, and a header is added  At each layer of the protocol stack a new header is added to the packet handed down from the higher layer For example: the TCP packet is encapsulated into an IP packet by adding the IP header to it. The IP packet is encapsulated into an Ethernet frame by adding the Ethernet header, which means that the Ethernet frame now contains a TCP packet encapsulated within an IP packet Once the bottom of the stack is reached, then the Ethernet frame must be sent onto a physical medium, to begin its journey across the network  TCP packets are called segments  IP packets are called datagrams Continue

65 Prepared by: Eng. Ali H. Elaywe65  The IP address The Ethernet frame can be transmitted across a LAN using the CSMA/CD protocol and the address information contained in its header If the destination address is within the same LAN, then the received frame will pass up a protocol stack at the destination in the reverse order, allowing the IP and TCP packets to be unpacked on the way If the packet has to leave the LAN then the Ethernet address will direct it to a router. At this point the IP address, contained in the IP packet, is used to direct the packet toward the destination IP provides a universal addressing scheme We will look at IP addressing again later in the course Continue

66 Prepared by: Eng. Ali H. Elaywe66 Continue Figure 7 Layered architecture

67 Prepared by: Eng. Ali H. Elaywe67  Peer-to-peer communication: The arrangement shown in Figure 7 forms the basis of communication across networks It is always the lowest layer of the layered architecture that deals with the physical transmission, in this case part of the Ethernet protocol However, the function carried out at each layer can be understood as if communication takes place directly between layers at the same level It is usual to refer to this virtual communication between corresponding layers as peer-to-peer communication It must always be remembered that actually data is passed up and down protocol stacks at each end of a communication path, and at intermediate points if the network architecture dictates this Continue

68 Prepared by: Eng. Ali H. Elaywe68  Activity 44 (exploratory) A TCP connection is established from a computer on an Ethernet LAN, which then connects to the destination across a WAN. An intermediate node routes IP packets, and converts between Ethernet and a WAN protocol. Sketch three protocol stacks, showing the layers at source, destination and intermediate locations using IP routing. Explain what happens at each location Figure 8 shows the situation with three stacks, a complete stack at the source and destination, and a shorter stack at the intermediate node Continue

69 Prepared by: Eng. Ali H. Elaywe69 Continue Figure 8 Intermediate node

70 Prepared by: Eng. Ali H. Elaywe70 At the source: A virtual connection needs to be established between the source and destination. TCP packets are passed down through IP to the Ethernet layer. Ethernet then forwards the packets to the edge of the LAN, which in terms of the connection can be called an intermediate node, or location At the intermediate node: Ethernet cannot forward frames any further because it has reached the boundary of the LAN, so the packet has to be passed up the stack to the IP layer. IP addresses are universal, so IP packets can be forwarded towards the destination. However, these IP packets need to be transported across the WAN, so they will be encapsulated by a WAN protocol At the destination each of the layers is unpacked

71 Prepared by: Eng. Ali H. Elaywe71  Just as there is a limit on the size of Ethernet frames, both IP and TCP have limits on the maximum size of a packet  Many factors influence the choice of packet size, of which performance and efficiency are two examples. There is a trade-off between them  If packet size is too small, the communication channel will not be efficiently used because of the overheads incurred by each packet. Overheads are parts of the packets needed for addressing, error checking and other purposes. The ratio between the actual data content of the packet (the data payload) and the total packet size is one way to express the efficiency of channel use Continue Sub-Sub-Topic 2.2.2: Packets: data format

72 Prepared by: Eng. Ali H. Elaywe72  If the packet size is very large then it is necessary to send a large packet even when a much smaller packet could contain the data. Under these circumstances, interactive performance may suffer because long delays occur during the transmission of large packets, and the user must wait longer for a response to a very short message. Another disadvantage of large packets is the impact if an error occurs during transmission. A lot of data has to be re- transmitted because the whole packet has to be sent again  Activity 45 (self-assessment) What is the minimum and maximum data capacity of an Ethernet frame? The minimum size of the data field is 46 bytes, and the maximum is 1500 bytes. These can be read directly off Figure 1 Continue

73 Prepared by: Eng. Ali H. Elaywe73  Activity 46 (exploratory) One way of expressing efficiency is to calculate the proportion of data carried by a packet as a percentage of the overall packet length. Calculate the percentage efficiency of the smallest and largest Ethernet frames. Each Ethernet frame has 6 bytes for source address, 6 for destination address, 2 for type and 4 bytes for frame checking, giving a total of 18 bytes. Knowing that the data field ranges from 46 to 1500 bytes, we can calculate the minimum and maximum frame sizes to be 64 and 1518 bytes respectively. This gives the following efficiencies: Minimum efficiency = 46/64 = 72% Maximum efficiency = 1500/1518 = 98.8% Continue

74 Prepared by: Eng. Ali H. Elaywe74  Example: Let us summarise by looking again at the size of TCP, IP and Ethernet packets as they cross the different layers. We have also used the ‘proper’ names for packets at each of the layers 1- When TCP is used over an Ethernet data link, the maximum TCP segment size is 1460 bytes 2- At the network layer we have IP datagrams, which have a maximum size of 65 535 bytes 3- At the data link layer the information is handled as frames. When the data link layer protocol is Ethernet, the maximum IP datagram size is 1500 bytes

75 Prepared by: Eng. Ali H. Elaywe75  TCP/IP is the main technology underpinning the development of the Internet and of the world wide web  This makes the TCP/IP protocol family of great importance in communication  The TCP and IP protocols are layered, with TCP occupying a higher layer than IP. Together, the TCP and IP layers form the core of the family (see Figure 9) Sub-Topic 2.3: The TCP/IP protocol family Continue

76 Prepared by: Eng. Ali H. Elaywe76 Figure 9 Position of the TCP and IP protocols in the TCP/IP protocol family

77 Prepared by: Eng. Ali H. Elaywe77  A- Duties of the IP Layer: In OSI terms, IP is a network layer protocol, so it is concerned with routing and getting messages across the network It provides no guarantee that it will succeed, although it will do its best. For this reason the service is often described as a ‘best effort’ service The main aim in IP is to have a network system that is flexible (in the sense of being usable with many different types of networks) and robust (in the sense that it should work reasonably well even in the face of breakdowns and damage) Sub-Sub-Topic 2.3.1: TCP and IP Continue

78 Prepared by: Eng. Ali H. Elaywe78  Activity 48 (self-assessment) Discuss whether or not you would consider Ethernet to be a best effort service. I defined Ethernet as a best effort service in Part 1. Remember that if multiple collisions occur, then after 16 attempts the frame is discarded. No action is taken by Ethernet to recover the lost frame, having made its best effort to deliver it Continue

79 Prepared by: Eng. Ali H. Elaywe79  B- Duties of the TCP Layer: In OSI terms, TCP is a transport layer protocol, which sits on top of IP, and is therefore concerned with end-to-end issues rather than routing messages across the network In contrast to IP, TCP provides a reliable service in the sense that it guarantees error-free transportation of messages between source and destination application layers TCP uses two primary mechanisms to provide a reliable service: 1- The first is called sequencing, and just ensures that packets are sorted out into the same order as they were transmitted. This can be achieved by simply numbering the packets, and making sure each packet is passed up the protocol stack in the correct sequence. Sequencing also allows the receiver to spot if any packets are missing. It can then request the transmitter to send these again Continue

80 Prepared by: Eng. Ali H. Elaywe80 2- The second is less obvious, and is called flow control  Flow control regulates the transmission rate of packets, ensuring that they will not arrive at the receiver faster than they can be processed. The information necessary to regulate flow and sequence packets is carried in the header. TCP is designed to be flexible in the sense that it can offer such a service to a wide variety of applications Continue

81 Prepared by: Eng. Ali H. Elaywe81  Concept of Connections: 1- A connection-oriented service: A connection-oriented service requires the user to keep the connection established and active throughout the transmission of information, and then to clear the connection afterwards This need of keeping the connection established throughout the transmission arises from the requirements where a Sender may require the Receiver to send back Acknowledgement messages (often called ack/nack communication) and the sender keeps the connection till the acknowledgment is received or no acknowledgment is received This is usually associated with Reliable services such as the TCP. Packets sent as part of this connection should arrive at the destination in the same order they are sent. Continue

82 Prepared by: Eng. Ali H. Elaywe82 2- A connectionless service does not require the user to keep the connection established and active throughout the transmission of information. Each packet of data is sent and routed independently. This is usually associated with best effort services such as the IP We so often talk about TCP and IP together, that it is easy to forget that they are separate protocols occupying different layers in the reference model  The UDP The user datagram protocol (UDP) is an alternative transport layer protocol UDP is a connectionless protocol for use with applications that do not need flow control or sequencing Figures 9 and 10 show clearly that more than one protocol is available at a layer Continue

83 Prepared by: Eng. Ali H. Elaywe83 Figure 10 Position of the application protocols in the TCP/IP protocol family Continue

84 Prepared by: Eng. Ali H. Elaywe84  Application layer protocols: When you use networked computers in your work, or at home, to connect to Internet service providers you will have direct experience of using application layer protocols that run on top of TCP For example, electronic mail uses the simple mail transfer protocol (SMTP), and web pages are accessed using hypertext transfer protocol (HTTP). When you look at network management in Book NM, you will look at an application layer protocol called simple network management protocol (SNMP)

85 Prepared by: Eng. Ali H. Elaywe85  Both the TCP and IP packets have headers and a data field  The IP header contains source and destination addresses, which have the same function as Ethernet addresses, but cover all IP hosts globally  Each address is unique, and identifies a particular host or computer on the network  The IPv4: Each IPv4 address is 32 bits long, and is conventionally divided into four bytes, which in turn are written as four denary numbers, each separated by a full stop For example, the address ‘10000000 00001010 00000110 00100000’ is 128.10.6.32 IPv4 is still widely used, in spite of a perceived demand for larger address fields, which are incorporated in its successor, IPv6 Sub-Sub-Topic 2.3.2: IP Address Continue

86 Prepared by: Eng. Ali H. Elaywe86  Activity 49 (exploratory) How many unique addresses can be represented by the 32 bit IP address? As each IP address is 32 bits long, there is a theoretical maximum of 2 32 (about 4 billion) different addresses. However, because IP addresses are divided into different classes, it may not be practical to use every possible address Continue

87 Prepared by: Eng. Ali H. Elaywe87  Concept of the Domain Name System (DNS): Consider an e-mail addresses of the form A.Student@oufcnt2.open.ac.uk A.Student@oufcnt2.open.ac.uk This e-mail address can be divided into two parts, local- part@domain-name, separated by the @ symbollocal- part@domain-name The domain name part of an e-mail address is converted into an IP address using special resolver software The information needed to convert from domain name to IP is stored in a series of distributed databases, collectively called the domain name system (DNS), and allows the Internet to be divided up into a hierarchy of domains as illustrated in Figure 11 Continue

88 Prepared by: Eng. Ali H. Elaywe88 Figure 11 Domain structure Continue

89 Prepared by: Eng. Ali H. Elaywe89  Activity 50 (self-assessment) If my computer is connected to a LAN, and the person I am sending my message to is on the Internet, my message will have to be sent to a router using Ethernet. Give a general description of how my e-mail is encapsulated into a sequence of Ethernet frames. Assume TCP and IP are used. My e-mail is sent using a mail application on TCP on IP. If it is a long message it will be split up into many parts, with the whole message being compiled as a string of TCP packets. Each TCP packet is encapsulated in an IP packet, which is then encapsulated in an Ethernet frame Continue

90 Prepared by: Eng. Ali H. Elaywe90  Example (related to Activity 50): If we want to send an e-mail then we should enter the e-mail address, type in my message and finally click on the send icon. Once the domain name has been resolved, my computer has the IP address of the destination server The destination address of the mail server is resolved from the DNS into a 32 bit IP address. This is then passed down through TCP and written in the IP packet header. This is shown in Figure 12. TCP uses a port number to uniquely identify the application using the TCP connection The source IP address is known by the application and can be passed down in a similar way. The IP layer now contains the destination and source addresses Continue

91 Prepared by: Eng. Ali H. Elaywe91 Figure 12 Address handling Continue

92 Prepared by: Eng. Ali H. Elaywe92 If the final delivery of the packet is over the Ethernet, then the IP addresses have to be converted to Ethernet addresses for final delivery. The problem is how to find the Ethernet address of a node when we only know the IP address. The solution is to ask them all, using a TCP protocol called address resolution protocol (ARP). Figure 13 shows how ARP works  Address Resolution Protocol (ARP) role: IP addresses can be discovered using the address resolution protocol (ARP). A packet containing an ARP request message is sent onto the LAN, which when read by a node, asks that node if its IP address matches the one it is looking for. If it does then the matching node sends back a packet containing its Ethernet address, using the source address of the ARP packet as its destination address Continue

93 Prepared by: Eng. Ali H. Elaywe93 Figure 13 Address resolution Continue

94 Prepared by: Eng. Ali H. Elaywe94 1- If the destination and source are on the same LAN, then the computer can return a packet directly to the originating node. This is shown as node A in Figure 13 2- When the destination is beyond the boundary of the LAN, then a router recognizes the IP address as being on the Internet, and returns its address as the Ethernet destination. The router will then forward packets containing the e-mail onto the Internet Continue

95 Prepared by: Eng. Ali H. Elaywe95  Activity 51 (self-assessment) What special type of destination address can the Ethernet frame use to ensure that an ARP message is read by all nodes? A broadcast address is recognized by all interfaces. This means that it is received and read by all computers, and forwarded by all bridges

96 Prepared by: Eng. Ali H. Elaywe96  1) Must read Books NM & E  2) Do associate activities  3) Complete the associate Journal items  4) Contribute to the your tutor group conference  5) Read the TMA03 and prepare questions to be addressed in the next meeting or preferably in the conference Topic 3: Preparation for Next Session


Download ppt "Prepared by: Eng. Ali H. Elaywe1 Arab Open University - AOU T209 Information and Communication Technologies: People and Interactions Twelfth Session."

Similar presentations


Ads by Google