1 / 70

COMS W4995-1 Lecture 3

COMS W4995-1 Lecture 3. IP Addressing. 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)

angus
Download Presentation

COMS W4995-1 Lecture 3

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. COMS W4995-1Lecture 3

  2. IP Addressing Today: • IP addressing • Data link protocols and ARP • Notes about lab

  3. 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

  4. What is an IP Address? • Why Addresses? • End-to-end argument (principle) • Reading: http://web.mit.edu/Saltzer/www/publications/endtoend/endtoend.pdf • Keep it Simple, Stupid

  5. 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. • http://www.arin.net/whois • http://www.iana.org/ipaddress/ip-addresses.htm • Routers forwards a packet based on the destination address of the packet.

  6. IPv4 Addresses

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

  8. IP v.4 Addressing • 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

  9. Structure of an IP address • 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). 31 0 network prefix host number

  10. 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.

  11. 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

  12. 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”

  13. The old way: Internet Address Classes

  14. The old way: Internet Address Classes

  15. The old way: Internet Address Classes

  16. 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

  17. 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)

  18. Classless Inter-domain routing (CIDR) 1993 • Full description RFC 1518 & 1519 • Network prefix is of variable length • Addresses are allocated hierarchically • Routers aggregate multiple address prefixes into one routing entry to minimize routing table size

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

  20. 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)

  21. CIDR hierarchical address allocation 128.0.0.0/8 ISP • 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 128.59.0.0/16 128.1.0.0/16 128.2.0.0/16 University 128.59.16.150 Foo.com Bar.com CS Library 128.59.16.0/24 128.59.44.0/24

  22. Hierarchical address allocation 128.59.16.[0 – 255] • ISP obtains an address block 128.0.0.0/8  [128.0.0.0, 128.255.255.255] • ISP allocates 128.59.0.0/16 ([128.59.0.0, 128.59.255.255]) to the university. • University allocates 128.59.16.0/24 ([128.59.16.0, 128.59.16.255]) to the CS department’s network • A host on the CS department’s network gets one IP address 128.59.16.150 128.59.16.150 128.59.0.0 – 128.59.255.255 128.0.0.0 - 128.255.255.255

  23. CIDR allows route aggregation I 128.0.0.0/8 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 You can reach 128.0.0.0/8 via ISP1 128.0.0.0/8 ISP3 ISP1 128.1.0.0/16 128.2.0.0/16 128.59.0.0/16 University Foo.com Bar.com CS Library

  24. 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. • Security is still an issue • Secure Routing & Path validation

  25. What problems CIDR does not solve (I) 204.1.0.0/16 ISP1 128.0.0.0/8 ISP1 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

  26. What problems CIDR does not solve (II) 204.1.0.0/16 ISP1 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

  27. Global routing tables continue to grow Source: http://bgp.potaroo.net/as4637/

  28. Special IPv4 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

  29. Special IPv4 Addresses (RFC 3330)

  30. IP Addressing (Summary) • 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

  31. 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.

  32. IPv6 Header

  33. 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

  34. 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

  35. 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 Is IPv6 widely deployed?

  36. Data Link Layer • The main tasks of the data link layer are: • Transfer data from the network layer of one machine to the network layer of another machine • Convert the raw bit stream of the physical layer into groups of bits (“frames”)

  37. TCP/IP Protocol Stack • The TCP/IP protocol stack runs on top of multiple data link layers. • Two data link layer technologies • Broadcast • Point-to-Point

  38. Two types of networks at the data link layer • Broadcast Networks: All stations share a single communication channel • Point-to-Point Networks: Pairs of hosts (or routers) are directly connected • Typically, local area networks (LANs) are broadcast and wide area networks (WANs) are point-to-point

  39. Local Area Networks • Bus LAN • Ring LAN • Local area networks (LANs) connect computers within a building or a enterprise network • Almost all LANs are broadcast networks • Typical topologies of LANs are bus or ring or star • We will work with Ethernet LANs. Ethernet has a bus or star topology.

  40. MAC and LLC • In any broadcast network, the stations must ensure that only one station transmits at a time on the shared communication channel • The protocol that determines who can transmit on a broadcast channel are called Medium Access Control (MAC) protocol • The MAC protocol are implemented in the MAC sublayer which is the lower sublayer of the data link layer • The higher portion of the data link layer is often called Logical Link Control (LLC)

  41. IEEE 802 Standards • IEEE 802 is a family of standards for LANs, which defines an LLC and several MAC sublayers Higher layer issues LLC CSMA/CS Token bus Token ring Wireless lan

  42. Ethernet • Speed: 10Mbps -10 Gbps • Standard: 802.3, Ethernet II (DIX) • Most popular physical layers for Ethernet: • 10Base5 Thick Ethernet: 10 Mbps coax cable • 10Base2 Thin Ethernet: 10 Mbps coax cable • 10Base-T 10 Mbps Twisted Pair • 100Base-TX100 Mbps over Category 5 twisted pair • 100Base-FX100 Mbps over Fiber Optics • 1000Base-FX 1Gbps over Fiber Optics • 10000Base-FX 1Gbps over Fiber Optics (for wide area links)

  43. Bus Topology • 10Base5 and 10xBase2 Ethernets has a bus topology

  44. Star Topology • Starting with 10Base-T, stations are connected to a hub in a star configuration

  45. Ethernet Hubs vs. Ethernet Switches • An Ethernet switch is a packet switch for Ethernet frames • Buffering of frames prevents collisions. • Each port is isolated and builds its own collision domain • An Ethernet Hub does not perform buffering: • Collisions occur if two frames arrive at the same time. Hub Switch

  46. Ethernet and IEEE 802.3: Any Difference? • There are two types of Ethernet frames in use, with subtle differences: • “Ethernet” (Ethernet II, DIX (Digital-Intel-Xerox) • An industry standards from 1982 that is based on the first implementation of CSMA/CD by Xerox. • Predominant version of CSMA/CD in the US. • 802.3: • IEEE’s version of CSMA/CD from 1985. • Interoperates with 802.2 (LLC) as higher layer. • Difference for our purposes: Ethernet and 802.3 use different methods to encapsulate an IP datagram.

  47. Ethernet II, DIX Encapsulation (RFC 894)

  48. IEEE 802.2/802.3 Encapsulation (RFC 1042)

  49. Point-to-Point (serial) links • Many data link connections are point-to-point serial links: • Dial-in or DSL access connects hosts to access routers • Routers are connected by high-speed point-to-point links • Here, IP hosts and routers are connected by a serial cable • Data link layer protocols for point-to-point links are simple: • Main role is encapsulation of IP datagrams • No media access control needed

  50. Data Link Protocols for Point-to-Point links • SLIP (Serial Line IP) • First protocol for sending IP datagrams over dial-up links (from 1988) • Encapsulation, not much else • PPP (Point-to-Point Protocol): • Successor to SLIP (1992), with added functionality • Used for dial-in and for high-speed routers • HDLC (High-level Data Link Control) : • Widely used and influential standard (1979) • Default protocol for serial links on Cisco routers • Actually, PPP is based on a variant of HDLC

More Related