Title: Lecture 6: Network Layer
1Lecture 6 Network Layer
- Prev. summary
- Network layer intro
- Routing
- Link-state
- Distance-vector
- Routing within the Internet
- Classfull Addresing
Application
Transport
Network
Link
- Todays lecture
- Classless IP addressing
- IPv6
2IP Address Classes
class-full addressing
Bit position
0 1 2 3 8
16
31
1.0.0.0 to 127.255.255.255
Class A
0
Net ID
Host ID
128.0.0.0 to 191.255.255.255
Class B
Net ID
Host ID
1 0
192.0.0.0 to 223.255.255.255
Class C
Net ID
Host ID
1 1 0
224.0.0.0 to 239.255.255.255
Class D
1 1 1 0
Multicast address
Class E
Reserved for future use, experiment
1 1 1 1
Reserved for experiments
Determining the class if first bit is 0 then
class A else if second bit 0 then class B else
if ...
Figure 8.5
3IP addressing CIDR
- classful addressing
- inefficient use of address space, address space
exhaustion - e.g., class B net allocated enough addresses for
65K hosts, even if only 2K hosts in that network - CIDR Classless InterDomain Routing
- network portion of address of arbitrary length
- address format a.b.c.d/x, where x is bits in
network portion of address
4IP addresses how to get one?
- Q How does host get IP address?
-
- hard-coded by system admin in a file
- Win control-panel-gtnetwork-gtconfiguration-gttcp/ip
-gtproperties - UNIX /etc/rc.config
- DHCP Dynamic Host Configuration Protocol
dynamically get address from as server - plug-and-play
- host broadcasts DHCP discover msg
- DHCP server responds with DHCP offer msg
- host requests IP address DHCP request msg
- DHCP server sends address DHCP ack msg
5IP addresses how to get one?
- Q How does network get network part of IP addr?
- A gets allocated portion of its provider ISPs
address space
ISP's block 11001000 00010111 00010000
00000000 200.23.16.0/20 Organization 0
11001000 00010111 00010000 00000000
200.23.16.0/23 Organization 1 11001000
00010111 00010010 00000000 200.23.18.0/23
Organization 2 11001000 00010111 00010100
00000000 200.23.20.0/23 ...
..
. . Organization 7
11001000 00010111 00011110 00000000
200.23.30.0/23
6IP addressing the last word...
- Q How does an ISP get a block of addresses?
- A ICANN Internet Corporation for Assigned
- Names and Numbers
- allocates addresses
- manages DNS
- assigns domain names, resolves disputes
www.icann.org
7Recall earlier routing discussion
- Starting at A, given IP datagram addressed to B
- look up net. address of B, find B on same net. as
A - link layer send datagram to B inside link-layer
frame
8IP header
20 bytes overhead
9IP Header Default Settings
- Version 4
- Header length 4 bits
- TOS 0 for normal service,
- Total length 16 bits, max 65535 bytes
- TTL 32/64, decrease by one in each hop
- Protocol field TCP,UCP,ICMP,IGMP,etc.
- Checksum header only
10TOS Field
11IPv4 vs IPv6
- Need for larger address space
- IPv4 has 32-bit address field max 2 - special
addresses - Support for new applications like real-time audio
and video that require network guarantees in the
network - header format helps speed processing/forwarding
- header changes to facilitate QoS
- new anycast address route to best of several
replicated servers
12IPv4 vs IPv6
- Key differences
- Address size is 128-bits
- No fragmentation/reassembly
- No checksum
- fixed-length 40 byte header
- flexible header format for options
- Also a new ICMP for IPv6, ICMPv6 RFC 2463
- additional message types, e.g. Packet Too Big
- multicast group management functions
13IPv4 Header
0 4 8
16 19 24
31
Version IHL Type of Service
Total Length
Identification Flags
Fragment Offset
20-bytes
Time to Live Protocol
Header Checksum
Source IP Address
Destination IP Address
Options
Padding
- IP Header
- source, destination address 32-bits,
- total-lengthheaderpayload
- version, ihl (header length for options), ttl,
protocol - fragmentation support identification, df, mf,
frag. offset
Figure 8.4
14IPv6 Packet Format
32 bits
Priority Flow Label
Ver
Priority
Flow
Payload Length
Hop Limit
Next Header
Source Address (128 bits)
Destination Address (128 bits)
Base header
Extension header
Extension header
data
optional
15Transition From IPv4 To IPv6
- Not all routers are upgraded
- How will the network operate with mixed IPv4 and
IPv6 routers? - Two proposed approaches
- Dual Stack some routers with dual stack (v6, v4)
can translate between formats - Tunneling IPv6 carried as payload in IPv4
datagram among IPv4 routers
16Transitioning IPv4 to IPv6
Dual Stack Approach
IPv6
IPv6
IPv4
IPv4
IPv6
IPv6
A B C D E F
Flow X source A dest F data
Flow ? source A dest F data
source A dest F data
A B C D E
F
17Transitioning IPv4 to IPv6
Tunneling
Logical view
tunnel
IPv6
IPv6
IPv6
IPv6
IPv6
IPv6
IPv4
IPv4
IPv6
IPv6
A B C D E F
source B dest E
Flow X source A dest F data
Flow X source A dest F data
Flow X source A dest F data