Sunteți pe pagina 1din 41

Naming and Addressing

in the Internet
(A VERY Quick Refresher)
Outline

• Names and addresses


§ Hierarchical naming
§ Name resolution (binding of name to address)
• Addressing
§ Addressing in the Internet
§ Address resolution (binding of network address to link
address)

2
Names and addresses
Why do we need both?
• Semantic differences: Who you are vs. where you are
§ It is useful to preserve the ability to specify both
• Syntax and parsing differences:
§ Long and arbitrary structured strings for flexibility and (human) understandability
Potentially high overhead and parsing inefficiency
§ Compact and structured strings for fast parsing and ease of administration
understandable
Fast packet forwarding and systematic address allocation

• So we really need both and this offers many benefits


§ Multiple names pointing to same address
Multiple servers on same machine
§ One name pointing to multiple addresses
Load balancing, redirect to local cache, etc.
§ Support for mobility and changes
Migration to a new machine or faster network

3
The Naming Problem

• Goal: give a globally unique name to each host


• Basic approach: Naming authority assigns names
§ Single naming authority is not scalable
§ Coordination problem with multiple naming authorities
• Solution: Partition name space in hierarchy of (exclusive)
domains
§ Independent authorities
§ Hierarchy of authorities

4
Internet Naming Hierarchy

• Benefits
§ scales “arbitrarily”
§ guarantees uniqueness
§ easy to understand
• Domain name system (DNS)
§ global authority (Network Solutions Inc.) assigns top level
domains to naming authorities (e.g., .edu, .net, .cz etc.)
§ naming authorities further carve up their space
§ all names in the same domain share a unique suffix

5
From Names to Addresses
• Now that we have both, we need a mechanism to bind them to each other
§ Name identifies who I want to reach
§ Address is used by the network to deliver the information
• Basic approach: Use a name (resolution) server
§ Centralized design
Guarantees consistency, but
single point of failure & potential performance bottleneck
§ Distributed design
better scalability, but
need for coordination between name servers
⇒ Hierarchy of servers (based on domains for synergy with naming solution)

Basically a large-scale distributed database


§ Database “schema” reflects information that can be included and queried in
the (name resolution) server(s)

6
Sample name/address resolution queries

$ nslookup > 129.42.18.103


Default Server: Server: NOC1.dccs.upenn.edu
NOC1.dccs.upenn.edu Address: 128.91.2.13
Address: 128.91.2.13
Name: redirect.www.ibm.com
> ibm.com Address: 129.42.18.103
Server: NOC1.dccs.upenn.edu
Address: 128.91.2.13

Non-authoritative answer:
Name: ibm.com
Addresses:
129.42.17.103,
129.42.18.103,
129.42.16.103

7
More on DNS
• Same issues/questions as in any distributed database
§ How to propagate queries?
§ How to optimize queries?
§ How to ensure consistency?
• Consistency and query propagation
§ Servers hierarchy parallels domain hierarchy
One server is responsible (authoritative server) for one or more
domains
Authority for subset of domains may be delegated to child server
§ Requests propagate up to Root and down to authoritative server
• Query optimization and reliability
§ Root is potential bottleneck and failure point
Replication of root servers
Caching of query results and authoritative
server names for specific domains

8
Addressing

• Addresses need to be globally unique, so they are also


hierarchical?? Not required though, e.g., MAC addresses!

• The “real” reason for hierarchy: route aggregation


§ Reduce size of routing tables
158.130.12.0
158.130.12.1
158.130.12.2
158.130.12.3
158.130.12.4 158.130.12.0/24
….
158.130.12.253
158.130.12.254
158.130.12.255
§ The catch though is that aggregation without “proximity” is of
little use (more on this later)

9
Addressing in the Internet

• Addressing tied to reachability


§ Every host interface has its own IP address
§ Router interfaces usually have their own IP addresses
• Current version of IP is version 4 (IPv4 addresses)
§ 4 bytes long
§ Two part hierarchy
Network number and host number
§ Different types of boundary indicator
Class, subnet mask, prefix
§ Goal of boundaries is address aggregation

10
IPv4 Address Classes

• Historical first choice


