TSIN02 - Internetworking © 2004 Image Coding Group, Linköpings Universitet Lecture 2: The Internet Protocol Literature: ● Forouzan: ch 4-9 and ch 31
TSIN02 - Internetworking
© 2004 Image Coding Group, Linköpings Universitet
Lecture 2: The Internet Protocol
Literature:● Forouzan: ch 4-9 and ch 31
TSIN02 - Internetworking
2
Outline
● About the network layer– Tasks
– Addressing
– Routing
● Protocols
TSIN02 - Internetworking
3
Tasks of the network layer● Source to destination delivery of packets (across
multiple networks)
● Logical addressing - addresses valid over network borders
● Routing
● (Fragmentation and reassembly)
TSIN02 - Internetworking
4
Logical vs Physical Addresses
● Each network interface card (NIC) has a physical address, eg MAC addresses. They are enough within a LAN, but give no routing help outside the local area.
● Logical addresses was created to help with communication between networks. Nodes within a LAN have neighbouring IP addresses. All traffic to the network can be routed using the common part of the addresses in the LAN, the network address.
TSIN02 - Internetworking
5
Addressing● 32 bit addresses in IPv4 -->approx 4300 million
addresses available.
● Dotted decimal notation, eg. 198.36.42.18
● Sometimes hexadecimal notation is used, eg 0xC6242A12
TSIN02 - Internetworking
6
Classful Addressing● One reason that we are running out of available
addresses!
● Addresses are assigned in blocks where the block size is defined by the chosen class.
● Classes A-E. The first byte defines the class.
OBS! This is an obsolete addressing scheme! (They are still in use though...)
● Many organisations have been assigned more addresses than they need!
TSIN02 - Internetworking
7
Using more addresses
Several techniques have been developed to lower the number of wasted addresses, eg.:
● Subnetting - divide a block into subnets using netmasks.
● Supernetting - combine blocks into supernets using netmasks.
● Classless addressing - no classes
TSIN02 - Internetworking
8
Classless Addressing● Addresses are assigned in blocks of variable size.
Only restriction is that the size of the block should be a power of 2.
● Network address - the first address in the block
● Broadcast address - the last address in the block
● Network mask - used for extracting the network address,
● Slash notation - short form of network mask
TSIN02 - Internetworking
9
Delivery and Routing● Connection-oriented or connectionless service?
● Direct or indirect delivery?
● Routing tables - gets huge
– next-hop
– network specific
– static or dynamic?
– search algorithm?
TSIN02 - Internetworking
10
Protocols
TSIN02 - Internetworking
11
ARP● Maps logical addresses to physical addresses.
● ARP requests are broadcasts on the LAN.
● An ARP packet is encapsulated directly into a data link frame.
TSIN02 - Internetworking
12
RARP● Maps physical addresses to logical addresses.
● RARP requests are broadcast on the LAN
● A RARP packet is encapsulated directly into a data link frame.
TSIN02 - Internetworking
13
The Internet Protocol (IP)
● Unreliable
● Connectionless
● A “best effort” delivery service
TSIN02 - Internetworking
14
Datagram
TSIN02 - Internetworking
15
Fragmentation
● Maximum transfer unit (MTU)
● Each data link layer protocol use its own frame format.
● Fragmentation needed when passing to a network with a smaller MTU.
MTU examples:
Hyperchannel - 65535 bytes
Ethernet - 1500 bytes
PPP - 296 bytes
TSIN02 - Internetworking
16
Options
Options are used for testing and debugging purposes
TSIN02 - Internetworking
17
Checksum
Redundant information added that is used for error detection
The checksum is constructed as follows:
1. Divide the packet into k sections, each of n bits
2. All sections are added together using one's complement arithmetic. (We will look at this during Class 1)
3. The result is complemented to make the checksum
TSIN02 - Internetworking
18
ICMP● Messages are encapsulated in IP datagrams.
● Two types of messages:
– Error reporting
● Dest. unreachable
● Source quench
● Time exceeded
● Parameter problems
● Redirection
– Query
● Echo request and reply
● Timestamp request and reply
● Address-mask request and reply
● Router solicitation and advertisement
TSIN02 - Internetworking
19
IPv6
● Addressing● Packet format● Extension headers● Difference from IPv4● Transition from IPv4 to IPv6
TSIN02 - Internetworking
20
IPv6: Addressing
There is a new addressing system in IPv6:– 128 bit addresses
– new notation (hexadecimal colon notation)eg. FDEC:BA33:0000:0000:FFCD:03F1:0000:0001( or FDEC:BA33::FFCD:3F1:0:1)
– CIDR (slash) notation supported
– Three types of addresses– unicast– anycast– multicast
– Address structure Type Prefix Rest of address
128 bits
variable
TSIN02 - Internetworking
21
Address Space Assignments
Type Prefix Type Fraction0000 0000 Reserved 1/256010 Provider based addresses 1/2561111 1110 10 Link local addresses 1/10241111 1110 11 Site local addresses 1/10241111 1111 Multicast addresses 1/256
●Unspecified●Loopback●IPv4
●Type 3 bits●Registry id 5bits●Provider id 16 bits●Subscriber id 24 bits●Subnet id 32 bits●Node id 48 bits
TSIN02 - Internetworking
22
IPv6 Datagram
TSIN02 - Internetworking
23
Datagram format
TSIN02 - Internetworking
24
Extension headers (options)
– Hop-by-hop option● Pad1● PadN● Jumbo payload
– Source routing
– Fragmentation
– Authentication
– Encrypted Security Payload
– Destination Option
TSIN02 - Internetworking
25
Difference from IPv4
● Larger address space● Better header format● New options● Prepared for extensions● Support for resource allocation● Support for more security
TSIN02 - Internetworking
26
Transition Strategies
● Dual stack - hosts keep a dual stack of protocols, thus running IPv4 and IPv6 simultaneously.
● Tunneling - passing IPv6 packets through a region where IPv4 is used.– Automatic
– Configured
● Header translation - when only a few hosts use IPv4
TSIN02 - Internetworking
27
ICMPv6
● Message format● Difference from ICMPv4
TSIN02 - Internetworking
28
What's new?● ARP and IGMP included in ICMPv6
● RARP dropped
● Error report● Source quench report dropped
● Packet too big report added
IP
ICMPIGMP
ARP RARP
IP
ICMP
Network layer in version 4 Network layer in version 6
- Query- Timestamp query dropped- Address mask query dropped
TSIN02 - Internetworking
29
ICMPv6 message format