Lecture 15 (Network Layer) Outline
Internet Network Layer: z z
IP Addressing IPv6
CSC4430 – Data Communication and Computer Networks
1
15.4. IP Addressing
IP address: z
Is a 32-bit address that uniquely identifies interfaces of a device – host or router. Interface: provides connection between a device and a physical link.
z
z
A device can have multiple interfaces - more than one IP address. Decimal point notation:
CSC4430 – Data Communication and Computer Networks
2
15.4. IP Addressing
“class-full” addressing: z
IP address consists of two parts: network part (high order bits). host part (low order bits).
CSC4430 – Data Communication and Computer Networks
3
15.4. IP Addressing z
Address range:
CSC4430 – Data Communication and Computer Networks
4
15.4. IP Addressing z
All 0s and all 1s are reserved for special addresses.
Class
Number of Networks Number of Hosts
A
27-1=127
224-2=16,777,214
B
214=16,384
216-2=65,534
C
221=2,097,152
28-2=254
D, E
Not applicable
Not applicable
CSC4430 – Data Communication and Computer Networks
5
15.4. IP Addressing
What’s a network? (from IP address perspective) z
z
z
Device interfaces with same network part of IP address. Can physically reach each other without intervening router – direct delivery of packets. For example: 129.8.x.x is a class B address, so it consists of all hosts/routers with the same first two bytes of IP address. 207.42.56.x is a class C address, so it consists of all hosts/routers with the same first three bytes of IP address.
CSC4430 – Data Communication and Computer Networks
6
15.4. IP Addressing
Example:
CSC4430 – Data Communication and Computer Networks
7
15.4. IP Addressing
Special addresses: z
Network address: Host ID is all 0s.
CSC4430 – Data Communication and Computer Networks
8
15.4. IP Addressing
Special addresses: z
Direct broadcast address: Host ID is all 1s.
CSC4430 – Data Communication and Computer Networks
9
15.4. IP Addressing
Special addresses: z
Loopback address: Used to test the software on a machine. Packet never leaves the machine.
CSC4430 – Data Communication and Computer Networks
10
15.4. IP Addressing
“class-full” addressing: z z
Allows a network with two levels of hierarchy. Inefficient use of address space leads to address space exhaustion. e.g. class B net allocated enough addresses for 65K hosts, even if only 2K hosts in that network
z
Short-term solutions: Subnetting: divides a network into several smaller networks. Supernetting: combine several class C addresses to create a larger range of addresses.
z
Long-term solution: IPv6 or IPng.
CSC4430 – Data Communication and Computer Networks
11
15.4.1. Subnetting
Subnetting: z z
Divides a network into several smaller networks. The subnetworks still appear as a single network to the rest of the Internet.
CSC4430 – Data Communication and Computer Networks
12
15.4.1. Subnetting z
Creates an intermediate level of hierarchy. netid: defines the site. subnetid: defines the physical subnetwork. hostid: defines the connection of the host to the subnet.
CSC4430 – Data Communication and Computer Networks
13
15.4.1. Subnetting
Masking: z
z
Process that extracts the address of the physical network from an IP address. Applicable with or without subnetting.
CSC4430 – Data Communication and Computer Networks
14
15.4.1. Subnetting z
Uses bit-wise-and operation on the IP address and the mask.
CSC4430 – Data Communication and Computer Networks
15
15.4.2. Supernetting
Supernetting: z
Assigns a set of class C addresses to an organization that needs more than 254 host addresses.
CSC4430 – Data Communication and Computer Networks
16
15.4.2. Supernetting
Supernet mask: z
Reverse of the subnet mask. Subnet mask: change some zeros in the hostid to 1s. Supernet mask: change some 1s in netid to zeros.
z
The position of 1s in the supernet mask defines lowest address.
CSC4430 – Data Communication and Computer Networks
17
15.4.2. Supernetting
Classless InterDomain Routing (CIDR): z
Reduces the entries in the routing table for supernet. Represents supernet by a single entry in the routing table.
z z
Network portion of address of arbitrary length. Address format: a.b.c.d/x, where x is # bits in network portion of address. network part
host part
11001000 00010111 00010000 00000000 200.23.16.0/23 CSC4430 – Data Communication and Computer Networks
18
15.4.2. Supernetting z
Route aggregation.
16 Class C Networks
192
4
16
host
11000000 00000100 00010000
192
4
17
host
11000000 00000100 00010001
192
4
18
host
Dec/Bin
. . . 192
4
11000000 00000100 00010010 . . .
31
host
11000000 00000100 00011111
Classless Network
11000000 00000100 0001 20-bit Network Part 12-bit Host Part
CSC4430 – Data Communication and Computer Networks
19
15.4.3.Getting an IP Address
IP addresses are allocated by ICANN. z
ICANN: Internet Corporation for Assigned Names and Numbers. Decides which IP addresses are to be reserved for special purpose and which ones that can be used. Also assigns domain names and manages domain name servers. Resolves domain name disputes.
z
Actual assignment of IP addresses is managed by Regional Internet Registries: Keep track who actually own the IP addresses. More info: see http://www.apnic.net/db/RIRs.html.
CSC4430 – Data Communication and Computer Networks
20
15.4.3.Getting an IP Address
How a host gets its IP address? z z
Hard-coded by system admin in a file. Dynamic Host Configuration Protocol (DHCP): Application-layer protocol. Dynamically get address: “plug-and-play”.
CSC4430 – Data Communication and Computer Networks
21
15.5. IPv6
Initial motivation: z
solve 32-bit address space which may completely be allocated by 2008.
Additional motivation: z
z z
change header format to speed up processing/forwarding. change header to facilitate QoS. provide new “anycast” address: route to “best” of several replicated servers.
CSC4430 – Data Communication and Computer Networks
22
15.5. IPv6
IPv6 addressing: z z
16 bytes = 128 bits. Hexadecimal colon notation:
CSC4430 – Data Communication and Computer Networks
23
15.5. IPv6 z
Provider-based address is used by a normal host as a unicast address. Hierarchical addressing.
CSC4430 – Data Communication and Computer Networks
24
15.5. IPv6
IPv6 datagram format: z z
fixed-length 40 byte header. no fragmentation allowed.
CSC4430 – Data Communication and Computer Networks
25
15.5. IPv6
IPv6 datagram format: Priority: identify priority among datagrams in flow. z Flow Label: identify datagrams in the same “flow.” (concept of “flow” is not well defined). z Next header: identify upper layer protocol for data. z Hop limit = TTL z
CSC4430 – Data Communication and Computer Networks
26
15.5. IPv6
Other changes from IPv4: z
z
z
Checksum: removed entirely to reduce processing time at each hop Options: allowed, but outside of header, indicated by “Next Header” field ICMPv6: new version of ICMP additional message types, e.g. “Packet Too Big” multicast group management functions
CSC4430 – Data Communication and Computer Networks
27
15.5. IPv6
Transition from IPv4 to IPv6: z
Not all routers can be upgraded simultaneous. no “flag days”. How will the network operatewith mixed IPv4 and IPv6 routers?
z
Two proposed approaches: Dual Stack: some routers with dual stack (v6, v4) can “translate” between formats. Tunneling: IPv6 carried as payload n IPv4 datagram among IPv4 routers.
CSC4430 – Data Communication and Computer Networks
28
15.5. IPv6
Dual Stack Approach:
CSC4430 – Data Communication and Computer Networks
29
15.5. IPv6
Tunneling:
IPv6 inside IPv4 where needed
CSC4430 – Data Communication and Computer Networks
30
15.5. IPv6
Dual Stack: z
Router converts header format between IPv6 to IPv4. Data
H6
Data
H4
Tunnelling: z
Using IPv4 header format to encapsulate IPv6 header. Data
H6
Data
CSC4430 – Data Communication and Computer Networks
H6
H4
31
15.6. Further Readings
Internet Network Layer: z z z z
Internet Routing Protocols : Section 21.7 – 21.8. IP Datagram Format : Section 24.2. IP Addressing : Section 24.3. IPv6: Appendix H.
CSC4430 – Data Communication and Computer Networks
32
Next Lecture
IP Control Protocols (Forouzan Section 24.5 Ross Chapter 4)
33