lecture 2: the internet protocol

29
TSIN02 - Internetworking © 2004 Image Coding Group, Linköpings Universitet Lecture 2: The Internet Protocol Literature: Forouzan: ch 4-9 and ch 31

Upload: others

Post on 12-Sep-2021

4 views

Category:

Documents


0 download

TRANSCRIPT

Page 1: Lecture 2: The Internet Protocol

TSIN02 - Internetworking

© 2004 Image Coding Group, Linköpings Universitet

Lecture 2: The Internet Protocol

Literature:● Forouzan: ch 4-9 and ch 31

Page 2: Lecture 2: The Internet Protocol

TSIN02 - Internetworking

2

Outline

● About the network layer– Tasks

– Addressing

– Routing

● Protocols

Page 3: Lecture 2: The Internet Protocol

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)

Page 4: Lecture 2: The Internet Protocol

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.

Page 5: Lecture 2: The Internet Protocol

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

Page 6: Lecture 2: The Internet Protocol

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!

Page 7: Lecture 2: The Internet Protocol

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

Page 8: Lecture 2: The Internet Protocol

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

Page 9: Lecture 2: The Internet Protocol

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?

Page 10: Lecture 2: The Internet Protocol

TSIN02 - Internetworking

10

Protocols

Page 11: Lecture 2: The Internet Protocol

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.

Page 12: Lecture 2: The Internet Protocol

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.

Page 13: Lecture 2: The Internet Protocol

TSIN02 - Internetworking

13

The Internet Protocol (IP)

● Unreliable

● Connectionless

● A “best effort” delivery service

Page 14: Lecture 2: The Internet Protocol

TSIN02 - Internetworking

14

Datagram

Page 15: Lecture 2: The Internet Protocol

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

Page 16: Lecture 2: The Internet Protocol

TSIN02 - Internetworking

16

Options

Options are used for testing and debugging purposes

Page 17: Lecture 2: The Internet Protocol

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

Page 18: Lecture 2: The Internet Protocol

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

Page 19: Lecture 2: The Internet Protocol

TSIN02 - Internetworking

19

IPv6

● Addressing● Packet format● Extension headers● Difference from IPv4● Transition from IPv4 to IPv6

Page 20: Lecture 2: The Internet Protocol

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

Page 21: Lecture 2: The Internet Protocol

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

Page 22: Lecture 2: The Internet Protocol

TSIN02 - Internetworking

22

IPv6 Datagram

Page 23: Lecture 2: The Internet Protocol

TSIN02 - Internetworking

23

Datagram format

Page 24: Lecture 2: The Internet Protocol

TSIN02 - Internetworking

24

Extension headers (options)

– Hop-by-hop option● Pad1● PadN● Jumbo payload

– Source routing

– Fragmentation

– Authentication

– Encrypted Security Payload

– Destination Option

Page 25: Lecture 2: The Internet Protocol

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

Page 26: Lecture 2: The Internet Protocol

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

Page 27: Lecture 2: The Internet Protocol

TSIN02 - Internetworking

27

ICMPv6

● Message format● Difference from ICMPv4

Page 28: Lecture 2: The Internet Protocol

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

Page 29: Lecture 2: The Internet Protocol

TSIN02 - Internetworking

29

ICMPv6 message format