1 / 52

CSE452: C omputer N etworks

CSE452: C omputer N etworks. The Internet Protocol(IP) IPv4 & IPv6 CIDR, Subnet. Host, router network layer functions:. ICMP protocol error reporting router “signaling”. IP protocol addressing conventions datagram format packet handling conventions. Routing protocols path selection

hope-meyers
Télécharger la présentation

CSE452: C omputer N etworks

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. CSE452:Computer Networks The Internet Protocol(IP) IPv4 & IPv6 CIDR, Subnet

  2. Host, router network layer functions: • ICMP protocol • error reporting • router “signaling” • IP protocol • addressing conventions • datagram format • packet handling conventions • Routing protocols • path selection • RIP, OSPF, BGP routing table The Internet Network layer Transport layer: TCP, UDP Network layer Link layer physical layer

  3. IP address: 32-bit identifier for host, router interface interface: connection between host, router and physical link router’s typically have multiple interfaces host may have multiple interfaces IP addresses associated with interface, not host, router 223.1.1.2 223.1.2.1 223.1.3.27 223.1.3.1 223.1.3.2 223.1.2.2 IP Addressing: introduction 223.1.1.1 223.1.2.9 223.1.1.4 223.1.1.3 223.1.1.1 = 11011111 00000001 00000001 00000001 223 1 1 1

  4. IP address: network part (high order bits) host part (low order bits) What’s a network ? (from IP address perspective) device interfaces with same network part of IP address can physically reach each other without intervening router IP Addressing 223.1.1.1 223.1.2.1 223.1.1.2 223.1.2.9 223.1.1.4 223.1.2.2 223.1.3.27 223.1.1.3 LAN 223.1.3.2 223.1.3.1 network consisting of 3 IP networks (for IP addresses starting with 223, first 24 bits are network address)

  5. How to find the networks? Detach each interface from router, host create “islands of isolated networks IP Addressing 223.1.1.2 223.1.1.1 223.1.1.4 223.1.1.3 223.1.7.0 223.1.9.2 223.1.9.1 223.1.7.1 223.1.8.1 223.1.8.0 223.1.2.6 223.1.3.27 Interconnected system consisting of six networks 223.1.2.1 223.1.2.2 223.1.3.1 223.1.3.2

  6. multicast address 1110 network host 110 network 10 host IP Addresses given notion of “network”, let’s re-examine IP addresses: “class-full” addressing: class 1.0.0.0 to 127.255.255.255 A network 0 host 128.0.0.0 to 191.255.255.255 B 192.0.0.0 to 223.255.255.255 C 224.0.0.0 to 239.255.255.255 D 32 bits

  7. IP Addressing • An IP address is a 32-bit sequence of 1s and 0s. • To make the IP address easier to use, the address is usually written as four decimal numbers separated by periods. • This way of writing the address is called the dotted decimal format.

  8. Decimal and Binary Conversion

  9. IPv4 Addressing

  10. Class A, B, C, D, and E IP Addresses

  11. Reserved IP Addresses • Certain host addresses are reserved and cannot be assigned to devices on a network. • An IP address that has binary 0s in all host bit positions is reserved for the network address. • An IP address that has binary 1s in all host bit positions is reserved for the broadcast address.

  12. Network Address

  13. Broadcast Address

  14. Public and Private IP Addresses • No two machines that connect to a public network can have the same IP address because public IP addresses are global and standardized. • Procedure was needed to make sure that addresses were in fact unique. • Originally, an organization known as the Internet Network Information Center (InterNIC) handled this procedure. InterNIC no longer exists and has been succeeded by the Internet Assigned Numbers Authority (IANA). • IANA carefully manages the remaining supply of IP addresses to ensure that duplication of publicly used addresses does not occur. • However, private networks that are not connected to the Internet may use any host addresses, as long as each host within the private network is unique.

  15. Public and Private IP Addresses • RFC 1918 sets aside three blocks of IP addresses for private, internal use. • Addresses that fall in these ranges are not routed on the Internet backbone. Internet router immediately discard private addresses. • Connecting a network using private addresses to the Internet requires translation of the private addresses to public addresses using Network Address Translation (NAT).

  16. host part network part 11001000 0001011100010000 00000000 200.23.16.0/23 IP addressing: CIDR • Classful addressing: • inefficient use of address space, address space exhaustion • e.g., class B net allocated enough addresses for 65K hosts, even if only 2K hosts in that network • CIDR:Classless InterDomain Routing • network portion of address of arbitrary length • address format: a.b.c.d/x, where x is # bits in network portion of address

  17. Why Subnet? • Millions of Addresses Available • Over 16,000,000 • Efficiency • Non-subnetted networks are wasteful • Division of networks not optimal • Smaller Network • Easier to manage • Smaller broadcast domains • So Make the network as small as possible • Divide the network into subnetworks • Borrow some bits from the host add.

  18. What You Need • Understand Address System • Understand Classes of Networks • “Two-Tums” Table • Formulas • Magic Numbers • Subnet Mask • “ANDing” Process

  19. Network Network HOST HOST Dissecting the Address> Classes < • CLASS RANGES: • A: 0 – 127 N . H . H . H • B: 128 – 191 N . N . H . H • C: 192 – 223 N . N . N . H _ _ _ _ _ _ _ _ ._ _ _ _ _ _ _ _ ._ _ _ _ _ _ _ _ ._ _ _ _ _ _ _ _ 1 0 0 0 0 0 0 0 .0 0 0 1 0 0 0 0.0 0 1 0 0 0 0 0. 0 0 0 0 1 1 0 1 (Digital) 128 . 16 . 32 . 13 (Decimal) CLASS B

  20. TWO-TUMS 27 26 25 24 23 22 21 20 MAGIC NUMBERS: 128 64 32 16 8 4 2 1 128 192 224 240 248 252 254 255 SUBNET MASK:

  21. Number of Usable Subnets 2n – 2 20 - 2 = 1 - 2 = -1 21 - 2 = 2 - 2 = 0 22 - 2 = 4 - 2 = 2 23 - 2 = 8 - 2 = 6 Number of Usable Hosts/Subnet 2h-n – 2 28-0- 2 = 256 - 2 = 254 28-1- 2 =? 28-2- 2 = ? 28-3- 2 =? Magic Formulas n = # borrowed bits h = # bits available in host address

  22. Subnet Mask • What is a Subnet Mask? • “Extended Network Prefix” • Indicates extent of the Network numbers 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 1 . 1 1 1 1 1 1 1 1 . _ _ _ _ _ _ _ _ • Why is it needed? • Used by router to determine Network Address • How? • Uses “ANDing” to compare Mask to IP Address

  23. ANDing Process MASK: 11111111.11111111.11111111.00000000 255 . 255 . 255 . 0 IP: 11001000.11001000.11001000.00001010 200 . 200 . 200 . 10 Network Address: 11001000.11001000.11001000.00000000 200 . 200 . 200 . 0

  24. Network Host 19 13 How to Subnet?* Subnet: Borrow _ _ _ _ _ _ _ _ ._ _ _ _ _ _ _ _ ._ _ _ _ _ _ _ _ ._ _ _ _ _ _ _ _ 1 0 0 0 0 0 0 0 .0 0 0 1 0 0 0 0.0 0 1 0 0 0 0 0. 0 0 0 0 1 1 0 1 (Digital) 128 . 16 . 32 . 13 (Decimal)

  25. Easy Example

  26. 5 Subnets Set Up Subnets 200.200.200.10 • What is the Subnet Mask? • What are the Network Addresses? • What is the Broadcast Domain • What IP Addresses are available?

  27. What is the CLASS? How many BITS do we need to borrow? Determine Subnet Mask Determine “Magic Number” Set up Table for IP Address (“Wire”), Range & Broadcast Domain Fill in Table C [Range: 192 – 223]] 5 Subnets 3 [23-2 = 6] 255.255.255.224 Use Subnet Mask # Borrow 3 Bits 32 Wire Range BC Steps….

  28. Table200.200.200.10

  29. Borrow 5 Bits Table200.200.200.10 Class C

  30. Table200.200.200.10 +.32 +.32 Magic Number

  31. Table200.200.200.10 Subnet Mask

  32. Table200.200.200.10

  33. Table200.200.200.10 Broadcast Domain

  34. Table200.200.200.10

  35. Table200.200.200.10

  36. Table200.200.200.10 Reserved for Network Addresses Reserved for Broadcast Addresses

  37. Table200.200.200.10

  38. Set Up Subnets 200.200.200.33 - .62 200.200.200.0 200.200.200.161 - .190

  39. Obtaining an Internet Address • Static addressing • Each individual device must be configured with an IP address. • Dynamic addressing • Reverse Address Resolution Protocol (RARP) • Bootstrap Protocol (BOOTP) • Dynamic Host Configuration Protocol (DHCP) • DHCP initialization sequence • Function of the Address Resolution Protocol • ARP operation within a subnet

  40. A network host needs to obtain a globally unique address in order to function on the Internet. • MAC has only significance only in LAN to identify host. • Router does not use MAC address(?) to forward packets outside LAN. • IP addresses are used for Internet communication. • IP is hierarchical addressing Scheme that allows individual addresses to be associated together and treated together. Obtaining an IP Address

  41. Obtaining an IP Address Regardless of the method chosen no two interfaces can have the same IP address.

  42. Static Assignment of an IP Address • Static assignment works best on small, infrequently changing networks. • The system administrator manually assigns and tracks IP addresses for each computer, printer, or server on the intranet. • Servers should be assigned a static IP address so workstations and other devices will always know how to access needed services. • Other devices that should be assigned static IP addresses are network printers, application servers, and routers.

  43. IP addresses: how to get one? • hard-coded by system admin in a file • Wintel: control-panel->network->configuration->tcp/ip->properties • UNIX: /etc/rc.config • DHCP:Dynamic Host Configuration Protocol: dynamically get address: “plug-and-play” • host broadcasts “DHCP discover” msg • DHCP server responds with “DHCP offer” msg • host requests IP address: “DHCP request” msg • DHCP server sends address: “DHCP ack” msg

  44. DHCP client-server scenario

  45. DHCP discover src : 0.0.0.0, 68 dest.: 255.255.255.255,67 DHCPDISCOVER yiaddr: 0.0.0.0 transaction ID: 654 DHCP client-server scenario arriving client DHCP server: 223.1.2.5 DHCP offer src: 223.1.2.5, 67 dest: 223.1.2.4, 68 DHCPOFFER yiaddrr: 223.1.2.4 transaction ID: 654 DHCP server ID: 223.1.2.5 Lifetime: 3600 secs DHCP request src: 0.0.0.0, 68 dest:: 255.255.255.255, 67 DHCPREQUEST yiaddrr: 223.1.2.4 transaction ID: 655 DHCP server ID: 223.1.2.5 Lifetime: 3600 secs time DHCP ACK src: 223.1.2.5, 67 dest: 223.1.2.4, 68 DHCPACK yiaddrr: 223.1.2.4 transaction ID: 655 DHCP server ID: 223.1.2.5 Lifetime: 3600 secs

  46. DHCP IP Address Management • DHCP allows a host to obtain an IP address dynamically without the network administrator having to set up an individual profile for each device. • All that is required when using DHCP is a defined range of IP addresses on a DHCP server. • As hosts come online, they contact the DHCP server and request an address. • The DHCP server chooses an address and leases it to that host. • With DHCP, the entire network configuration of a computer can be obtained in one message. • The major advantage that DHCP has over BOOTP is that it allows users to be mobile. • This mobility allows the users to freely change network connections from location to location. • The importance to this DHCP advancement is its ability to lease an IP address to a device and then reclaim that IP address for another user after the first user releases it. • This means that DHCP offers a one to many ratio of IP addresses and that an address is available to anyone who connects to the network.

  47. IP addresses: how to get one? Network (network portion): • get allocated portion of ISP’s address space: ISP's block 11001000 00010111 00010000 00000000 200.23.16.0/20 Organization 0 11001000 00010111 00010000 00000000 200.23.16.0/23 Organization 1 11001000 00010111 00010010 00000000 200.23.18.0/23 Organization 2 11001000 00010111 00010100 00000000 200.23.20.0/23 ... ….. …. …. Organization 7 11001000 00010111 00011110 00000000 200.23.30.0/23

  48. 200.23.16.0/23 200.23.18.0/23 200.23.30.0/23 200.23.20.0/23 . . . . . . Hierarchical addressing: route aggregation Hierarchical addressing allows efficient advertisement of routing information: Organization 0 Organization 1 “Send me anything with addresses beginning 200.23.16.0/20” Organization 2 Fly-By-Night-ISP Internet Organization 7 “Send me anything with addresses beginning 199.31.0.0/16” ISPs-R-Us

More Related