§ fixed network-host partition, with 8 bits of network number
• Generalization
§ Class A addresses have 8 bits of network number
§ Class B addresses have 16 bits of network number
§ Class C addresses have 24 bits of network number
• Distinguished by leading bits of address
§ leading 0 => class A (first byte < 128)
§ leading 10 => class B (first byte in the range 128-191)
§ leading 110 => class C (first byte in the range 192-223)
§ leading 1110 => class D (multicast)
§ leading 1111 => Class E (reserved)

11
IPv4 Address Classes (contd.)

• Private 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

§ Also, IP addresses in the range of 169.254.0.0


-169.254.255.255 are reserved for automatic private
addressing

12
IPv4 Address Evolution

• Class based scheme was too inflexible


• Two problems
§ Too few addresses
§ Too many routes
• Some “fixes”
§ Address reuse
Dynamic host configuration (reuse when host is inactive)
Network address translation (leverage private
addresses)
§ Aggreating routes
CIDR: Subnetting/supernetting
• A new, bigger address space (IPv6)
§ Slow in coming, but we are getting there (at last)

13
Getting an IP Address in the First Place

• Goals:
§ Automate the IP address allocation process
§ Allow dynamic address sharing across a set of hosts
• Dynamic Host Configuration Protocol (DHCP)
§ Host broadcasts discover to subnet at boot time
§ DHCP servers reply with offers of IP addresses
§ Host picks one and broadcasts a request to a corresponding
server
§ Other servers withdraw offers, and selected server acks
§ When done, host sends a release
§ IP address has a lease which limits time it is valid
§ Server reuses IP addresses if their lease is over
! Need for coordination with domain name server

14
Network Address Translation (NAT)
• Origin
§ Relative scarcity of IP addresses
§ Overhead (cost) in acquiring an IP address
• Why not use private addresses?
§ Private addresses are internal to domains
§ Private addresses can be reused across domains
• But… private addresses cannot be used across domain boundaries
§ How do I communicate with the outside world?
• Approach
§ Share a global address across many private addresses
§ Private addresses must then be translated at domain boundary
A data path operation on all packets
§ P.S.: Coupling to DNS is typically also required

15
Overview of NAT Operation
A 

IP Backbone
S = 198.78.17.7 S = 198.78.17.7
d = 198.78.16.5 d = 198.78.16.5

Domain A Domain B
Stub router Stub router

Alg
DNS-
Alg
198.78.17.7 DNS- 198.78.16.5
with NAT with NAT

S = 10.33.12.23 S = 198.78.17.7
d = 198.78.16.5 d = 10.33.12.23
16
Overview of NAT Operation
B 

IP Backbone
S = 198.78.16.5 S = 198.78.16.5
d = 198.78.17.7 d = 198.78.17.7

Domain A Domain B
Stub router Stub router

Alg
DNS-
Alg
198.78.17.7 DNS- 198.78.16.5
with NAT with NAT

S = 198.78.16.5 S = 10.33.12.23
d = 10.33.12.23 d = 198.78.17.7
17
NATs and DHCP – Differences & Similarities
• Both allow address reuse!
• DHCP
§ Requires host involvement (DHCP client)
§ Control path only (at boot-up time)
§ Loose coupling to DNS
§ Address reuse only hosts become inactive
• NAT
§ Transparent to hosts
§ Data path operation
Performance impact (touch every packet)
Affect applications that use IP address deep in payload
§ Strong coupling to DNS (need DNS-gateway app in NAT)
§ Full address reuse across domains, but sensitive to amount of
external traffic

18
CIDR

• Fixed class boundaries can waste (class B) addresses


§ Burn 65,536 addresses if I need more than 256 addresses
⇒Running out of class B addresses (only 16,382 of them)
• Solution
§ Block of class C addresses, to tap into class C space
§ Use a CIDR mask (prefix)
§ Similar to subnet masks, except that all routers must agree
to use it

19
Subnetting

• Allows administrator to define “clusters” of IP addresses within its network


