1 / 38

The Network Layer

The Network Layer. Responsibilities. Addresses Routing Fragmentation and reassembly. Network layer addresses. IP address structure (v4) Class A |0xxxxxxx|yyyyyyyyyyyyyyyyyyyyyyyy| Class B |10xxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy|

Mercy
Télécharger la présentation

The Network Layer

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. The Network Layer

  2. Responsibilities • Addresses • Routing • Fragmentation and reassembly

  3. Network layer addresses • IP address structure (v4) • Class A |0xxxxxxx|yyyyyyyyyyyyyyyyyyyyyyyy| • Class B |10xxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy| • Class C |110xxxxxxxxxxxxxxxxxxxxx|yyyyyyyy| • Multicast|1110xxxxxxxxxxxxxxxxxxxx|yyyyyyyy| • Reserved |1111xxxxxxxxxxxxxxxxxxxx|yyyyyyyy|

  4. IP v4 Class A • Class A |0xxxxxxx|yyyyyyyyyyyyyyyyyyyyyyyy| • 27 networks • each with up to 224 hosts attached • Not quite. Addresses of all 0 or all 1 are special cases and not permitted for general use

  5. IP v4 Class B, C • Class B |10xxxxxxxxxxxxxx|yyyyyyyyyyyyyyyy| • 214 networks • each with up to 216 hosts • - again, not quite. • Class C |110xxxxxxxxxxxxxxxxxxxxx|yyyyyyyy| • 221 networks • each with up to 28 hosts (approximately)

  6. Non unique addresses • Growth of the Internet has placed demands on the address space not anticipated originally. There are more machines than addresses available. • Some machines do not need a unique address, because they do not communicate over the Internet. • Addresses are set aside to be used as desired for those machines: • 10.0.0.0 - 10.255.255.255 (10/8 prefix){Start with 10, use 8 bits} • 172.16.0.0 - 172.31.255.255 (172.16/12 prefix) • 192.168.0.0 - 192.168.255.255 (192.168/16 prefix) Ref. RFC 1918

  7. Network and Host addresses • The network address identifies a network comprised of multiple computers and other devices. • Routers deal with network addresses. • Once the transmission reaches the right network, the local network protocols deal with delivery to the correct machine. • The host address identifies a particular machine-to-network connection.

  8. Subnets • Once upon a time, 254 hosts per network seemed pretty reasonable • That was before PCs • Class C networks are not large enough for most kinds of organizations • Multiple Class C networks in a single organization imposes management overhead

  9. Subnets (2) • Subnetting allows an organization to subdivide a network internally. The internal networks continue to look like a single network from outside the organization • Take some bits from the host part of the IP address and make them part of the network part for internal routing

  10. The subnet mask • Allows the routers to know how many bits are part of the network address and how many are part of the host address • Example: a class B network is subnetted so that 5 bits of the host address are part of the network address: 1 10011001 1101000 00011111 00000110 2 Network Host 3 Network Host 1 = the 32 bit address 2 = network/host division without subnetting 3 = network/host division with subnetting Mask tells which bits to consider part of the network address: 1 in each net address position; 0 elsewhere. Mask for the example is 11111111 11111111 11111000 00000000 Dotted decimal representation: 255 255 248 0

  11. Subnets (3) The old network addresses for some of our machines • Tiger: 153.104. 7.161 • wild: 153.104. 1. 10 • renoir: 153.104. 7.174 • camille: 153.104. 7. 1 • tanner: 153.104. 7.178 • hawk: 153.104. 8. 50 • cassel: 153.104. 7.181 • smurfs: 153.104.24. 32 What class network? • 153 = 10011001 => Class B network Any indication of subnetting?

  12. Current subnetting • Mendel (CSC) • Within VU’s 153.104 • IP address range start 200.1 • IP address range end 203.254 • What is the subnet mask? 255.255.252.0

  13. Subnetting and DSL • Some DSL providers offer static IP addresses in groups of 8 (really?) • What does that mean in terms of IP subnetting? • One possibility: • A class C network is divided among a group of subscribers. Each gets a subnet mask that allows 8 addresses. • Addresses 000 and 111 are not legal IP addresses, though.

  14. IP v6 • 128 bit addresses • written as 8 parts, separated by : • each part is 6 bits, expressed in hex • (no more dotted decimal) • Notes: • space reserved for other address schemes • place to imbed the local link address • multicast, anycast, no broadcast

  15. IP V6 packet layout Flow Label Priority Version Next Header Hop Limit Payload Length Source Address Destination Address Version = 6 Flow label = connect packets from the same source Payload = Packet size in bytes Next header = Next layer up connection (Protocol) Hop Limit = time to live in hops

  16. Routing - Link State overview • Each routing node obtains • the information concerning the immediate neighbors of each other node in the network • Once this information is available, the node constructs a graphical representation of the internet

  17. Routing - Link State details • Enter self into table • Enter data from immediate neighbors • mark this data tentative (T) • For each node marked T in the table, examine the connection information about that node and enter it into the table. • Consider T nodes in order of cost to get there, least costly first • Previously unknown nodes are added • Previously known nodes are examined to see if a better route is found

  18. Routing - Distance Vector • Each router node knows about itself • the distance to itself = 0 • first entry in the routing table • Each router knows about its directly connected neighbors • the distance to a direct neighbor = 1 • next set of entries • Exchanging information with neighbors extends the diameter of the known universe to each router

  19. Our sample network

  20. A special problem What happens if we apply the link state protocol to the following special situation: C A B 1. Determine the routing table entries for each router: A, B, C 2. Assume the connection between B and C is broken 3. Show the steps by which A, B revise their tables This is the “counting to infinity” problem

  21. Border Gateway Protocol • See http://www.cisco.com/univercd/cc/td/doc/cisintwk/ics/icsbgp4.htm • For complete information on BGP • BGP is a link state protocol • BGP is run between autonomous systems, rather than within autonomous systems • Instead of using a cost metric, the BGP messages contain an entire route to the destination

  22. Routing within the VU domain Connection to our service provider 153.104.0.249 153.104.0.254 153.104.0.18 153.104.0.19 Internal routers ... 153.104.0.1 153.104.200.1 153.104.201.1 153.104.202.1 153.104.203.1 How would you fill in the missing numbers?

  23. Routing from Renoir out 1 153.104.200.1 (153.104.200.1) 0.825 ms 0.631 ms 0.590 ms 2 153.104.0.1 (153.104.0.1) 1.024 ms 0.724 ms 0.701 ms 3 153.104.0.254 (153.104.0.254) 1.053 ms 1.382 ms 1.801 ms 4 207.68.14.11 (207.68.14.11) 6.086 ms 9.067 ms 6.155 ms 5 205.171.38.85 (205.171.38.85) 8.062 ms 10.089 ms 12.455 ms 6 nyc-core-03.inet.qwest.net (205.171.17.121) 11.345 ms 10.354 ms 10.395 ms 7 nyc-core-01.inet.qwest.net (205.171.17.82) 10.308 ms 17.639 ms * 8 wdc-core-02.inet.qwest.net (205.171.5.235) 19.174 ms 16.058 ms 17.888 ms 9 wdc-core-03.inet.qwest.net (205.171.24.6) 20.636 ms 20.425 ms 21.594 ms 10 hou-core-01.inet.qwest.net (205.171.5.187) 36.128 ms 43.064 ms 44.321 ms 11 hou-edge-07.inet.qwest.net (205.171.23.14) 37.849 ms 41.555 ms 41.659 ms 12 205.171.36.154 (205.171.36.154) 52.102 ms 50.555 ms 52.055 ms 13 192.12.10.60 (192.12.10.60) 49.084 ms 49.554 ms 46.130 ms 14 ser9-msfc1.gw.utexas.edu (128.83.2.9) 50.420 ms 50.396 ms 46.334 ms 15 128.83.37.18 (128.83.37.18) 49.908 ms 57.542 ms 50.448 ms 16 cs.utexas.edu (128.83.139.9) 50.164 ms 46.581 ms *

  24. traceroute Christie.netlab.csc.villanova.edu traceroute to Christie.netlab.csc.villanova.edu (153.104.203.200), 30 hops max, 38 byte packets 1 pm40.iwaynet.net (198.30.105.210) 117.453 ms 109.666 ms 119.863 ms 2 icg-gw.iwaynet.net (198.30.105.193) 119.719 ms 109.765 ms 139.856 ms 3 oeb7-sl0-0-0c10.columbus.oar.net (199.18.98.37) 129.763 ms 118.785 ms 109.832 ms 4 oeb9-atm1-0.columbus.oar.net (199.18.202.19) 119.748 ms 129.768 ms 109.871 ms 5 208.46.62.49 (208.46.62.49) 139.748 ms 139.751 ms 149.855 ms 6 chi-core-03.inet.qwest.net (205.171.20.33) 129.769 ms 129.782 ms 159.867 ms 7 chi-core-02.inet.qwest.net (205.171.20.29) 159.762 ms 139.801 ms 119.864 ms 8 nyc-core-02.inet.qwest.net (205.171.5.249) 149.749 ms 139.759 ms 149.839 ms 9 205.171.17.118 (205.171.17.118) 139.753 ms 169.741 ms 159.854 ms 10 205.171.38.62 (205.171.38.62) 149.753 ms 159.793 ms 205.171.38.86 (205.171.38.86) 159.861 ms 11 207.68.14.50 (207.68.14.50) 159.701 ms 629.814 ms * 12 153.104.0.249 (153.104.0.249) 179.816 ms 159.723 ms 199.836 ms 13 153.104.0.18 (153.104.0.18) 169.751 ms 159.807 ms 169.850 ms 14 * * 153.104.0.18 (153.104.0.18) 1339.845 ms !H 15 * * 153.104.0.18 (153.104.0.18) 1889.932 ms !H 16 * * 153.104.0.18 (153.104.0.18) 1869.955 ms !H 17 * * * 18 153.104.0.18 (153.104.0.18) 1759.827 ms !H * * 19 153.104.0.18 (153.104.0.18) 1849.827 ms !H Routing to Christie - attempt when netlab was disconnected

  25. Routing - scale • How big is a routing table? • Assume the current IP v4 address scheme • Assume that subnets are internal and not the problem of internet routers • What is the potential load on a router?

  26. Classless Inter-Domain Routing • First pass at hierarchical routing in the Internet • Assign addresses in clumps that are not dependent on the old Class A, B, C scheme. • Much more flexible in the allocation of space and able to serve the needs of users more efficiently.

  27. CIDR Block Prefix Equivalent Class C # of Host Addresses /27 1/8th of a Class C 32 hosts /26 1/4th of a Class C 64 hosts /25 1/2 of a Class C 128 hosts /24 1 Class C 256 hosts /23 2 Class C 512 hosts /22 4 Class C 1,024 hosts /21 8 Class C 2,048 hosts /20 16 Class C 4,096 hosts /19 32 Class C 8,192 hosts /18 64 Class C 16,384 hosts /17 128 Class C 32,768 hosts /16 256 Class C 65,536 hosts (= 1 Class B) /15 512 Class C 131,072 hosts /14 1,024 Class C 262,144 hosts /13 2,048 Class C 524,288 hosts CIDR address assignments CIDR Block Prefix Equivalent Class C # of Host Addresses /27 1/8th of a Class C 32 hosts /26 1/4th of a Class C 64 hosts /25 1/2 of a Class C 128 hosts /24 1 Class C 256 hosts /23 2 Class C 512 hosts /22 4 Class C 1,024 hosts /21 8 Class C 2,048 hosts /20 16 Class C 4,096 hosts /19 32 Class C 8,192 hosts /18 64 Class C 16,384 hosts /17 128 Class C 32,768 hosts /16 256 Class C 65,536 hosts (= 1 Class B) /15 512 Class C 131,072 hosts /14 1,024 Class C 262,144 hosts /13 2,048 Class C 524,288 hosts

  28. A case … Currently, big blocks of addresses are assigned to the large Internet Service Providers (ISPs) who then re-allocate portions of their address blocks to their customers. For example, Pacific Bell Internet has been assigned a CIDR address block with a prefix of /15 (equivalent to 512 Class C addresses or 131,072 host addresses) and typically assigns its customers CIDR addresses with prefixes ranging from /27 to /19. These customers, who may be smaller ISPs themselves, in turn re-allocate portions of their address block to their users and/or customers. However, in the global routing tables all these different networks and hosts can be represented by the single Pacific Bell Internet route entry. In this way, the growth in the number of routing table entries at each level in the network hierarchy has been significantly reduced. Currently, the global routing tables have approximately 35,000 entries. Ref: http://public.pacbell.net/dedicated/cidr.html

  29. Network Address Translation • Primary source for information: RFC1631 • Goal: Stand between the local network environment and the rest of the Internet Local network environment Router The Internet IP address

  30. Why use NAT • Non unique addresses on the internal network work fine for communication that does not involve the global Internet. • To provide communication between a machine with a non unique address and the global Internet, the address must be translated into a globally unique address.

  31. How dynamic NAT works 192.168.0.1 153.104.203.220 153.104.203.220 192.168.0.2 153.104.203.220 192.168.0.3 153.104.203.220 Internal network has non-unique IP addresses NAT box has an address translation table and a set of assigned IP addresses that can be used in the Internet

  32. Internal host external connection 192.168.0.1 192.168.0.3 153.104.203.220 153.104.203.220 192.168.0.2 153.104.203.220 192.168.0.3 153.104.203.220 Internal host requests connection to an external host NAT associates the internal address with a globally unique address and makes the connection with the external host

  33. Response from external host 192.168.0.1 192.168.0.3 153.104.203.220 153.104.203.220 192.168.0.2 153.104.203.220 192.168.0.3 153.104.203.220 Response from external host connected to the right internal host Once there has been an exchange of messages, the table has the mapping needed and further communications are just passed through.

  34. Overloading 192.168.0.1 192.168.0.3 153.104.203.220 Port 23 Port 2000 Port 2001 192.168.0.2 192.168.0.2/25 Port 2002 Port 2003 192.168.0.3 Port 2004 When there are not as many unique IP addresses as internal hosts who may want to access external hosts, add the use of port numbers in the table

  35. Variable length subnet masks • Originally, subnet masks were of a fixed length • Clearly inefficient for an organization that has logical subnets of varying size • Recent revisions of the routing protocol implementations allow variable length subnet masks

  36. Fragmentation, reassembly • Routers connect networks • pass messages from one network to another • Network characteristics are not all the same • maximum packet size varies • Routers must break up large packets to allow them to go into networks where the maximum allowed size is smaller • Question: Where to reassemble?

  37. Reassembly question • Should a router join packets to make larger ones when a fragmented transmission is leaving a network? • Large packets require fewer routing decisions; they are more efficient • Reassembly and then later fragmentation are time consuming; these activities should be minimized.

  38. Network layer summary • Addressing • current most common is IP v4 • subnetting adds flexibility to network sizes • Routing • Link State and Distance Vector • Fragmentation/Reassembly • dealing with the restrictions of individual networks.

More Related