Upload
others
View
29
Download
0
Embed Size (px)
Citation preview
Lecture 11:IPv6
CSE 123: Computer NetworksAlex C. Snoeren
HW 2 due FRIDAY
Lecture 11 Overview• Subnetting example
• Classless Inter-domain Routing (CIDR)
• Forwarding example
• IPv6u Addressingu Packet format
2
CSE 123 – Lecture 12: Aggregation
CSE 123 – Lecture 11: IPv6
Subnet Addresses● Every (sub)network has an address and a netmask
u Netmask tells which bits of the network address is importantu Convention suggests it be a proper prefix
● Netmask written as an all-ones (bits) IP addressu E.g., Class B netmask is 255.255.0.0 (i.e, 11111111111111110000000000000000)u Sometimes expressed in terms of number of 1s, e.g., /16
● Need to size subnet appropriately for each LANu Only have remaining bits to specify host addresses
3
CSE 123 – Lecture 12: Aggregation
CSE 123 – Lecture 11: IPv6
What is the netmask for a Class A network with 16 subnets?
A. 255.15.0.0B. 255.0.0.15C. 255.240.0.0D. 255.255.240.0
IP Address Problem (1991)● Address space depletion
u In danger of running out of classes A and B
● Why?u Class C too small for most organizations (only ~250 addresses)u Very few class A – very careful about giving them out (who has 16M hosts anyway?)u Class B – greatest problem
4
CSE 123 – Lecture 12: Aggregation
CSE 123 – Lecture 11: IPv6
● Classless Inter-Domain Routing (1993)u Networks described by variable-length prefix and lengthu Allows arbitrary allocation between network and host address
u e.g. 10.95.1.2 contained within 10.64.0.0/10:» 10.64.0.0 is network and remainder (31.1.2) is host» 0000101001 / 0111110000000100000010
● Pro: Finer grained allocation; aggregation● Con: More expensive lookup: longest prefix match
Network Host
Prefix Mask=# significant bits representing prefix
CIDR
6
CSE 123 – Lecture 12: Aggregation
CSE 123 – Lecture 11: IPv6
Longest Matching Prefix• Forwarding table contains many prefix/length tuples
u They need not be disjoint!u E.g. 200.23.16.0/20 and 200.23.18.0/23u What to do if a packet arrives for destination 200.23.18.1?u Need to find the longest prefix in the table which matches it (200.23.18.0/23)
• Not a simple table, requires multiple memory lookupsu Lots and lots of research done on this problemu Lots of this work was historically done by UCSD faculty
7
CSE 123 – Lecture 12: Aggregation
CSE 123 – Lecture 11: IPv6
Route Aggregation● Combine adjacent networks in forwarding tables
u Helps keep forwarding table size down
“Send me anythingwith addresses beginning 200.23.16.0/20”
200.23.16.0/23
200.23.18.0/23
200.23.30.0/23
Fly-By-Night-ISP
Organization 0
Organization 7Internet
Organization 1
ISPs-R-Us “Send me anythingwith addresses beginning 199.31.0.0/16”
200.23.20.0/23Organization 2
...
...
8
CSE 123 – Lecture 12: Aggregation
CSE 123 – Lecture 11: IPv6
● But what if address range is not contiguous?
“Send me anythingwith addresses beginning 200.23.16.0/20”
200.23.16.0/23
200.23.18.0/23
200.23.30.0/23
Fly-By-Night-ISP
Organization 0
Organization 7Internet
Organization 1
ISPs-R-Us “Send me anythingwith addresses beginning 199.31.0.0/16or 200.23.18.0/23”
200.23.20.0/23Organization 2
...
...
9
Most Specific Route
CSE 123 – Lecture 12: Aggregation
CSE 123 – Lecture 11: IPv6
Forwarding example
Provider
• Packet to 10.1.1.6 arrives from Provider
10
H2
H3
H4
R1
10.1.16/24
10.1.1.6
10.1.2/23
R2
10.1.0.2
10.1.8.4
10.1.2.2
10.1.16.2
H1
10.1.1.101
10.1.1.5
10.1.1.1
10.1.0.1
10.1.1.4/30
10.1.2.1
10.1.8.1
10.1.1/24
10.1.8/24
10.1.0/24
CSE 123 – Lecture 12: Aggregation
CSE 123 – Lecture 11: IPv6
What is the correct path?
A. R2 – R1 – H3B. R2 – R1 – H2C. R2 – R1 – H1 – H2D. No path to desintation
Forwarding example (2)
Forwarding table at R2Destination Next Hop
127.0.0.1 loopback
Default or 0/0 10.1.16.1
10.1.8.0/24 interface1
10.1.2.0/23 interface2
10.1.0.0/23 10.1.2.2
• Packet to 10.1.1.6• Matches 10.1.0.0/23
11
H2
H3
H4
R1
10.1.16/24
10.1.1.6
10.1.2/23
R2
10.1.0.2
10.1.8.4
10.1.2.2
10.1.16.2
H1
10.1.1.5
10.1.1.1
10.1.0.1
10.1.1.4/30
10.1.2.1
10.1.8.1
10.1.1/24
10.1.8/24
10.1.0/24
10.1.16.0/24 interface3
12
3
10.1.1.101
CSE 123 – Lecture 12: Aggregation
CSE 123 – Lecture 11: IPv6
Forwarding example (3)
Routing table at R1Destination Next Hop
127.0.0.1 loopback
Default or 0/0 10.1.2.1
10.1.0.0/24
10.1.1.0/24 interface2
10.1.2.0/23 interface3
• Packet to 10.1.1.6• Matches 10.1.1.4/30
• Longest prefix match
10.1.1.4/30 10.1.1.101
12
H2
H3
H4
R1
10.1.16/24
10.1.1.6
10.1.2/23
R2
10.1.0.2
10.1.8.4
10.1.2.2
10.1.16.2
H1
10.1.1.101
10.1.1.5
10.1.1.1
10.1.0.1
10.1.1.4/30
10.1.2.1
10.1.8.1
10.1.1/24
10.1.8/24
10.1.0/24
interface1
1
2
3
CSE 123 – Lecture 12: Aggregation
CSE 123 – Lecture 11: IPv6
Forwarding example (4)
H2
H3
H4
R1
10.1.1/24
10.1.16/24 10.1.8/24
10.1.0/24
10.1.1.6
10.1.2/23
R2
10.1.0.2
10.1.8.4
10.1.2.2
10.1.16.2
H1
Routing table at H1Destination Next Hop
127.0.0.1 loopback
Default or 0/0 10.1.1.1
10.1.1.0/24 interface1
10.1.1.4/30 interface2
• Packet to 10.1.1.6• Direct route
• Longest prefix match
13
10.1.1.5
10.1.1.1
10.1.0.1
10.1.1.4/30
10.1.2.1
10.1.8.1
12
10.1.1.101
CSE 123 – Lecture 12: Aggregation
CSE 123 – Lecture 11: IPv6
The space crunch…● Still running out of IP addresses… what to do?● Two solutions
u Network Address Translation – multiple multiple hosts on a single IP address (future class)
u Get bigger addresses -> IPv6● IPv6: 128bit addresses… we won’t run out
u 64bit routing prefix, 64bit host id
CSE 123 – Lecture 11: IPv6 14
CSE 123 – Lecture 12: Aggregation
IPv6 Addresses● Colon-Hex notation
u 8 groups of four HEX digits separated by colons, e.g.» FEDC:0000:0000:0065:4321:0000:DEAD:BEEF
u Can drop leading zeros:» FEDC:0000:0000:65:4321:0000:DEAD:BEEF
u Can even skip first sequence of all zeros w/ ::» FEDC::65:4321:0000:DEAD:BEEF
u Every IPv4 address is a IPv6 address:» E.g., ::FFFF:222.173.190.239 (prepended w/zeros and FFFF)
● Network names expressed as prefix/length:» FEDC::65:43/64
15
CSE 123 – Lecture 12: Aggregation
CSE 123 – Lecture 11: IPv6
How many (hex) zeros between FEDC and 65 in the last address?
A. NoneB. 4C. 6D. 8
For Next Time
• Homework 2 due FRIDAY
• Midterm a WEEK FROM TODAY
• Last discussion before Midterm TODAY
• Read 3.2 and 9.3 for next Lecture
16
CSE 123 – Lecture 12: Aggregation
CSE 123 – Lecture 11: IPv6