(mostly applicable to class A and B addresses)
• Combination of address plus mask defines range of host addresses
“owned” by the subnet
§ Note that 130.8.129.0/24 and 130.8.129.138/24 define the same
subnet, but
§ 130.8.0.0/16 and 130.8.0.0/15 don’t…
• Class B network 130.8.0.0/16 spanning 216=65336 host addresses, can be
partitioned into, for example
§ 256 subnets (130.8.0.0/24 to 130.8.255.0/24), each spanning 28=256
host addresses
§ Or 1 subnet (130.8.128.0/17) spanning 215=32768 host addresses and
128 subnets (130.8.0.0/24 to 130.8.127.0/24) each spanning 28=256
host addresses
• Routing scalability by limiting the advertising of individual subnets to
“mostly” inside your own network

20
Supernetting a.k.a.
Summarization/Aggregation
• Allows administrator to glue together blocks of adjacent IP
addresses (applies mostly to class C networks)
§ Class C networks 198.12.34.0/24 and 198.12.35.0/24 can be
grouped together into 198.12.34.0/23 (or 198.12.35.0/23),
but 198.12.34.0/24 and 198.12.33.0/24 cannot
198.12.33.0/24 = 198.12.00100001.********
198.12.34.0/24 = 198.12.00100010.********
No aggregation possible

21
Supernetting a.k.a.
Summarization/Aggregation
• Allows administrator to glue together blocks of adjacent IP
addresses (applies mostly to class C networks)
§ Class C networks 198.12.34.0/24 and 198.12.35.0/24 can be
grouped together into 198.12.34.0/23 (or 198.12.35.0/23),
but 198.12.34.0/24 and 198.12.33.0/24 cannot
198.12.34.0/24 = 198.12.00100010.********
198.12.35.0/24 = 198.12.00100011.********
Aggregation is possible
198.12.34.0/23 = 198.12.0010001*.********

22
Summarization in Practice

• It is not uncommon for a router to summarize several subnets


into a supernet that also includes missing subnets
198.12.33.0/24 = 198.12.00100001.********
198.12.34.0/24 = 198.12.00100010.********
198.12.35.0/24 = 198.12.00100011.********
Will be advertised as 198.12.32.0/22 even though
subnet 198.12.32.0/24 is missing (may not have been
allocated)
• This can cause problems… e.g., routing loops
§ Why?
• Fix: Include missing subnets in the summarizing router own
forwarding table that point to /dev/null, i.e., discard packets
§ Eliminates loops but can create blackholes

23
Summarization Routing Loop

198.12.32.0/24
2 1 198.12.33.0/24
198.12.32.0/21
198.12.34.0/24 198.12.39.1 198.12.35.0/24
198.12.32.0/21
198.12.38.0/24
1 2 198.12.37.0/24

• 198.12.32.0/24 = 198.12.00100000.********
• 198.12.33.0/24 = 198.12.00100001.********
• 198.12.34.0/24 = 198.12.00100010.********


198.12.35.0/24 = 198.12.00100011.********
198.12.36.0/24 = 198.12.00100100.********
198.12.32.0/21
• 198.12.37.0/24 = 198.12.00100101.********
• 198.12.38.0/24 = 198.12.00100110.********
• 198.12.39.0/24 = 198.12.00100111.********
24
IPv6 - Addressing
• No matter how much reuse, we will run out 32-bit IPv4 addresses
• IPv6 extends address size to 128 bits
§ Classless and supports aggregation (prefixes) & subnetting
§ Flow label for (faster) lookup (add-on as part of IPv6 header)
§ Unicast, anycast, and multicast addresses
§ Better support for security and mobility
• Deployment has been slow
§ Interoperability with IPv4 through encapsulation, embedding, and
translation
§ Need is less urgent than anticipated
§ Impact to host software (less of an issue today)
§ Added complexity of routing in mixed IPv4/IPv6 environment
§ Lack of incentives for making content available “natively”
• But, this may be about to change “big time”
§ IPTV, mobile/wireless access,… 

25
IPv6 Header

26
IPv4 vs IPv6
IPv4: 32 bits

•232 addresses
= 4,294,967,296 addresses ≈ 4 billion addresses

IPv6: 128 bits

•2128 addresses?
= 340,282,366,920,938,463,463,374,607,431,770,000,000
or about (4.3 billion)4 addresses?

•Not exactly that many, because of address structure…


