Presentation is loading. Please wait.

Presentation is loading. Please wait.

The Network Layer in the Internet

Similar presentations


Presentation on theme: "The Network Layer in the Internet"— Presentation transcript:

1 The Network Layer in the Internet
The Internet can be viewed as a collection of subnetworks or Autonomous Systems (AS). IP (Internet Protocol) hosts the whole Internet together. Communication in the Internet works as follows: The transport layer takes data streams and breaks them up into datagrams. Each datagram is transmitted through the Internet. When all the pieces finally get to the destination machine, they are reassembled by the network layer, which inserts it into the receiving process’ input stream.

2 IP Addresses IP addresses are the most common logical addresses. (Everyone on the Internet has one.) 32 - bit numbers (IP version 4) 32 - bits yields 232 unique numbers 232 = 4,294,967,296 there are over 4 billion possible IPv4 addresses but many are “wasted” due to the allocation scheme

3 IPv6: The Next Generation
The newest version of IP (version 6, or IPng) uses 128 bits, yielding 2128 unique combinations That’s over 340,000,000,000,000,000,000,000,000,000,000,000,000 possible addresses! IPv6 is slowly be integrated in the existing Internet. IPv4’s 32 bits continues to be the dominant form of IP addressing.

4 The IPv4 (Internet Protocol) header.
The IP Header -V4 The IPv4 (Internet Protocol) header.

5 IPv4 Header Format Version – The IP version number, 4.
Header length – The length of the datagram header in 32-bit words. Type of service – Contains five subfields that specify the precedence(priority 0-7), delay, throughput, reliability, and cost desired for a packet. Total length – The length of the datagram in bytes including the header, options, and the appended transport protocol segment or packet. The maximum length is bytes. Identification – An integer that identifies the datagram. DF – Don’t fragment

6 IPv4 header format MF – More Fragments. All fragments except the last one have this bit set. Fragment offset – The relative position of this fragment measured from the beginning of the original datagram in units of 8 bytes. Time to live – How many routers a datagram can pass through. Each router decrements this value by 1 until it reaches 0 when the datagram is discarded. This keeps misrouted datagrams from remaining on the Internet forever. Protocol – The high-level protocol type.

7 IPv4 header format Header checksum – A number that is computed to ensure the integrity of the header values. Source address – The 32-bit IPv4 address of the sending host. Destination address – The 32-bit IPv4 address of the receiving host. Options – A list of optional specifications for security restrictions, route recording, and source routing. Not every datagram specifies an options field. Padding – Null bytes which are added to make the header length an integral multiple of 32 bytes as required by the header length field.

8 The IP Protocol Some of the IP options. 5-54

9 IP Addresses Traditionally, IP addresses were divided into the five categories: A, B, C, D, E. Network numbers are managed by a nonprofit corporation called ICANN (Internet Corporation for Assigned Names and Numbers) to avoid conflicts. Network address, which are 32-bit numbers, are usually written in dotted decimal notation.

10 IP Addresses IP address formats.

