Successfully reported this slideshow.
We use your LinkedIn profile and activity data to personalize ads and to show you more relevant ads. You can change your ad preferences anytime.

OSI model (7 layer )


Published on

This an assignment about
OS I model
university of Sri Jayawardenepura (Dept.of.IT)
2nd year 2nd semester
Thank you,

Published in: Technology
  • Be the first to comment

OSI model (7 layer )

  1. 1. Information and Communications Networks Assignment 01 D.M.Chathuranga Dimuthu Dissanayaka Department of Information Technology 2nd year (2011-2012)
  2. 2. THE 7 LAYERS OF OSI Sender Transmit Application Presentation Session Transport Network Data link Physical Receiver LAYER 7 LAYER 6 LAYER 5 LAYER 4 LAYER 3 LAYER 2 LAYER 1 Receive Application Presentation Session Transport Network Data link Physical Question 1 1. Identify and name the device(s) used in Layer 3 of OSI model and describe their functionality With respect to OSI model. The third layer of the OSI Model is network layer. Network layer is most commonly known as the layer where routing takes place. A router's main job is to get packets from one network to another.Routers is that each interface on a router has its own IP address, because each of those interfaces is on a different networks The Network layer knows the address of the neighboring nodes in the network, packages output with the correct network address information, selects routes and quality of service and recognizes and forwards to the Transport layer incoming messages for local host domains. Among existing protocol that generally map to the OSI network layer are the Internet Protocol (IP) part of TCP/IP and NetWare IPX/SPX. Both IP Version 4 and IP Version 6 (IPv6) map to the OSI network layer. As mentioned above, the Internet Protocol works on this layer. This means that when we see an IP address, for example, this IP address maps to the Network layer in the OSI model, in other words only the Network layer deals with or cares about IP addresses in the OSI model. To keep things simple, IP is analyzed under the "Protocols" section.
  3. 3. Devices in the network layer  Router: a specialized network device that determines the next network point to which it can forward a data packet towards the ultimate destination of the packet. Unlike a gateway, it cannot interface different protocols  Bridge router (brouter): a device that combines router and bridge functionality and therefore works on (OSI layers 2 and 3.) Router The network layer moves data from one end point to another by implementing the following functions:       Addressing Routing Encapsulation Fragmentation Error handling Congestion control Addressing Layer 3 address is purely a logical address which is independent of any particular hardware; a MAC address is associated with particular hardware and hardware manufacturers. An example of layer 3 addressing is the Internet Protocol (IP) addressing. An illustration of an IP address can be seen. Routing It is the job of the network layer to move data from one point to its destination. To accomplish this, the network layer must be able to plan a route for the data to traverse. A combination of hardware and software routines accomplishes this task known as routing. When a router receives a packet from a source it first needs to determine the destination address. It does this by removing the headers previously added by the data link layer and reading the address from the predetermined location within the packet as defined by the standard in use.
  4. 4. Encapsulation When a router sends a packet down to the data link layer which then adds headers before transmitting the packet to its next point, this is an example of encapsulation for the data link layer. Like the data link layer, the network layer is also responsible for encapsulating data it receives from the layer above it. In this case it would be from the data received from layer 4, the transport layer. Actually, every layer is responsible for encapsulating data it receives from the layer above it. Even the seventh and last layer, the application layer, because an application encapsulates data it receives from users. Fragmentation When the network layer sends data down to the data link layer it can sometimes run into trouble. That is, depending on what type of data link layer technology is in use the data may be too large. This requires the network layer have the ability to split the data up into smaller chunks which can each be sent to the data link layer in turn. This process is known as fragmentation. Error handling Error handling is an important aspect of the network layer. one source of errors is when routers do not find the destination address in their routing table. In that case, the router needs to generate a destination unreachable error. Another possible source of errors is the TTL (time to live) value of the packet. If the network layer determines that the TTL has reached a zero value, a time exceeded error is generated. Both the destination unreachable error and the time exceeded error messages conform to specific standards as defined in the Internet Control Message Protocol (ICMP). Congestion control Another responsibility of the network layer is congestion control. Any given network device has an upper limit as to the amount of throughput the device can handle. This upper limit is always creeping upward but there are still times when there is just too much data for the device to handle. This is the motivation for congestion control.
  5. 5. 2. Identify and name the devices used in Layer 2 of OSI model and describe their functionality with Respect to OSI model. Devicesin the Data link layer  Switch: a device that allocates traffic from one network segment to certain lines (intended destination(s)) which connect the segment to another network segment.  Bridge: a device that connects multiple network segments along the data link layer  Multilayer switch: a switch which, in addition to switching on OSI layer 2, provides functionality at higher protocol layers.  Bridge router (brouter): a device that combines router and bridge functionality and therefore works on ( OSI layers 2 and 3. Switch Bridge Multilayer switch The data link layer provides functional and procedural methods of transferring data between two points. There are five general functions which the Data Link layer is responsible for. These functions are:      Logical Link Control Media Access Control Data Framing Addressing Error Detection Logical Link Control The Logical Link Control (LLC) is usually considered a sublayer of the Data Link layer (DLL), as opposed to a function of the Data Link layer. This Logical Link Control sublayer is primarily concerned with multiplexing protocols to be sent over Media Access Control (MAC) sublayer. The LLC does this by splitting up the data to be sent into smaller frames and adding descriptive information to these frames, called headers. Media Access Control Like Logical Link Control, the Media Access Control (MAC) is considered a sublayer of the Data Link layer, as opposed to a function of the Data Link layer. Included in this sublayer is what is known as the MAC address. The MAC address provides this sublayer with a unique identifier so that each network access point can communicate with the network. The MAC sublayer is also responsible for the actual access to the network cable, or communication medium.
  6. 6. Data Framing If one were to simply send data out onto the network medium not much would happen. The receiver has to know how, and when, to read the data. This can happen in a number of ways and is the sole purpose of framing. In general terms, framing organizes the data to be transferred and surrounds this data with descriptive information, called headers. What, and how much, information these headers contain is determined by the protocol used on the network, like Ethernet. The structure of a frame adhering to the Ethernet protocol is shown below in Figure 1. Addressing Addressing in layer 2 happens, with the MAC address of the MAC sublayer. It is very important not to confuse this with network or IP addressing. It can be helpful to associate the MAC address with a specific network access point and the network or IP address associated with an entire device Speaking of routers that routers operate in layer 3 not layer 2. Switches and hubs do operate in layer two, and therefore direct data based on layer 2 addressing (MAC addresses) and are unaware of IP or network addressing. Error Detection and Handling Whenever data is sent over any kind of transmission medium, there exists a chance that the data will not be received exactly as it was sent. This can be due to many factors including interference and, in the case of long transmissions, signal attenuation. So, how can a receiver know if the data received is error free? There are several methods that can be implemented to accomplish this. Some of these methods are simple and somewhat effective – others are complicated and very effective.
  7. 7. 3. Describe how a Network hub and a Network switch differ when they operate. (You must identifytheir difference when they are operating. You have to explain in detail from the level of IP packets) A switch is effectively a higher-performance alternative to a hub. People tend to benefit from a switch over a hub if their home network has four or more computers, or if they want to use their home network for applications that generate significant amounts of network traffic, like multiplayer games or heavy music file sharing. In most other cases, home networkers will not notice an appreciable difference between hubs and switch Technically speaking, hubs operate using a broadcast model and switches operate using a virtual circuit model. When four computers are connected to a hub, for example, and two of those computers communicate with each other, hubs simply pass through all network traffic to each of the four computers. Switches, on the other hand, are capable of determining the destination of each individual traffic element and selectively forwarding data to the one computer that actually needs it. By generating less network traffic in delivering messages, a switch performs better than a hub on busy networks. Differencebetween hub and switch. Hubs and switches are different types of network equipment that connect devices. They differ in the way that they pass on the network traffic that they receive. Hubs The term „hub‟ is sometimes used to refer to any piece of network equipment that connects PCs together, but it actually refers to a multiport repeater. This type of device simply passes on all the information it receives, so that all devices connected to its ports receive that information.
  8. 8. Hubs repeat everything they receive and can be used to extend the network. However, this can result in a lot of unnecessary traffic being sent to all devices on the network. Hubs pass on traffic to the network regardless of the intended destination; the PCs to which the packets are sent use the address information in each packet to work out which packets are meant for them. In a small network repeating is not a problem but for a larger, more heavily used network, another piece of networking equipment (such as a switch) may be required to help reduce the amount of unnecessary traffic being generated. Switches Switches control the flow of network traffic based on the address information in each packet. A switch learns which devices are connected to its ports and then forwards on packets to the appropriate port only. This allows simultaneous communication across the switch, improving bandwidth. This switching operation reduces the amount of unnecessary traffic that would have occurred if the same information had been sent from every port (as with a hub). Switches and hubs are often used in the same network; the hubs extend the network by providing more ports, and the switches divide the network into smaller, less congested sections. Use a Hub or Switch In a small network (less than 30 users), a hub (or collection of hubs) can easily cope with the network traffic generated and is the ideal piece of equipment to use for connecting the users. When the network gets larger (about 50 users) may need to use a switch to divide the groups of hubs, to cut down the amount of unnecessary traffic being generated. If there is a hub or switch with Network Utilization LEDs, use the LEDs to view the amount of traffic on the network. If the traffic is constantly high, you may need to divide up the network using a switch. Network with a hub Network with a Switch
  9. 9. 4. Explain CSMA/CD and CSMA/CA protocols and identify the OSI layer that they belong. CSMA/CD: - Carrier sense multiple access with collision detection Carrier Sense Multiple Access with Collision Detection (CSMA/CD) is a media access control method used most notably in local area networking using early Ethernet technology. It uses a carrier sensing scheme in which a transmitting data station detects other signals while transmitting a frame, and stops transmitting that frame, transmits a jam signal, and then waits for a random time interval before trying to resend the frame. CSMA/CD is a modification of pure carrier sense multiple accesses (CSMA). CSMA/CD is used to improve CSMA performance by terminating transmission as soon as a collision is detected, thus shortening the time required before a retry can be attempted. A collision occurs when two or more devices on a network attempt to transmit over a single data channel (e.g., a twisted pair copper wire cable or an optical fiber cable) simultaneously. It is detected by all participating devices, and, after a brief, random, and different interval of time (called a back off delay) has elapsed for each device, the devices attempt to transmit again. If another collision occurs, the time intervals from which the random waiting times are selected are increased step-bystep in a process referred to as exponential back off. CSMA/CD operates at the physical layer is the bottom level in the OSI (open systems interconnection) seven layer model, which is used to standardize and simplify definitions with regard to computer networks
  10. 10. CSMA/CA: -Carrier sense multiple access with collision avoidance Carrier sense multiple access with collision avoidance (CSMA/CA) in computer networking, is a network multiple access method in which carrier sensing is used, but nodes attempt to avoid collisions by transmitting only when the channel is sensed to be "idle". When they do transmit, nodes transmit their packet data in its entirety. It is particularly important for wireless networks, where the collision detection of the alternative CSMA/CD is unreliable due to the hidden node problem. CSMA/CA is a protocol that operates in the Data Link Layer of the OSI model.
  11. 11. Question 2 1. Describe about the IPv4 header by identifying its different fields Internet Protocol version 4 (IPv4) is the fourth version in the development of the Internet Protocol the Internet, and routes most traffic on the Internet. However, a successor protocol. IPv4 is a connectionless protocol for use on packet-switched networks. It operates on a best effort delivery model; in that it does not guarantee delivery, nor does it assure proper sequencing or avoidance of duplicate delivery. These aspects, including data integrity, are addressed by an upper layer transport protocol, such as the Transmission Control Protocol (TCP). Private networks Of the approximately four billion addresses allowed in IPv4, three ranges of address are reserved for use in private networks. These ranges are not routable outside of private networks, and private machines cannot directly communicate with public networks. They can, however, do so through network address translation. Loopback The class “A” network is reserved for loopback. IP packets whose source addresses belong to this network should never appear outside a host. Themodus operandi of this network expands upon that of a loopback interface: IP packets whose source and destination addresses belong to the network of the same loopback interface are returned to that interface; IP packets whose source and destination addresses belong to networks of different interfaces of the same host, one of them being a loopback interface, are forwarded regularly. Header The IPv4 packet header consists of 14 fields, of which 13 are required. The 14th field is optional (red background in table) and aptly named: options. The fields in the header are packed with the most significant byte first (big endian), and for the diagram and discussion, the most significant bits are considered to come first (MSB 0 bit numbering). The most significant bit is numbered 0, so the version field is actually found in the four most significant bits of the first byte, for example.
  12. 12. IPv4 Header Format Offset Octe t s 0 1 0 1 2 3 4 5 6 7 8 9 2 1 1 1 1 1 0 1 2 3 4 1 5 1 6 1 1 1 7 8 9 3 2 2 0 1 Octet Bit 0 0 4 32 8 64 12 96 128 160 2 2 2 2 2 5 6 7 8 9 3 3 0 1 Destination IP Address 20 2 4 Source IP Address 16 2 2 2 3 Options (if IHL > 5) Version IHL DSCP Identification Time To Live ECN Total Length Flags Protocol Fragment Offset Header Checksum Internet Header Length (IHL) The second field (4 bits) is the Internet Header Length (IHL), which is the number of 32-bit words in the header. Since an IPv4 header may contain a variable number of options, this field specifies the size of the header the minimum value for this field is 5, which is a length of 5×32 = 160 bits = 20 bytes. Being a 4-bit value, the maximum length is 15 words (15×32 bits) or 480 bits = 60 bytes.
  13. 13. 2. Describe about the IPv6 header by identifying its different fields IPv6 packet An IPv6 packet is the smallest message entity exchanged via the Internet Protocol across an Internet Protocol version 6 (IPv6) network. Packets consist of control information for addressing and routing, and a payload consisting of user data. The control information in IPv6 packets is subdivided into a mandatory fixed header and optional extension headers. The payload of an IPv6 packet is typically a datagram or segment of the higherlevel Transport Layer protocol, but may be data for an Internet Layer orLink Layer instead. IPv6 packets are typically transmitted over a Link Layer protocol, such as Ethernet which encapsulates each packet in a frame, but this may also be a higher layer tunneling protocol, such asIPv4 when using 6to4 or Teredo transition technologies. Routers do not fragment IPv6 packets, as they do for IPv4. Hosts are "strongly recommended"[1] to implement path MTU discovery to take advantage of MTUs greater than the smallest MTU of 1280 octets. Hosts may use fragmentation to send packets larger than the observed path MTU. Fixed header Offsets Octet 0 1 2 3 Octet Bit 0 1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 0 0 4 32 Payload Length 8 64 Source Address 12 96 16 128 20 160 24 192 Destination Address 28 224 32 256 36 288 Version Traffic Class Flow Label Version (4 bits) Next Header Hop Limit
  14. 14. 3. Find how IPv6 packets are routed over IPv4 networks 6to4 is an Internet transition mechanism for migrating from IPv4 to IPv6, a system that allows IPv6 packets to be transmitted over an IPv4 network without the need to configure explicit tunnels. Special relay servers are also in place that allows 6to4 networks to communicate with native IPv6 networks. 6to4 is especially relevant during the initial phases of deployment to full, native IPv6 connectivity, since IPv6 is not required on nodes between the host and the destination. However, it is intended only as a transition mechanism and is not meant to be used permanently. 6to4 may be used by an individual host, or by a local IPv6 network. When used by a host, it must have a global IPv4 address connected, and the host is responsible for encapsulation of outgoing IPv6 packets and de capsulation of incoming 6to4 packets. If the host is configured to forward packets for other clients, often a local network, it is then a router.
  15. 15. Most IPv6 networks use auto configuration, which requires the last 64 bits for the host. The first 64 bits are the IPv6 prefix. The first 16 bits of the prefix are always 2002: the next 32 bits are the IPv4 address, and the last 16 bits of the prefix are available for addressing multiple IPv6 subnets behind the same 6to4 router. Since the IPv6 hosts using auto configuration already have determined the unique 64 bit host portion of their address, they must simply wait for a Router Advertisement indicating the first 64 bits of prefix to have a complete IPv6 address. A 6to4 router will know to send an encapsulated packet directly over IPv4 if the first 16 bits are 2002, using the next 32 as the destination, or otherwise send the packet to a wellknown relay server, which has access to native IPv6. 6to4 does not facilitate interoperation between IPv4-only hosts and IPv6-only hosts. 6to4 is simply a transparent mechanism used as a transport layer between IPv6 nodes. Due to the high levels of misconfigured hosts and poor performance observed, an advisory about how 6to4 should be deployed was published in August 2011. Address block allocation 6to4 address For any 32-bit global IPv4 address that is assigned to a host, a 48-bit 6to4 IPv6 prefix can be constructed for use by that host (and if applicable the network behind it) by appending the IPv4 address to 2002: /16. For example the global IPv4 address has the corresponding 6to4 prefix 2002:c000:0204: /48. This gives a prefix length of 48 bits, which leaves room for a 16-bit subnet field and 64 bit host addresses within the subnets. Any IPv6 address that begins with the 2002:/16 prefix (in other words, any address with the first two octets of 2002 hexadecimal) is known as a 6to4 address, as opposed to a native IPv6 address which does not use transition technologies. Note that using a reserved IPv4 address, such as those provided by RFC 1918, is undefined, since these networks are disallowed from being routed on the public Internet. For example, using as the router's WAN address would be invalid since a return packet would not be able to determine the destination IPv4 address of the actual send Routing between 6to4 and native IPv6 To allow hosts and networks using 6to4 addresses to exchange traffic with hosts using "native" IPv6 addresses, "relay routers" have been established. A relay router connects to an IPv4 network and an IPv6 network. 6to4 packets arriving on an IPv4 interface will have their IPv6 payloads routed to the IPv6 network, while packets arriving on the IPv6 interface with a destination address prefix of 2002:/16 will be encapsulated and forwarded over the IPv4 network.
  16. 16. There is a difference between a "relay router" and a "border router" (also known as a "6to4 border router"). A 6to4 border router is an IPv6 router supporting a 6to4 pseudo-interface. It is normally the border router between anIPv6 site and a widearea IPv4 network, where the IPv6 site uses 2002:/16 co-related to the IPv4 address used later on. On the other hand, a "relay router" is a 6to4 router Configured to support transit routing between 6to4 addresses and pure native IPv6 addresses. To allow a 6to4 host to communicate with the native IPv6 Internet, it must have its IPv6 default gateway set to a 6to4 address which contains the IPv4 address of a 6to4 relay router. To avoid the need for users to set this up manually, the anycast address of has been allocated for the purpose of sending packets to a 6to4 relay router. Note that when wrapped in 6to4 with the subnet and hosts fields set to zero this IPv4 address ( becomes the IPv6 address 2002:c058:6301::. To ensure BGP routing propagation, a short prefix of has been allocated for routes pointed at 6to4 relay routers that use this anycast IP address. Providers willing to provide 6to4 service to their clients or peers should advertise the anycast prefix like any other IP prefix, and route the prefix to their 6to4 relay. Packets from the IPv6 Internet to 6to4 systems must be sent to a 6to4 relay router by normal IPv6 routing methods. The specification states that such relay routers must only advertise 2002: /16 and not subdivisions of it to prevent IPv4 routes pollute the routing tables of IPv6 routers. From here they can then be sent over the IPv4 Internet to the destination. For a 6to4 host to have fast and reliable connectivity with a host natively using the IPv6 Internet, both the 6to4 host and the native IPv6 host must have a route to a fast, reliable and correctly configured relay server. The 6to4 host's ISP can ensure that outgoing packets go to such a relay, but they have no control over the relay used for the responses from the native IPv6 host. A variant called IPv6 rapid deployment ("6rd") uses the same basic principles as 6to4 but uses a relay operated by the 6rd user's ISP for traffic in both directions. To achieve this address block allocated by the user's ISP is used instead of 2002:/16. References     