1 / 31

ICS 156: Lecture 2 (part 1)

ICS 156: Lecture 2 (part 1). Today: IP addressing Data link protocols and ARP Notes about lab. IP Addressing. Addressing defines how addresses are allocated and the structure of addresses IPv4 Classful IP addresses (obsolete)

varen
Download Presentation

ICS 156: Lecture 2 (part 1)

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. ICS 156: Lecture 2 (part 1) Today: IP addressing Data link protocols and ARP Notes about lab

  2. IP Addressing • Addressing defines how addresses are allocated and the structure of addresses • IPv4 • Classful IP addresses (obsolete) • Classless inter-domain routing (CIDR) (RFC 854, current standard) • IP Version 6 addresses

  3. What is an IP Address? • An IP address is a unique global address for a network interface. • An IP address uniquely identifies a network location. • Routers forwards a packet based on the destination address of the packet. • Exceptions: • DHCP and NAT (lab 7)

  4. IP Addresses

  5. 32 bits 0x4 0x5 0x00 44 10 9d08 010 0000000000000 2 2 128 0x06 8bff 10 128.143.137.144 128.143.71.21 IP Addresses

  6. An IP address is often written in dotted decimal notation • Each byte is identified by a decimal number in the range [0..255]: 10000000 10001111 10001001 10010000 1st Byte = 128 2nd Byte = 143 3rd Byte = 137 4th Byte = 144 128.143.137.144

  7. Structure of an IP address 31 0 • An IP address encodes both a network number (network prefix) and an interface number (host number). • network prefix identifies a network • the host number identifies a specific host (actually, interface on the network). network prefix host number

  8. How long the network prefix is? • Before 1993: The network prefix is implicitly defined (class-based addressing) • After 1993: The network prefix is indicated by a netmask.

  9. Before 1993: Class-based addressing • The Internet address space was divided up into classes: • Class A:Network prefix is 8 bits long • Class B:Network prefix is 16 bits long • Class C:Network prefix is 24 bits long • Class D is multicast address • Class E is reserved

  10. Classful IP Adresses (Until 1993) • Each IP address contained a key which identifies the class: • Class A:IP address starts with “0” • Class B:IP address starts with “10” • Class C:IP address starts with “110” • Class D:IP address starts with “1110” • Class E:IP address starts wit “11110”

  11. The old way: Internet Address Classes

  12. The old way: Internet Address Classes

  13. Problems with Classful IP Addresses • Fast growing routing table size • Each router must have an entry for every network prefix • ~ 221 = 2,097,152 class C networks • In 1993, the size of routing tables started to outgrow the capacity of routers

  14. Other problems with classful addresses • Address depletion for large networks • Class A and Class B addresses were gone • How many class A/B network prefixes can there be? • Limited flexibility for network addresses: • Class A and B addresses are overkill (>64,000 addresses) • Class C address is insufficient (256 addresses)

  15. Classless Inter-domain routing (CIDR) • Network prefix is of variable length • Addresses are allocated hierarchically • Routers aggregate multiple address prefixes into one routing entry to minimize routing table size

  16. CIDR network prefix is variable length 144 137 128 143 • A network mask specifies the number of bits used to identify a network in an IP address. Addr 10000000 10001111 10001001 10010000 255 255 0 255 Mask 11111111 11111111 1111111 00000000

  17. CIDR notation • CIDR notation of an IP address: • 128.143.137.144/24 • /24 is the prefix length. It states that the first 24 bits are the network prefix of the address (and the remaining 8 bits are available for specific host addresses) • CIDR notation can nicely express blocks of addresses • An address block [128.195.0.0, 128.195.255.255] can be represented by an address prefix 128.195.0.0/16 • How many addresses are there in a /x address block? • 2 (32-x)

  18. CIDR hierarchical address allocation 128.0.0.0/8 • IP addresses are hierarchically allocated. • An ISP obtains an address block from a Regional Internet Registry • An ISP allocates a subdivision of the address block to an organization • An organization recursively allocates subdivision of its address block to its networks • A host in a network obtains an address within the address block assigned to the network ISP 128.195.0.0/16 128.1.0.0/16 128.2.0.0/16 University 128.195.4.150 Foo.com Bar.com CS Library 128.195.1.0/24 128.195.4.0/24

  19. Hierarchical address allocation 128.195.4.0 128.195.4.150 128.195.4.255 • ISP obtains an address block 128.0.0.0/8  [128.0.0.0, 128.255.255.255] • ISP allocates 128.195.0.0/16 ([128.195.0.0, 128.195.255.255]) to the university. • University allocates 128.195.4.0/24 ([128.195.4.0, 128.195.4.255]) to the CS department’s network • A host on the CS department’s network gets one IP address 128.195.4.150 128.0.0.0 128.255.255.255 128.196.255.255 128.195.0.0

  20. I 128.0.0.0/8 ISP1 CIDR allows route aggregation You can reach 128.0.0.0/8 via ISP1 • ISP1 announces one address prefix 128.0.0.0./8 to ISP2 • ISP2 can use one routing entry to reach all networks connected to ISP1 128.0.0.0/8 ISP3 ISP1 128.1.0.0/16 128.2.0.0/16 128.195.0.0/16 University Foo.com Bar.com CS Library

  21. CIDR summary • A network prefix is of variable length: a.b.c.d/x • Addresses are hierarchical allocated • Routers aggregate multiple address prefixes into one routing entry to minimize routing table size.

  22. 204.1.0.0/16 ISP1 128.0.0.0/8 ISP1 What problems CIDR does not solve (I) You can reach 128.0.0.0/8 And 204.1.0.0/16 via ISP1 • An multi-homing site still adds one entry into global routing tables ISP3 ISP1 ISP2 128.0.0.0/8 204.0.0.0/8 204.1.0.0/16 Mutil-home.com 204.1.0.0/16

  23. 204.1.0.0/16 ISP1 What problems CIDR does not solve (II) You can reach 128.0.0.0/8 And 204.1.0.0/16 via ISP1 • A site switches provider without renumbering still adds one entry into global routing tables ISP3 ISP1 ISP2 128.0.0.0/8 204.0.0.0/8 128.0.0.0/8 ISP1 204.1.0.0/16 Switched.com 204.1.0.0/16

  24. Global routing tables continue to grow Source: http://bgp.potaroo.net/as6447/

  25. Special IP Addresses • Reserved or (by convention) special addresses: Loopback interfaces • all addresses 127.0.0.1-127.255.255.255 are reserved for loopback interfaces • Most systems use 127.0.0.1 as loopback address • loopback interface is associated with name “localhost” Broadcast address • Host number is all ones, e.g., 128.143.255.255 • Broadcast goes to all hosts on the network • Often ignored due to security concerns • Test / Experimental addresses • 10.0.0.0 - 10.255.255.255 • 172.16.0.0 - 172.31.255.255 • 192.168.0.0 - 192.168.255.255 • Convention (but not a reserved address) Default gateway has host number set to ‘1’, e.g., 128.195.4.1

  26. IP Addressing • Addressing defines how addresses are allocated and the structure of addresses • IPv4 • Classful IP addresses (obsolete) • Classless inter-domain routing (CIDR) (current standard) • IP Version 6 addresses

  27. IPv6 - IP Version 6 • IP Version 6 • Designed to be the successor to the currently used IPv4 • Specification completed in 1994 • Makes improvements to IPv4 (no revolutionary changes) • One (not the only !) feature of IPv6 is a significant increase in of the IP address to 128 bits (16 bytes) • IPv6 will solve – for the foreseeable future – the problems with IP addressing • 1024 addresses per square inch on the surface of the Earth.

  28. IPv6 Header

  29. IPv6 vs. IPv4: Address Comparison • IPv4has a maximum of 232 4 billion addresses • IPv6 has a maximum of 2128 = (232)4  4 billion x 4 billion x 4 billion x 4 billion addresses

  30. Notation of IPv6 addresses • Convention: The 128-bit IPv6 address is written as eight 16-bit integers (using hexadecimal digits for each integer) CEDF:BP76:3245:4464:FACE:2E50:3025:DF12 • Short notation: • Abbreviations of leading zeroes: CEDF:BP76:0000:0000:009E:0000:3025:DF12  CEDF:BP76:0:0:9E :0:3025:DF12 • “:0000:0000:0000” can be written as “::” CEDF:BP76:0:0:FACE:0:3025:DF12  CEDF:BP76::FACE:0:3025:DF12

  31. IPv4 address in IPv6 • IPv6 addresses derived from IPv4 addresses have 96 leading zero bits. • Convention allows to use IPv4 notation for the last 32 bits. ::80:8F:89:90  ::128.143.137.144

More Related