1 / 72

PART IV

NETWORK LAYER. PART IV. Position of Network Layer. Network Layer Duties. Internetworking: Logically connecting heterogeneous networks to look like single network to upper transport and application layers.

vcantrell
Download Presentation

PART IV

An Image/Link below is provided (as is) to download presentation Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author. Content is provided to you AS IS for your information and personal use only. Download presentation by click this link. While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server. During download, if you can't get a presentation, the file might be deleted by the publisher.

E N D

Presentation Transcript


  1. NETWORK LAYER PART IV

  2. Position of Network Layer

  3. Network Layer Duties

  4. Internetworking: Logically connecting heterogeneous networks to look like single network to upper transport and application layers. Addressing: Each device (a computer or a router) over the Internet must have unique and universally accepted address. (chapter 19) Routing: Packet can not choose its route to the destination. The routers connecting LANs and WANs make this decision. (Chapter 19) Packetizing: The network layer encapsulates datagram/segments received from upper layers and makes packets out of them. (Chapter 20) Fragmentation: Each router de-capsulates the IP datagram from the received frame, process it and encapsulates it into another frame. Format and size of the received frame depends on the protocol used by the physical network from which the frame has just arrived. Format and size of the departing frame depends on the protocol used by the physical network to which the frame is going. (Chapter 20) DUTIES of NETWORK LAYER

  5. Chapters Chapter 19 Host-to-Host Delivery Chapter 20 Network Layer Protocols Chapter 21 Unicast and Multicast Routing Protocols

  6. INTERNETWORKS ADDRESSING ROUTING Concepts ROUTING protocols in Chap 21 OBJECTIVES

  7. How can data be exchanged between networks? They need to be connected to make an internetwork. INTERNETWORKS

  8. If a packet arrives at f1 of S1, how to make the right flow decision? MAC address can not help. Figure 19.2Links in an internetwork

  9. Network layer is responsible for host-to-host delivery and for routing the packets through the routers or switches. Uses two universal address: Destination address, source address. Figure 19.3Network Layer in an internetwork

  10. Figure 19.4Network Layer at the Source

  11. Network layer at the switch or router is responsible for routing the packet. When a packet arrives, the router or switch finds the interface from which the packet must be sent. This is done using the routing table. Figure 19.5Network Layer at a Router

  12. Network layer at destination is responsible for address verification; it makes sure that the destination address is same as address of host. Checks to see if the packet is corrupted on transmission. If yes, discards the packet. If the packet is a fragment, wait until all fragments arrive, re-assemble them and pass to transport layer. Figure 19.6Network Layer at the Destination

  13. Figure 19.7Switching

  14. Circuit switching Physical link is dedicated between source and destination Data can be sent as a stream of bits without the need for packetizing. Packet Switching Data are transmitted in discrete units of potentially variable-length blocks called packets. Maximum length of packet is established by the network. At each node, packet is stored before being routed according to the information in its header. Figure 19.7Switching

  15. Relationship between all packets belonging to a message or session is preserved. A single route is chosen between sender and receiver at the beginning of the session. When the data are sent, all packets of the transmission travel one after another along that route. The virtual circuit approach needs a call setup to establish a virtual circuit between the source and destination. A call teardown deletes the virtual circuit. After the setup, routing takes place on the virtual circuit identifier. Used in WANs, Frame Relay, and ATM. Virtual Circuit Approach

  16. Each packet is treated independently of all others. Even if one packet is just a piece of a multi-packet transmission, the network treats it as though it existed alone. Packets in this approach are referred to as datagrams. Datagrams may arrive in out of order. No need for call setup and virtual circuit identifiers. Uses source and destination addresses for routing. Figure 19.8Datagram Approach

  17. Figure 19.8Datagram Approach Switching at the Network layer in the Internet is done using datagram approach to packet switching.

  18. Connection-oriented service Source first makes a connection with the destination before sending a packet. When the connection is established, a sequence of packets from the same source to the same destination can be sent one after another. Packets are sent in same path in sequential order. A packet is logically connected to the packet traveling before it and to the packet traveling after it. When all packets of a message have been delivered, the connection is terminated. Routing decision based on source and destination address is done only once. Connectionless service Network layer protocol treats each packet independently, with each packet having no relationship to any other packet. May or may not travel in the same path.

  19. OBJECTIVE 1: INTERNETWORKS Communication at the Network Layer in the Internet is connectionless.

  20. Binary Notation Dotted-Decimal Notation Identifier used in network layer to identify each device connected to the Internet 32-bit binary address that uniquely and universally defines the connection of a host or a router to the Internet. In Internet, no two devices can have the same IP For readability, we divide the IP address into 4 bytes. Dotted-decimal notation: Each byte is separated by dots. IP ADDRESSING

  21. Example 1 Change the following IP addresses from binary notation to dotted-decimal notation. a. 10000001 00001011 00001011 11101111 b. 11111001 10011011 11111011 00001111 Solution We replace each group of 8 bits with its equivalent decimal number (see Appendix B) and add dots for separation: a. 129.11.11.239 b. 249.155.251.15

  22. Example 2 Change the following IP addresses from dotted-decimal notation to binary notation. a. 111.56.45.78 b. 75.45.34.78 Solution We replace each decimal number with its binary equivalent (see Appendix B): a. 01101111 00111000 00101101 01001110 b. 01001011 00101101 00100010 01001110

  23. The address space is divided into five classes: A, B, C, D and E Classful Addressing Fig. 19.10 Finding the class in binary notation

  24. Figure 19.11Finding the Address Class

  25. Example 3 Find the class of each address: a. 00000001 00001011 00001011 11101111 b. 11110011 10011011 11111011 00001111 Solution See the procedure in Figure 19.11. a. The first bit is 0; this is a class A address. b. The first 4 bits are 1s; this is a class E address.

  26. Finding Class in Decimal Notation

  27. Example 4 Find the class of each address: a.227.12.14.87 b.252.5.15.111 c.134.11.78.56 Solution a.The first byte is 227 (between 224 and 239); the class is D. b. The first byte is 252 (between 240 and 255); the class is E. c. The first byte is 134 (between 128 and 191); the class is B.

  28. Unicast: One source to one destination Multicast: One source to a group of destinations. Multicast address can be used only as a destination address, but never as a source address. Class D: Multicasting. Only one block. Class E: Reserved addresses. Only one block. Unicast, Multicast and Reserved Addresses

  29. Netid: Network address. Hostid: Node address Netid, Hostid

  30. First address in the block is used to identify the organization to the rest of the Internet. This address is called the network address; it defines the network of the organization, not individual hosts. The organization is not allowed to use the last address. Blocks in class A

  31. Figure 19.14Blocks in class A

  32. Sixteen blocks are reserved for private address. Figure 19.15Blocks in Class B

  33. Two hundred fifty-six blocks are used for private address. Designed for small organizations with a small number of computers. Figure 19.16Blocks in Class C

  34. Network address is an address that defines the network itself; it cannot be assigned to a host. All hostid bytes are 0s Defines the network to the rest of the Internet. First address in the block Given the network address, we can find the class of the address. Figure 19.17Network Address

  35. Example 5 Given the address 23.56.7.91, find the network address. Solution The class is A. Only the first byte defines the netid. We can find the network address by replacing the hostid bytes (56.7.91) with 0s. Therefore, the network address is 23.0.0.0.

  36. Example 6 Given the address 132.6.17.85, find the network address. Solution The class is B. The first 2 bytes defines the netid. We can find the network address by replacing the hostid bytes (17.85) with 0s. Therefore, the network address is 132.6.0.0.

  37. Example 7 Given the network address 17.0.0.0, find the class. Solution The class is A because the netid is only 1 byte.

  38. A Classful Sample internet

  39. Levels of Hierarchy To reach a host on the Internet, we must first reach the network by using the first portion of the address (netid) Then we must reach the host itself by using the second portion (hostid) IP addresses are designed with two levels of hierarchy. Figure 19.19Levels of hierarchy

  40. Sub-netting We can divide a network into sub-networks while making the world knows only the main network. In sub-netting, a network is divided into several smaller groups with each sub-network (or subnet) having its own sub-network address. SUBNETTING

  41. Figure 19.20A network with three levels of hierarchy (subnetted)

  42. Adding subnetworks creates an intermediate level of hierarchy in the IP addressing system. Now we have three levels: site, subnet, and host. The site is the first level. The second level is the subnet. The host is the third level. Three Level Hierarchy

  43. Hierarchy in Telephone Number

  44. A router routes the packet based on network address and subnetwork address. A router inside a network routes based on subnetwork address but a router outside a network routes based on network address. Router uses the 32-bit mask to identify the network address. Routers outside an organization use a default mask; the routers inside an organization use a subnet mask Default mask 32-bit binary number that gives the network address when ANDed with an address in the block. Mask

  45. Table 19.1 Default masks Netid is retained and hostid sets to 0s.

  46. Example 8 A router outside the organization receives a packet with destination address 190.240.7.91. Show how it finds the network address to route the packet. Solution • The router follows three steps: • The router looks at the first byte of the address to find the class. It is class B. • The default mask for class B is 255.255.0.0. The router ANDs this mask with the address to get 190.240.0.0. • The router looks in its routing table to find out how to route the packet to this destination. Later, we will see what happens if this destination does not exist.

  47. Number of 1s in a subnet mask is more than the number of 1s in the corresponding default mask. In a subnet mask, we change some of the leftmost 0s in the default mask to make a subnet mask. Subnet mask

  48. Example 9 A router inside the organization receives the same packet with destination address 190.240.33.91. Show how it finds the subnetwork address to route the packet. Solution • The router follows three steps: • The router must know the mask. We assume it is /19, as shown in Figure 19.23. • The router applies the mask to the address, 190.240.33.91. The subnet address is 190.240.32.0. • The router looks in its routing table to find how to route the packet to this destination. Later, we will see what happens if this destination does not exist.

  49. Supernetting Although class A and B addresses are almost depleted, class C addresses are still available. In supernetting, an organization can combine several class C blocks to create a larger range of addresses. Several networks are combined to create a supernetwork.

  50. A range of addresses meant a block of addresses in class A, B, or C. What about a small business that needed only 16 addresses? Or a household that needed only two addresses? ISPs provide IP; people connect via dial-up modem, DSL, or cable modem to the ISP. Variable-length blocks: No class boundaries. Mask: Provide a block, it is given the first address and mask. Subnetting Classless InterDomain Routing (CIDR) Classless Addressing

More Related