9/3/2019 Outline • IP design goals 15-441/641: Computer Networks • Traditional IP addressing IP Addressing • Addressing approaches • Class-based addressing Fall 2019 Profs Peter Steenkiste & Justine Sherry • Subnetting • CIDR • Packet forwarding Fall 2019 https://computer-networks.github.io/sp19/ 2 So far you know how to build a Local Logical Structure of an Internet Area Network host router router host router How do we get them to router talk to each other? router router • Interconnection of separately managed networks using routers • Individual networks can use different (layer 1-2) technologies • Packet travels from source to destination by hopping through networks • “Network” layer responsibility • How do routers connect heterogeneous network technologies? 4 3 1
9/3/2019 The Packet as an Envelope Solution: Internet Protocol (IP) • Inter-network connectivity provided by HTTP Packet Payload: the Internet protocol GET nyan.cat…. Host wants to send… • Hosts use Internet Protocol to send Network email WWW phone... packets destined across networks. Applications SMTP HTTP RTP... IP Header TCP UDP… IP address identifies • IP creates abstraction layer that hides To: 123.45.67.89 (Destination Host) IP final destination underlying technology from network From: 169.229.49.157 (Sender Host) ethernet PPP… application software CSMA async sonet... Local Address Header (Ethernet, WiFI) But need a local Network copper fiber radio... Technology To: Destination Host Allows range of current & future technologies addressing header to • travel between routers From: Sender Host WiFi, traditional and switched Ethernet, • personal area networks, … 5 6 Traveling through the Internet The Packet as an Envelope Set of Envelopes • Source adds all headers (HTTP, transport -> PHY) • Each router: HTTP Packet Payload: HTTP Packet Payload: • Removes datalink layer GET nyan.cat…. Datalink headers may GET nyan.cat…. Host wants to send… • Uses IP header to make forwarding decision differ across networks IP Header • Adds data link layer header for next network IP Header To: 123.45.67.89 IP address identifies But IP header • Destination removes all headers (PHY -> HTTP) To: 123.45.67.89 (Destination Host) From: 169.229.49.157 final destination remains unchanged! From: 169.229.49.157 (Sender Host) host Datalink Header router But need a local Local Address Header (Ethernet, WiFi) To: Next hop router router host To: Destination Host router addressing header to From: This router router From: Local Router travel between routers router router 7 2
9/3/2019 What are the Goals? Outline • LANs: “Connect hosts” switching: • IP design goals • Only has to scale up a “LAN size” • Traditional IP addressing • Availability • Addressing approaches • Internet: “Connect networks” routing: • Class-based addressing • Scalability • Subnetting • Manageability of individual networks – essential to • CIDR achieving scalability • Packet forwarding • Availability • Affects addressing, protocols, routing 10 11 Flat Address Forwarding Addressing and Forwarding MAC Bridge • Flat address space with smart routers Address 1 Port Age 1 36 • Packets carry a destination address A21032C9A591 2 3 2 01 99A323C90842 • Routers knows how to reach every host 2 15 8711C98900AA • Flat address space with dumb routers 2 16 301B2369011C • Packet header specifies the path the packet should take • Bridge/switch has a table that shows for each 3 11 695519001190 • Hierarchical address space MAC Address which port to use for forwarding • For every packet, the bridge “looks up” the entry for the packets • What we actually do in IP – our focus today destination MAC address and forwards the packet on that port. • Table of circuit identifiers Other packets are broadcast – why? • • More on this later in the course • Timer is used to flush old entries 12 14 3
9/3/2019 Flat Address Forwarding Why is this not a good solution Source Routing for the Internet? MAC • List entire path in packet Bridge Address 1 Port Age • Driving directions (north 3 hops, east, etc..) 1 36 A21032C9A591 2 3 Each router tracking 2 01 99A323C90842 • Router processing 2 15 8711C98900AA 2^32 addresses = • Strip first step from packet 2 16 301B2369011C scalability nightmare • Examine next step in directions and forward • Bridge/switch has a table that shows for each 3 11 695519001190 MAC Address which port to use for forwarding • Defined for IPv4 but rarely used • For every packet, the bridge “looks up” the entry for the packets • End points need to know a lot about network destination MAC address and forwards the packet on that port. • Economic and security concerns Other packets are broadcast – why? • • Timer is used to flush old entries • Variable header size 16 15 Hierarchical Addressing IP Addresses (IPv4) • Flat addresses – one address for every host • Unique 32-bit number associated with a host • My laptop: 1234-5067-8901 00001100 00100010 10011110 00000101 • Does not scale – router table size explodes – 4.4 Billion and counting! • Hierarchical – add structure • Represented with the “dotted quad” notation • Postal address: US / PA / Pittsburgh / CMU / Gates / 9 th fl / Steenkiste • e.g., 12.34.158.5 • Common “trick” to simplify forwarding, reduce forwarding table sizes • What type of hierarchy do we need for the Internet? 12 34 158 5 • How many levels? • Same hierarchy depth for everyone? 00001100 00100010 10011110 00000101 • Who controls the hierarchy? 16 19 4
9/3/2019 Hierarchy in IP Addressing History of Internet Addressing • 32 bits are partitioned into a prefix and suffix components • Prefix is the network component: CMU • Suffix is host component: Prof. Sherry’s laptop at CMU 12 34 158 5 • Always dotted-quad notation • Always network/host address split 00001100 00100010 10011110 00000101 • But nature of that split has changed over time Network (23 bits) Host (9 bits) • Interdomain routing operates on the network prefix • Destination network operates on the host component 21 22 IP Address Structure, ca 1981 Original Internet Addresses Routers know how to get to network ID, but not individual hosts. Network ID Host ID • First eight bits: network component 8 16 24 32 Class A 0 Network ID Host ID • Last 24 bits: host component Class B 10 Class C 110 Assumed 256 networks were more than enough! Class D 1110 Multicast Addresses Class E 1111 Reserved for experiments 23 24 5
9/3/2019 IP Route Lookup, ca 1981 Outline • IP design goals • Router extracts address class and network ID from IP address • Forwarding table structure reflects address structure • Traditional IP addressing Logically, a separate forwarding table for each address class • • Addressing approaches For unicast address (classes A-C) entries contain • The prefix for a destination network (length 8/16/24) • • Class-based addressing Information on how to forward the packet, e.g., exit port, .. • • Subnetting • www.cmu.edu address 128.2.11.43 Class B address – class + network is 128.2 • • CIDR Lookup 128.2 in forwarding table for class B • • Packet forwarding • Tables are still large! 2 Million class C networks • 23 24 Subnet Addressing Subnetting RFC 917 (1984) • Adds another layer to hierarchy • Network can be split into multiple subnets • The Internet was growing and some “LANs” were very big • Prefix of the subnet is Network and (variable length) Subnet identifiers • Can no longer be managed as a single LAN • Subnetting is done internally in the organization Too many hosts spread across multiple departments • It is not visible outside – important for management • Some protocols become inefficient • • Need a simple way to partition large networks Network Host Partition into multiple IP networks with different (subnet) prefixes • Network Subnets are connected by routers – how do they learn subnet length? Subnet Host • • CMU case study in RFC Subnet 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 1 0 0 0 0 0 0 0 0 Mask Chose not to adopt – concern that it would not be widely supported • 25 34 6
Recommend
More recommend