11 "Classful" Addressing Class Determination Algorithm
If the first bit is a “0”, it's a class A address and we're done. (Half the address space has a “0” for the first bit, so this is why class A takes up half the address space.) If it's a “1”, continue to step two. If the second bit is a “0”, it's a class B address and we're done. (Half of the remaining non-class-A addresses, or one quarter of the total.) If it's a “1”, continue to step three. If the third bit is a “0”, it's a class C address and we're done. (Half again of what's left, or one eighth of the total.) If it's a “1”, continue to step four. If the fourth bit is a “0”, it's a class D address. (Half the remainder, or one sixteenth of the address space.) If it's a “1”, it's a class E address. (The other half, one sixteenth.)

12 Hosts for Classes of IP Addresses
Class A (24 bits for hosts) * = 16,777,214 maximum hosts Class B (16 bits for hosts) * = 65,534 maximum hosts Class C (8 bits for hosts) * = 254 maximum hosts * Subtracting the network and broadcast reserved address

13 IP Addresses Special IP addresses.

14 A campus network consisting of LANs for various departments.
Subnets A campus network consisting of LANs for various departments.

15 Subnetting Division of a network into subnets
For example, division of a Class B address into several Class C addresses Some of the host IDs are used for creating subnet IDs. Use parts of the host IDs for subnetting purpose A subnet mask is used to facilitate the flow of traffic between the different subnets and the outside network (hops). A hop is the distance a data packet travels form one node to the other

16 Routing of Traffic 140.15.1.0 1 Routing 140.15.0.0 140.15.2.0 2
Outside world 3 Subnets

17 Subnet Configuration ….. Subnet ID 140 15 1 140 15 1 1 140 15 1 254
….. 140 15 1 1 140 15 1 254 First Host ID Last Host ID

18 Subnetting Example Consider the case of a class C address assigned to an organization Subnets can be constructed by allocating part of the higher-order bits of the host ID Assume that three of the higher-order bits of the host ID are to be reserved for that purpose

19 Subnetting Structure 195 175 25 Subnet Mask

20 Sub Net Last Octet Subnet ID 1 00000000 195.175.25.0 2 00100000
3 4 5 6 7 8 Usable Subnets (6)

21 Sample Subnet Division
Router . . 30 hosts per subnet.

22 Overview of the Masking Process
IP address and subnet masks are used for the masking operation The purpose of masking is to identify whether an IP address corresponds to a local host or a remote host The mathematical technique used is known as the ANDing process

23 Subnet Masking Example
Subnet ID: Subnet Mask: Host address Case 1 destination address Case 2 destination address

24 Network Scenario Outside World Local Host 195.175.25.40 Router
Subnet Mask: Host

25 Computing Subnet ID at Startup
Host ID 195 175 25 34 Subnet Mask 255 224 ANDing Result 32 Yields subnet ID.

26 TCP/IP Properties of the Host

27 Masking of Destination Address:Case 1
Destinati-nation IP 195 175 25 40 Subnet Mask 255 224 ANDing Result 32 Yields subnet ID to be that of the local subnet.

28 Case 1 Forwarding of Data Packets
The destination host is local Broadcast for the hardware address of the local host at IP Send information to the local host

29 Masking of Destination Address:Case 2
Destinati-nation IP 195 175 25 67 Subnet Mask 255 224 ANDing Result 64 Yields subnet ID to be that of different subnet.

30 Case 2 Forwarding of Data Packets
The destination host is remote Send information to the gateway The router at the gateway will route the data packet to the appropriate subnet

31 Summary of Transmission and Routing of Data Packets
Subnet at Local Host Router Subnet Mask: Host (Case 1) (Case 2)

32 A class B network subnetted into 64 subnets.
Subnet mask For example, use a 6-bit subnet number and a 10-bit host number. The subnet mask is or /22. Subnet addresses: , , , etc. A class B network subnetted into 64 subnets.

33 Supernetting Subnetting allows an organization to share a single IP network address among multiple physical networks Supernetting (a.k.a. classless addressing) allows the addresses assigned to an organization to span multiple IP network addresses

34 CIDR—Classless InterDomain Routing
For most organizations, a class A network, with 16 million addresses is too big, and a class C network, with 256 addresses is too small. A class B network, with 65,536, is just right. In Internet folklore, this situation is known as the three bears problem. The basic idea behind CIDR, is to allocate the remaining IP addresses in variable-sized blocks, without regard to the classes. If a site needs, say, 2000 addresses, it is given a block of 2048 addresses on a 2048-byte boundary. If need 8000 hosts, then allocate a block of 8192 addresses, i.e., 32 contiguous class C networks.

35 How a large number of IP addresses are wasted using IPv4 address classes?
If a network has slightly more number of hosts than a particular class, then it needs either two IP addresses of that class or the next class of IP address. For example, let use say a network has 300 hosts, this network needs either a single class B IP address or two class C IP addresses. If class B address is allocated to this network, as the number of hosts that can be defined in a class B network is (2^16 - 2), a large number of host IP addresses are wasted. If two class C IP addresses are allocated, as the number of networks that can be defined using a class C address is only (2^21), the number of available class C networks will quickly exhaust. Because of the above two reasons, a lot of IP addresses are wasted and also the available IP address space is rapidly reduced

36 CIDR: classless interdomain routing
Suppose an organization is allocated four contiguous class C networks: , , , Question: how to treat these four contiguous networks as one from outside? Network mask which will mask out one common prefix for these four networks. Question: what is the network mask for these four networks? The common prefix: Therefore, network mask: , i.e., In routing table, instead of putting all four networks entries, just put one entry: /22, where 22 indicates the network mask is 22 bits. CIDR is also called supernetting because it “supernets” multiple networks into one.

37 CDR – Classless InterDomain Routing
A set of IP address assignments. 5-59

38 Private Network Private IP network is an IP network that is not directly connected to the Internet IP addresses in a private network can be assigned arbitrarily. Not registered and not guaranteed to be globally unique Generally, private networks use addresses from the following experimental address ranges (non-routable addresses): Note :Check

39 Private Addresses

40 Network Address Translation (NAT)
NAT is a router function where IP addresses (and possibly port numbers) of IP datagrams are replaced at the boundary of a private network NAT is a method that enables hosts on private networks to communicate with hosts on the Internet NAT is run on routers that connect private networks to the public Internet, to replace the IP address-port pair of an IP packet with another IP address-port pair.

41 Basic operation of NAT NAT device has address translation table

42 NAT – Network Address Translation
Placement and operation of a NAT box.

43 Internet Control Message Protocol
The control messages destination unreachable time exceeded: TTL zero, (wandering to too long) parameter problem: header invalid source quench, too much packets (choke packet) fragmentation required: MTU too small. for information messages: echo request/reply timestamp request/reply Two programs that use the ICMP protocol: ping and traceroute IP invokes ICMP to report errors.

44 Internet Control Message Protocol
The principal ICMP message types. 5-61

45 How a host determines its IP address?
A host determines its IP address during the boot-up process either from a configuration file stored in the local hard disk of the system or using a network protocol like RARP, DHCP, BOOTP from the servers in the network.

46 ARP– The Address Resolution Protocol
ARP: Address Resolution Protocol find out the Ethernet address for an IP address a host broadcast to everyone asking “who owns IP address xxx.xxx.xxx.xxx” The host with that IP address response with its Ethernet address. RARP: Reverse Address Resolution Protocol Find out a host’s IP address. The host broadcast to everyone asking “My Ethernet address is xx:xx:xx:xx:xx:xx, who knows my IP address?” The RARP server looks up the configuration file and reply with its IP address.

47 Dynamic Host Configuration Protocol
BOOTP (Bootstrap Protocol) is a protocol that lets a network user be automatically configured (receive an IP address) and have an operating system booted (initiated) without user involvement. Needs manually configuration (a table to map MAC to IP address) DHCP (Dynamic Host Configuration Protocol) is a communications protocol that lets network administrators manage centrally and automate the assignment of IP addresses in an organization's network.

48 The Interior Gateway Routing Protocol
The Internet is made up of a large number of autonomous systems(AS) Two-level routing: interior gateway protocol – a routing algorithm within an AS. exterior gateway protocol – a routing algorithm between Ases.

49 OSPF – Open Shortest Path First
OSPF supports three kinds of connections and networks: Point-to-pint lines between exactly two routers. Multiaccess networks with broadcasting (e.g., most LANs.) Multiaccess networks without broadcasting (e.g., most packet-switched WANs). OSPF represents the actual network as a graph like this and then compute the shortest path from every router to every other router.

50 OSPF – The Interior Gateway Routing Protocol
(a) An autonomous system. (b) A graph representation of (a).

51 OSPF – The Interior Gateway Routing Protocol
OSPF allows ASes to be divided into numbered areas, where an area is a network or a set of contiguous networks. Every AS has a backbone area (area 0). All areas are connected to the backbone. OSPF distinguishes four classes of routers: Internal routers are wholly within one area. Area border routers connect two or more areas. Backbone routers are on the backbone AS boundary routers talk to routers in other ASes.

52 The relation between ASes, backbones, and areas in OSPF.

53 The five types of OSPF messeges.
5-66

54 BGP – The Exterior Gateway Routing Protocol
BGP (Border Gateway Protocol) is a protocol for exchanging routing information between gateway hosts (each with its own router) in a network of autonomous systems. BGP have been designed to allow many kinds of routing policies to be enforced in the interAS traffic.

55 BGP – The Exterior Gateway Routing Protocol
Exterior gateway protocol routers have to worry about politics (security, billing, etc.) BGP (Border Gateway Protocol) is essentially a distance vector protocol. But keep track of entire path. Discard the route through itself solve count-to-infinity. Select route based on the distance (score). Any route violating polices has infinite score and is discarded as it pass F.

56 BGP – The Exterior Gateway Routing Protocol
(a) A set of BGP routers (b) Information sent to F.

57 Internet Multicating IP supports multicasting, using class D addresses. Two kinds of the group addresses are supported: Permanent groups: : all system on a LAN : all routers on a LAN : all OSPF routers on a LAN : all designated OSPF routers on a LAN Temporary groups must be created before used. The query and response packets sent and received by multicast routers are called IGMP (Internet Group Management Protocol). It has two kinds of packets: query and response. Multicasting routing is done using spanning tree.

58 IPv6

59 The Main IPv6 Header Version. 4 bits. - IPv6 version number.
Traffic Class. 8 bits. - Internet traffic priority delivery value. Flow Label. 20 bits. - Used for specifying special router handling from source to destination(s) for a sequence of packets. Payload Length. 16 bits, unsigned. - Specifies the length of the data in the packet. When set to zero, the option is a hop-by-hop Jumbo payload. Next Header. 8 bits. - Specifies the next encapsulated protocol. The values are compatible with those specified for the IPv4 protocol field.

60 The Main IPv6 Header Hop Limit. 8 bits, unsigned. -For each router that forwards the packet, the hop limit is decremented by 1. When the hop limit field reaches zero, the packet is discarded. This replaces the TTL field in the IPv4 header that was originally intended to be used as a time based hop limit. Source address. 16 bytes. - The IPv6 address of the sending node. Destination address. 16 bytes. -The IPv6 address of the destination node.

61 Figure 27.16 Format of an IPv6 datagram
TCP/IP Protocol Suite

62 Table 27.2 Next header codes
TCP/IP Protocol Suite

63 Table 27.3 Priorities for congestion-controlled traffic
TCP/IP Protocol Suite

64 Table 27.4 Priorities for noncongestion-controlled traffic
TCP/IP Protocol Suite

65 Table 27.5 Comparison between IPv4 and IPv6 packet header
TCP/IP Protocol Suite

66 IPv6 A new notation has been devised for writing 16-byte addresses.
They are written as eight groups of four hexadecimal digits with colons between the groups, like this: 8000:0000:0000:0000:0123:4567:89AB:CDEF Or ::123:4567:89AB:CDEF one or more groups of 16 zero bits can be replaced by a pair of colons IPv4 addresses can be written as a pair of colons

67 Figure IPv6 address TCP/IP Protocol Suite

68 Figure 27.2 Abbreviated address
TCP/IP Protocol Suite

69 Figure 27.3 Abbreviated address with consecutive zeros
TCP/IP Protocol Suite

70 IPv6 – Multicast and Anycast
IPv6 describes rules for three types of addressing: unicast (one host to one other host) anycast (one host to at least one of multiple hosts), and multicast (one host to multiple hosts). The introduction of an "anycast" address provides the possibility of sending a message to the nearest of several possible gateway hosts with the idea that any one of them can manage the forwarding of the packet to others.


Download ppt "The Network Layer in the Internet"

Similar presentations


Ads by Google