27
IPv6 Address Format
128 bits
2001:0DA8:E800:0000:0260:3EFF:FE47:0001
• 8 groups of 4 hexadecimal digits (instead of 4 groups of digits
from 0 to 255)
§ Each group represents 16 bits (instead of 8 bits)
§ Separator is “:” (instead of “.”)
§ Case-independent (NA)
• Hex notation (0xFF:

28
IPv6 Address Representation
2001:0DA8:E800:0000:0260:3EFF:FE47:0001

2001:DA8:E800:0:260:3EFF:FE47:1

2001:0DA8:E800:0000:0000:0000:0000:0001

2001:DA8:E800::1

29
IPv6 Prefix Representation
Prefix length = 48

2001:0DA8:E800:0000:0260:3EFF:FE47:0001/48

Similarly
805B:2D9D:DC28:0:0:0:0:0/48

805B:2D9D:DC28::/48

30
IPv6 Address Types and Scope
• Unicast address: Packet delivery to a given interface or host
• Anycastaddress: Packet delivery to the “nearest” of a group of interfaces or hosts (not
distinguishable from unicast)
• Multicast addres (start with FF00::/8 – 1stbyte of 1’s): Packet delivery to a group of
interfaces or hosts

• Scoping of unicast and anycast addresses


§ Unicast loopback address: 0:0:0:0:0:0:0:1 (::1/128) – Similar to 127.0.0.1
§ Link-local (FE80::/10): Addressing within a link – Similar to auto-config
169.254.0.0/16
§ Site-local (FC00::/7): Addressing within an organization – Similar to private addresses
§ Global: as the name indicate (the IPv6 Internet)
§ IPv4 transition: ::FFFF:0:0/96
• Scoping of multicast addresses (4 least significant bits of 2nd byte)
§ 0x1: Node-local
§ 0x2: Link-local
§ 0x5: Site-local
§ 0x8: Organization-local
§ 0xE: Global
Least significant 112 bits are Group ID (usually only 48 bits are used – E/N mapping) 31
“Initial” IPv6 Unicast address Structure

Today, left to
individual
registries to
decide how
to allocate

32
IPv6 Address Allocation Overview
/0 /64 /
128
Topological 128 bits Interface

Infrastructure Site
/0 /48 /64

•248 site addresses (across all ISPs)


= 281,474,976,710,656

•2(64-48) = 216 “subnet” addresses/site


= 65,536

•264 “local” addresses per subnet


= 18,446,744,073,709,551,616

33
/0
Sample - IPv6 Address Allocation /48 /64

Infrastructure Site

Infrastructure
ISP Customer
/0 /32 /48

•Current ISP allocation (min) is /32


•Providing 216 = 65,536 customer site addresses
•ISP allocation can be larger and can increase

•Each site address is /48


•Providing 2(48-32) = 216 = 65,536 site addresses
34
IPv6 – ISP addressing

• Every ISP receives a /32 (or more)


§ Providing 65,536 site addresses (/48)

/32

/32

/32

35
IPv6 – Site addressing

• Every “site” receives a /48


§ Providing 65,536 /64 (LAN) addresses

/48

36
IPv6 – LAN addressing

• Every LAN segment receives a /64


§ Providing 264 interface addresses per LAN

/64

37
IPv6 – Device addressing

• Every device interface receives a /128


§ May be EUI-64 (derived from interface MAC address),
random number (RFC 3041), auto-configuration, or manual
configuration

/128

/128 /128

/128

38
Back to IPv4 – ARP Refresher

• Mapping of network address to lower layer (MAC) address


§ Ultimate delivery of packets to devices, typically relies on
medium specific address, e.g., IEEE 802

39
Basic ARP Operation
• On shared media LAN, e.g., E/N
§ Broadcast a query with IP address onto local LAN
§ Device that owns that address (or proxy) replies with
address
§ All devices are required to listen for ARP requests and
reply
§ Reply stored in an ARP cache and timed out
Can be made “sticky” if desired

40
IPv6 Neighbor Discovery Protocol (NDP)

• The equivalent of ARP for IPv6, but it runs on IP (part of


ICMPv6)
§ NDP actually uses multicast and not broadcast
§ Solicited-node multicast address is specific to a given
multicast address
Last 3 bytes of unicast address pre-pended with
FF02::1::FF00:0000/104
Avoids bothering hosts that are not the target
• Request packets in the form of Neighbor Solicitation packets
• Reply packets in the form of Neighbor Advertisement packets

41

S-ar putea să vă placă și