Documente Academic
Documente Profesional
Documente Cultură
in the Internet
(A VERY Quick Refresher)
Outline
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
3
The Naming Problem
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)
6
Sample name/address resolution queries
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
9
Addressing in the Internet
10
IPv4 Address Classes
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
12
IPv4 Address Evolution
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
19
Subnetting
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
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
•2128 addresses?
= 340,282,366,920,938,463,463,374,607,431,770,000,000
or about (4.3 billion)4 addresses?
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
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
33
/0
Sample - IPv6 Address Allocation /48 /64
Infrastructure Site
Infrastructure
ISP Customer
/0 /32 /48
/32
/32
/32
35
IPv6 – Site addressing
/48
36
IPv6 – LAN addressing
/64
37
IPv6 – Device addressing
/128
/128 /128
/128
38
Back to IPv4 – ARP Refresher
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)
41