1 / 35

CMPT 371

CMPT 371. Data Communications and Networking Network Layer Internet Protocol (IP) layer Introduction. Internetworking Terms (1). Communications Network: Facility that provides data transfer service between devices attached to the network

jamil
Télécharger la présentation

CMPT 371

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. CMPT 371 Data Communications and Networking Network Layer Internet Protocol (IP) layer Introduction

  2. Internetworking Terms (1) • Communications Network: Facility that provides data transfer service between devices attached to the network • internet: Collection of communications networks interconnected by bridges, level 2 switches (bridges), level 3 switches (routers) • The Internet: The global collection of thousands of individual machines and networks • Intranet: Corporate internet operating within a single organization and using Internet (TCP/IP and http) technology to deliver documents and resources and sometimes connectivity to the Internet

  3. Internetworking Terms (2) • End System (ES): Device attached to one of the networks of an internet • Supports end-user applications or services • Intermediate System (IS): Device used to connect two networks • Performs relaying and routing functions • Provides a communication path between end stations on the connected networks

  4. Internetworking terms (3) • Repeater or Hub: physical/data link layer device • Provide no intelligent forwarding • Forward every frame (unicast, multicast, broadcast) out every port except the port it arrived on • Half duplex, may either transmit or receive

  5. Internetworking Terms (4) • Switch:An IS used to connect two LANs within the data link layer (layer 2) (cut through, store+forward) • both LANS are in the same broadcast domain. Forwards broadcast packets • When powered on acts like a hub. Then builds MAC-address (Ethernet address) forwarding tables by examining the source MAC address in each frame passing through the switch • Forwards based on destination MAC address. • Sends frames out through selected interfaces only • Does not modify the contents of the frames

  6. Internetworking Terms (5) • Router: An IS connecting two (possibly dissimilar) networks within the network layer (Layer 3) • Connects different broadcast domains. Does not forward broadcast packets • Uses internet protocol in each router and end system • Forwards based on IP destination address • Builds/updates forwarding tables based on information gathered using a routing protocol • Sometimes called a layer 3 switch

  7. Internetworking Terms (6) • A host is a source or destination of IP packets. • A host usually has 1 network interface (IPv4 address) • A host does not forward packets it receives from other hosts (act as a router) • Hosts must make some routing decisions • A host must decide which router, directly attached to their own network, to send a particular packet to

  8. Internetworking Terms (7) • A multi-homed host is a host connected to multiple networks. Each network is accessed using a different network interface • A multi homed hostmay forward packets. Packets may arrive at one interface and leave by a different interface • A multi homed hostmayact as a (slow) router. • Forwarding must be enabled on a multi homed host if that multi homed host is to function as a router

  9. Internetworking Requirements • Provides linkage between networks • Provides routing and delivery of data between processes on different networks • Provides accounting services and maintains status information • Provides these services independent of individual network architectures, and must accommodate differences between networks

  10. Main protocol functions in the network layer • Routing • Determining a path through the Internet through a series of hosts/routers to the destination • Addressing/ Forwarding • Sending packets along the determined path • Datagram lifetime • Removing packets that are ‘lost’ or ‘damaged’ • Fragmentation and re-assembly • Dealing with networks having different maximum datagram sizes

  11. Deciding where to go • Two major components are required to determine a path through the internet • Routing: Building a forwarding table for each host and router.The entries in a forwarding table are determined statically (input by administrator) or dynamically based on time varying routing data sent from one router to another • Forwarding: Using the forwarding tables at a single router (IS) to determine packet’s next hop on its path toward the destination..

  12. Routing + forwarding calculations • An IP routing algorithm uses the information supplied by the routing protocol to build, and for dynamic routing update, the forwarding table at each router. The IP routing algorithm will run on each router to update (as necessary) the forwarding table on that router • An IP forwarding algorithm uses the information in the forwarding table to determine which interface of the router to transmit the IP packet through to efficiently deliver the packet to its destination (determines the direction of the best next hop)

  13. Routing protocols • Routing protocols • specify how information about current conditions in the network will be transferred between routers (for the purpose of updating forwarding tables) • Specify how such information will be used to update the receiving routers forwarding table • For dynamic routing (changing over time) • Each router will receive information from other routers via the routing protocol • Each router will use the routing protocol to send information (periodically and/or when the local conditions or the local forwarding table changes) • Each router will use the information supplied to it using the routing protocol to create / update it forwarding tables

  14. Routers • A router is a system that routes and forwards packets • normally has a processor, network interfaces and a high speed switching matrix • will not normally be the source or destination of packets (except routing information packets transmitted using a dynamic routing protocol) • will forward packets using a forwarding (routing) table • For dynamic routing will regularly update the forwarding table • The processor of a router will normally run a protocol stack that includes the network layer and below • The network layer implements the routing protocol and the IP routing algorithm and the IP forwarding algorithm

  15. Direct Delivery • Direct delivery occurs when a datagram is delivered from one host to another on the same physical network. It is not necessary for the packet to pass through a router • If the network specific portion of a packets destination IP address and source IP address are the same then the packet can usually be delivered directly • Direct delivery is also the last step of the delivery of any IP datagram. Once the datagram has reached a router connected to the same physical network as the destination the datagram is encapsulated in a local data link layer packet and directly delivered

  16. Indirect Delivery • If the final destination of the IP datagram is not on the local physical network • The datagram must be encapsulated in a link layer frame and sent to a router connected to the local physical network. • That router will extract the datagram from the link layer frame and use it routing capabilities to find another router on an efficient path to the final destination to send the datagram to. • The router then encapsulates the datagram in a link layer frame and transmits it to the next router. • This process continues until the packet reaches a router directly connected to the same local physical network as the destination host. • The datagram can then be directly delivered to the destination.

  17. Internetworking operation application NETWORK transport Data link host NETWORK physical NETWORK Data link Data link physical physical Multi homed host (router) application application transport transport Data link NETWORK NETWORK physical Data link Data link physical physical NETWORK Data link router application physical transport NETWORK Data link NETWORK physical Data link physical

  18. Using a router application application transport transport network network Data link Data link Network Physical Physical Data link Physical

  19. Using a relay (switch) application application transport transport network network Data link Data link Physical Physical Data link Physical

  20. Encapsulation • Data is transferred in blocks called Protocol Data Units (PDU) • Each PDU contains control information and sometimes data • Control Information includes • Address • Error Detection code (checksums) • Protocol Control • The addition of control information to data is referred to as Encapsulation

  21. Encapsulation PDUs for TCP/IP application Application data transport TCP segment TCP/UDP Application data network IP datagram IP TCP/UDP Application data Data link Ethernet frame Physical Application data IP Ethernet TCP/UDP

  22. Choosing the next hop • If it has been determined that the datagram cannot be delivered directly then • If the datagram originates on the present host then choosing the next hop means choosing a router, attached to the same physical network as the host, that is an acceptable next hop in the path to the final destination • If the datagram has arrived at the router from another host or router then an efficient next hop in the path to the destination must be found • The next hop (for both cases) is determined by consulting a forwarding table. That table will indicate where a datagram destined for a particular IP address should be sent to reach that destination efficiently

  23. Contents of a forwarding table • Each entry in the forwarding table includes • An address prefix (Destination) and mask (Genmask) which indicate a particular network or networks • The IP address of the next router or host along the path to the final destination (called the first hop router or gateway) • The network interface that should be used to transmit the packet so it can reach the next hop address • A metric that can be used to compare the relative “goodness” of alternate routes. • Possible implementation specific additional information

  24. A sample forwarding table

  25. The IP forwarding algorithm • Extract the IP destination address from the packet • If the destination address is on the local network directly deliver the datagram OTHERWISE • For each forwarding table entry check to see if the IP destination address is part of the indicated network. • If it is send the packet through the interface for that network • If there is no match send a routing error back to the source and/or drop the packet

  26. Datagram Lifetime • Datagrams could loop indefinitely • Problems with routing or addressing can cause datagrams to travel in circles or on circuitous paths rather than reach their destination promptly • Consumes resources • Internet protocol may need upper bound on datagram life • Datagram marked with lifetime • Time To Live field in IP • Once lifetime expires, datagram discarded (not forwarded) • Hop count • Decrement time to live on passing through a each router • Time count • Need to know how long since last router

  27. Fragmentation / Reassembly • Different packet sizes for different networks (can be set by administrator) • The data in the PDU must be broken into smaller pieces or fragmented if the PDU is too large for any network it passes through • Results in a possibility that packets get smaller as a datagram is transmitted from its source through the Internet to its destination • The data in the fragmented PDU is reassembled, usually at the receiver. Why not reassemble at IS? • Need large buffers at intermediate routers which may fill and overflow • All fragments must exit the network through same router. Places difficult to define constraints on an otherwise simple dynamic routing forwarding algorithm

  28. Internet addresses • 32 bit global internet (IP) address is used to uniquely identify a particular network interface connected to a particular host as a destination for communication • Each IP address is split into two parts (netid, hostid) to identify the host and the network to which the host is connected • The netid (network address or prefix) identifies the network to which the host belongs. • The hostid identifies the particular host (network interface for a multi homed host)

  29. Addressing: • Each Internet Protocol address (IP address) must be globally applicable and globally unique • Must have global nonambiguity, must uniquely identify the host and interface globally • Must have global applicablity, must be accessible via address from any other node on the Internet • IP addresses are used to route PDU from the destination through ISs to the destination. Routes the PDU through the internet or Internet.

  30. Transmission Modes • Unicast: • uses an address referring to a single system, sending only to that system • Broadcast: • Uses an address indicating all entities within a particular domain or network as recipients of the data • Multicast • uses an address that identifies multiple simultaneous recipients for data

  31. Connectionless Internetworking • Advantages • Flexible and Robust(failure of single router does not cause failure of transmission as for connection orientented system) • Minimal overhead (no connection overhead) • Disadvantages • Delivery not guaranteed • Order of delivery not guaranteed • Reliability is responsibility of next layer up (e.g. TCP, transport layer) • Support for quality of service is difficult • increased probability of congestion

  32. Connection oriented networks • Also need to consider connection management in a circuit switched or virtual circuit type network. • IP (not connection oriented) is not the only available protocol for the network layer. IP grew from the need to transfer information between computers, a task that does not require continuous transmission and is well suited to a datagram network model • Other network layer protocols like ATM, frame relay and X.25 originated in the world of telephony. They were originally designed to carry continuous voice transmission a task more suited to circuit switching or virtual circuit networks. These protocols are connection oriented (do not provide datagram service)

  33. Virtual Circuit networks Do NOT use IP or other connectionless network layer service Have connections that are established within the network layer (not the transport layer) by the network layer protocol Network layer connection oriented service is implemented both by edge systems and routers in the network core. (Not just the end systems as is transport layer connection oriented systems like TCP)

  34. Advantages / Disadvantages • Connection oriented services • Support for quality of service much easier • Delivery susceptible to failure of router in circuit • Path setup overhead • Reduced addressing overhead per connection , identifier shorter than full address but router table space needed for ever connection passing through the router

  35. Desired Transmission Services • IP best effort delivery • Other protocols: Network service model (may include) • Guaranteed delivery • Guaranteed delivery with bounded delay • In order delivery • Guaranteed minimum bandwidth • No packet lost, all packets arrive within a specified host to host delay IF transmission of data uses no more that the minimum bandwidth • Guaranteed maximum jitter • The time delay between packets at the destination will not vary from the time delay between packets at the source by more than the maximum value of jitter

More Related