1 / 36

Computer Networks (CSE-4711) Lecture-Segment-7- Rest- Network layer on the Internet

Computer Networks (CSE-4711) Lecture-Segment-7- Rest- Network layer on the Internet. Instructor: Sazid Zaman Khan Lecturer, Department of Computer Science and Engineering, IIUC. Mainly from the text Andrew S. Tanenbaum. Internet Protocol Version (IPv4) and IPv6.

ulema
Download Presentation

Computer Networks (CSE-4711) Lecture-Segment-7- Rest- Network layer on the Internet

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. Computer Networks (CSE-4711)Lecture-Segment-7- Rest- Network layer on the Internet Instructor: SazidZaman Khan Lecturer, Department of Computer Science and Engineering, IIUC

  2. Mainly from the text Andrew S. Tanenbaum

  3. Internet Protocol Version (IPv4) and IPv6 • We studied before midterm. So not included in the final syllabus.

  4. Internet Control Message Protocol (ICMP and ARP)-

  5. ARP (Address Resolution Protocol) [from http://www.tildefrugal.net/tech/arp.php] • What is ARP? • ARP stands for Address Resolution Protocol. It is used to associate a layer 3 (Network layer) address (such as an IP address) with a layer 2 (Data Link layer) address (MAC address). • Layer 2 vs. Layer 3 addressing • Lot of confusion with ARP comes from is in regards to how the IP address and the MAC address work together. The IP address is a layer 3 (network layer) address. The layer 2 address is a physical address. It pertains to the actual hardware interface (NIC) in the computer. A computer can have any number of layer 3 addresses but it will only have 1 layer 2 address per LAN interface. The layer 3 packet (addressed to the destination host) will be encapsulated within a layer 2 frame (addressed to the next hop).

  6. ARP operation Step-1 • Now then, your computer (on network 1 with an address of 200.0.1.2) wants to send some data to a computer on network 3 (with an address of 200.0.3.2). We'll assume that none of the info in already cached in an ARP table on any of the machines or routers Your computer will create an IP packet addressed to 200.0.3.2. That packet will be sent to the data link layer where it needs a MAC address. Based on the subnet mask, your computer will know that the destination computer isn't on the same local network. So, your computer will send out an ARP request for the default gateway's MAC address (ie, what's the MAC for 200.0.1.1?). On receiving the MAC address, your computer will send out the IP packet (still addressed to 200.0.3.2) encapsulated within a data link frame that is addressed to the MAC address of router a's interface on network 1 (because routers have more than 1 interface they can have more than 1 MAC address, in this case each router has 2 ethernet interface each with it's own unique MAC address). Router a will receive this frame and send the data portion up to the network layer (layer 3). At the network layer, router a will see that the packet (which is addressed to 200.0.3.2) is not addressed to router a. Router a will look in it's routing table to find out where to send the packet. The routing table will show that network 3 (the closest match to 200.0.3.2) is reachable via network 2.

  7. ARP operation Step-1 • The routing table will also show the IP address for the next hop is 200.0.2.2. Router a will send out an ARP request onto network 2 asking for router b's MAC address (well at least for the interface connected to network 2). On receiving this, router a will send the IP packet (still addressed to 200.0.3.2, nothing's changed here) encapsulated in a data link frame addressed to router b's MAC address. When router b receives this frame it will do the same thing that router a did, it will send the IP packet up to the network layer and see that the packet is not addressed to router b (the packet is still addressed to 200.0.3.2). Router b will then look up in it's routing table for the closest match and see that it is directly connected to network 3, so there isn't a next hop router to send it to. Router b will send out an ARP request to learn the MAC address for 200.0.3.2. When this is received, router b will send out the IP packet (again, this is still addressed to 200.0.3.2) encapsulated within a data link frame that is addressed to the MAC address of the destination computer. The destination computer will see that the data link frame is addressed to it and will pass the IP packet to the network layer. At the network layer, the IP address will also match that of the computer and the data from the IP packet will be passed up to the transport layer. Each layer will examine the header and determine where to pass it up to until eventually, the data reaches the application running on the destination computer that has been waiting for the data.

  8. ARP-Figure

  9. ICMP (Internet Control Message protocol) (from about.com) • ICMP is a network protocol useful in Internet Protocol (IP) network management and administration. ICMP is a required element of IP implementations. ICMP is a control protocol, meaning that it does not carry application data, but rather information about the status of the network itself. ICMP can be used to report: • errors in the underlying communications of network applications • availability of remote hosts • network congestion • Perhaps the best known example of ICMP in practice is the ping utility, that uses ICMP to probe remote hosts for responsiveness and overall round-trip time of the probe messages. ICMP also supports traceroute, that can identify intermediate "hops" between a given source and destination. • Also Known As: Internet Control Message Protocol

  10. Label Switching and MPLS • MPLS (Multiprotocol Label Switching) adds a label in front of each packet, and forwarding is based on the label rather than on the destination address. Making the label an index into an internal table makes finding the correct output line just a matter of table lookup. • Using this technique, forwarding can be done very quickly.

  11. Label Switching and MPLS • The first question to ask is where does the label go? Since IP packets were not designed for virtual circuits, there is no field available for virtual-circuit numbers within the IP header. For this reason, a new MPLS header had to be added in front of the IP header. • On a router-to-router line using PPP as the framing protocol, the frame format, including the PPP, MPLS, IP, and TCP headers, is as shown in Fig. 5-62.

  12. Label Switching and MPLS

  13. Label Switching and MPLS • The generic MPLS header is 4 bytes long and has four fields. Most important is the Label field, which holds the index. The QoS field indicates the class of service. • The S field relates to stacking multiple labels. S bit can be either 0 or 1. MPLS supports multiple labels on the packet, so that the packet may be routed differently throughout a network. These labels are arranged as a stack (First in First Out), forwarding the packet is done based on the label on top of the stack. So, labels are pushed and popped, these pushing and popping are done by LSR (label switched routers). • If S bit is 1, it means more than 1 label are present and if S bit is 0, it means just 1 label is present.

  14. Label Switching and MPLS • The TtL (time to live) field indicates how many more times the packet may be forwarded. It is decremented at each router, and if it hits 0, the packet is discarded. This feature prevents infinite looping in the case of routing instability.

  15. Label Switching and MPLS • Because the MPLS headers are not part of the network layer packet or the data link layer frame, MPLS is to a large extent independent of both layers. • Among other things, this property means it is possible to build MPLS switches that can forward both IP packets and non-IP packets, depending on what shows up. This feature is where the ‘‘multiprotocol’’ in the name MPLS came from. MPLS can also carry IP packets over non-IP networks. • When an MPLS-enhanced packet arrives at a LSR (Label Switched Router), • The label is used as an index into a table to determine the outgoing line to use and also the new label to use.

  16. Forwarding an IP packet through an MPLS network

  17. OSPF (Open Shortest Path First) • The Internet is made up of a large number of autonomous systems (AS). Each AS is operated by a different organization and can use its own routing algorithm inside. For example, the internal networks of companies X, Y, and Z are usually seen as three ASes if all three are on the Internet. All three may use different routing algorithms internally. In this section we will study routing within an AS. In the next one, we will look at routing between ASes. A routing algorithm within an AS is called an interior gateway protocol; an algorithm for routing between ASes is called an exterior gateway protocol.

  18. OSPF operation

  19. OSPF operation

  20. OSPF operation • OSPF operates by abstracting the collection of actual networks, routers, and lines into a directed graph in which each arc is assigned a cost (distance, delay, etc.). It then computes the shortest path based on the weights on the arcs. A serial connection between two routers is represented by a pair of arcs, one in each direction. Their weights may be different. A multiaccess network is represented by a node for the network itself plus a node for each router. The arcs from the network node to the routers have weight 0 and are omitted from the graph. • Figure on previous slide shows the graph representation of the network. Weights are symmetric, unless marked otherwise. What OSPF fundamentally does is represent the actual network as a graph like this and then compute the shortest path from every router to every other router. • Many of the ASes in the Internet are themselves large and nontrivial to manage. OSPF allows them to be divided into numbered areas, where an area is a network or a set of contiguous networks. An area is a generalization of a subnet. Outside an area, its topology and details are not visible.

  21. OSPF operation • Every AS has a backbone area, called area 0. All areas are connected to the backbone so it is possible to go from any area in the AS to any other area in the AS via the backbone. A tunnel is represented in the graph as an arc and has a cost. Each router that is connected to two or more areas is part of the backbone. As with other areas, the topology of the backbone is not visible outside the backbone. • Within an area, each router has the same link state database and runs the same shortest path algorithm. Its main job is to calculate the shortest path from itself to every other router in the area, including the router that is connected to the backbone, of which there must be at least one. A router that connects to two areas needs the databases for both areas and must run the shortest path algorithm for each one separately. • During normal operation, three kinds of routes may be needed: intra-area, interarea, and inter-AS.

  22. OSPF operation • When a router boots, it sends HELLO messages on all of its point-to-point lines and multicasts them on LANs to the group consisting of all the other routers. From the responses, each router learns who its neighbors are. Routers on the same LAN are all neighbors. • OSPF works by exchanging information between adjacent routers, which is not the same as between neighboring routers. In particular, it is inefficient to have every router on a LAN talk to every other router on the LAN. To avoid this situation, one router is elected as the designated router. It is said to be adjacent to all the other routers on its LAN, and exchanges information with them. Neighboring routers that are not adjacent do not exchange information with each other. A backup designated router is always kept up to date to ease the transition should the primary designated router crash and need to replaced immediately.

  23. OSPF opearation • Each router is informed about its neighbors and costs. This information allows each router to construct the graph for its area(s) and compute the shortest path. The backbone area does this too. In addition, the backbone routers accept information from the area border routers in order to compute the best route from each backbone router to every other router. This information is propagated back to the area border routers, which advertise it within their areas. Using this information, a router about to send an inter-area packet can select the best exit router to the backbone.

  24. Border gateway protocol (BGP) • Within a single AS, the recommended routing protocol is OSPF (although it is certainly not the only one in use). Between ASes, a different protocol, BGP(Border Gateway Protocol), is used. A different protocol is needed between ASes because the goals of an interior gateway protocol and an exterior gateway protocol are not the same. All an interior gateway protocol has to do is move packets as efficiently as possible from the source to the destination. It does not have to worry about politics. • Exterior gateway protocol routers have to worry about politics a great deal. For example, a corporate AS might want the ability to send packets to any Internet site and receive packets from any Internet site. However, it might be unwilling to carry transit packets originating in a foreign AS and ending in a different foreign AS, even if its own AS was on the shortest path between the two foreign ASes (''That's their problem, not ours''). 

  25. BGP • Typical policies involve political, security, or economic considerations. A few examples of routing constraints are: • No transit traffic through certain ASes. • Never put Iraq on a route starting at the Pentagon. • Do not use the United States to get from British Columbia to Ontario. • Only transit Albania if there is no alternative to the destination. • Traffic starting or ending at IBM should not transit Microsoft. • Policies are typically manually configured into each BGP router (or included using some kind of script). They are not part of the protocol itself. • From the point of view of a BGP router, the world consists of ASes and the lines connecting them. Two ASes are considered connected if there is a line between a border router in each one

  26. Internet Multicasting • Normal IP communication is between one sender and one receiver. However, for some applications, it is useful for a process to be able to send to a large number of receivers simultaneously. Examples are streaming a live sports event to many viewers, delivering program updates to a pool of replicated servers

  27. Internet Multicasting • The idea behind IP multicasting is to allow a device on an IP internetwork to send datagrams not to just one recipient but to an arbitrary collection of other devices. Multicasting is relatively easy at the data link layer, however, because all the devices can communicate directly.

  28. Internet Multicasting • In contrast, at the network layer, we are connecting together devices that may be quite far away from each other, and must route datagrams between these different networks. This necessarily complicates multicasting when done using IP (except in the special case where we use IP multicasting only between devices on the same data link layer network.) • There are 3 primary functions that must be performed to implement IP multicasting: addressing, group management, and datagram processing / routing.

  29. Multicast Addressing • Multicast Addressing: Special addressing must be used for multicasting. These multicast addresses identify not single devices but rather multicast groups of devices that listen for certain datagrams sent to them. In IPv4, 1/16th of the entire address space was set aside for multicast addresses: that is the Class D block (224.0.0.0 - 239.255.255.255).

  30. Multicast Addressing • Every IP datagram whose destination address starts with "1110" is an IP Multicast datagram. • The remaining 28 bits identify the multicast "group" the datagram is sent to. Following with the previous analogy, you have to tune your radio to hear a program that is transmitted at some specific frequency, in the same way you have to "tune" your kernel to receive packets sent to an specific multicast group. When you do that, it's said that the host has joined that group in the interface you specified.

  31. Multicast Addressing • There are some special multicast groups, say "well known multicast groups", you should not use in your particular applications due the special purpose they are destined to: • 224.0.0.1 is the all-hosts group. If you ping that group, all multicast capable hosts on the network should answer, as every multicast capable host must join that group at start-up on all it's multicast capable interfaces. • 224.0.0.2 is the all-routers group. All multicast routers must join that group on all it's multicast capable interfaces. • 224.0.0.5 the all OSPF routers, etc. • All this special multicast groups are regularly published in the "Assigned Numbers" RFC. • In any case, range 224.0.0.0 through 224.0.0.255 is reserved for local purposes

  32. Multicast group management • Group management encompasses all of the activities required to set up groups of devices. They must be able to dynamically join groups and leave groups, and information about groups must be propagated around the IP internetwork. To support these activities, additional techniques are required. The Internet Group Management Protocol (IGMP) is the chief tool used for this purpose. It defines a message format to allow information about groups and group membership to be sent between devices and routers on the internet.

  33. Multicast Datagram Processing and Routing • This is probably the most complicated: handling and routing datagrams in a multicast environment. There are several issues here: Since we are sending from one device to many devices, we need to actually create multiple copies of the datagram for delivery. Routers must be able to tell when they need to create these copies.  • Routers must use special algorithms to determine how to forward multicast datagrams. Since each one can lead to many copies being sent various places, efficiency is important to avoid creating unnecessary volumes of traffic. 

  34. Mobile IP • Many users of the Internet have mobile computers and want to stay connected when they are away from home and even on the road in between. • In brief, every site that wants to allow its users to roam has to create a helper at the site called a home agent. • When a mobile host shows up at a foreign site, it obtains a new IP address (called a care-of address) at the foreign site. The mobile then tells the home agent where it is now by giving it the care-of address.

  35. Mobile IP • When a packet for the mobile arrives at the home site and the mobile is elsewhere, the home agent grabs the packet and tunnels it to the mobile at the current care-of address. • The mobile can send reply packets directly to whoever it is communicating with, but still using its home address as the source address.

  36. Mobile IP

More Related