+ All Categories
Home > Documents > Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on –...

Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on –...

Date post: 13-Aug-2020
Category:
Upload: others
View: 0 times
Download: 0 times
Share this document with a friend
58
Datalink and Network layers Yuzo Taenaka Laboratory for Cyber Resilience, NAIST
Transcript
Page 1: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Datalink and Network layers

Yuzo Taenaka

Laboratory for Cyber Resilience, NAIST

Page 2: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Agenda

1. Assignment follow-up

2. Datalink layer (Logical Link Control sublayer)

3. Network layer (Internet protocol)

4. Hands-on

– Network building challenge

Internet Engineering / 2019

Application

Presentation

Session

Transport

Network

Data Link

Physical

OSI 7 layer

Application

Transport

Network

TCP/IP model

Network

interface layer

Page 3: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Assignment 2

Capture the traffic in two scenarios on the topology you make in hands-on and answer the questions– Scenario 1: pyng from host A to B

– Scenario 2: pyng from host A to C

– Questions

• (1) Describe each field of frame header in several frames you captured in scenario 1

• (2) Describe what happens in each scenario by showing frames you captured

• (3) Describe the difference between scenario 1 and 2, and guess the reason of the difference

(4) Why CSMA/CD is not used any more? What changed by discarding CSMA/CD?

(5) Why CSMA/CA is still used?

Deadline: June 18 (Tue) 17:00, 2019

Submission: via e-mail with PDF formatInternet Engineering / 2019

Page 4: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Frame generated by pyng

Internet Engineering / 2019

Frame header

data just saying ”Hi“

Ethernet header + data

Page 5: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Follow-ups

Internet Engineering / 2019

Host A Host B Host C Host D

Scenario 1

Scenario 2

A frame (a chunk of datalink) only

reaches a host on a same datalink

but never go outside of the datalink (network)

→ network layer technology required

→ Successfully delivered

→ Nothing delivered

Page 6: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

[FYI] Good examples

(4) Why CSMA/CD is not used any more? What changed by discarding CSMA/CD?– CSMA/CD is not being used anymore because we no longer needed it.

The mechanism is used in half-duplex ethernet in the old times where point-to-point, bus, or ring network topology still exist. Nowadays, the network cable had become full duplex, any device can communicate at any time. The computers do not need to consider the collusion anymore in wired connection. Moreover, the network cable cost has reduced such that everyone prefer reliability than cost effective approaches. Hence, network from big to small is already using the star and/or mesh network topology. This is where every device connects directly to the switch via wire. So, almost no collusion.

(5) Why CSMA/CA is still used?– CSMA/CA is still being use due to the popularity of wireless

communication, especially wireless LAN. This is where every device is forced to be mindful of every other device around it to avoid communication loss. Since communication through the air at the same time with the same frequency still cause collision. If some entity is sending data, other should wait for a random time and try again. It is still viewed as a great solution to avoid frame collusion.

Internet Engineering / 2019

Page 7: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Logical Link Control (LLC) sublayer

Internet Engineering / 2019

Datalink Layer

Application

Presentation

Session

Transport

Network

Data Link

Physical

OSI 7 layer

Application

Transport

Network

TCP/IP model

Network

interface layer

Data Link

IP (network)

802.3

MAC

Ethernet WLAN

LLC

802.11

MAC

Page 8: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Data Link Layer (LLC) Services overview

Error Detection:

– Errors caused by signal attenuation and noise

– Receiver detects presence of errors

Error Correction:

– Receiver identifies and corrects bit error(s) without resorting

to retransmission

Flow Control:

– Pacing between adjacent sending and receiving nodes

Internet Engineering / 2019

Page 9: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Error detection & correction

Internet Engineering / 2019

Page 10: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Errors in Physical Layer

Noise

Attenuation

Distortion

Internet Engineering / 2019

Page 11: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Internet Engineering / 2019

Error Control

Goal– Detecting and correcting transmission error in channel

• Was the frame correctly sent?

• Was the frame sequence order correct?

Techniques– Introducing the concept of frame (failure localization)

– Coding techniques

• Error Detection Code – Parity, CRC (Cyclic redundancy check)

• Error Correction Code – FEC

– Protocol techniques for error correction

• Timer

• Retransmission

Page 12: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Basic idea of CRC

Given:

– Polynomial expression of m bit frame M(x) (degree m-1)

– Generator polynomial G(x), of degree r (r < m)

Compute:

– prepare xrM(x): frame with r zeros → M’(x)

– Compute modulo (XOR) of M’(x) divided by G(x): R(x)

– Frame for transmission: F(x)

• F(x) = M’(x) + R(x)

Successful transmission: F(x) / G(x) = 0

– Nonzero otherwise. i.e., error detection.

– Consecutive errors less than r bits can be detected

Internet Engineering / 2019

Simplified concept: 5 mod 2 = 1, 5 + 1 = 6 → 6 / 2 = 0M(x) G(x) F(x)

Page 13: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Standardized CRC polynomials

Commonly known standards

– CRC-12

• x12+x11+x3+x2+x+1

– CRC-16

• x16+x15+x2+1

– CRC-32

• x32

+x26

+x23

+x22

+x16

+x12

+ x11

+x10

+x8+x

7+ x

5+x

4+x

2+x+1

– CRC-CCITT

• x16+x12+x5+1

There are many other error detection codes.

Internet Engineering / 2019

Page 14: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Flow control

Internet Engineering / 2019

Page 15: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Flow Control

Flow Control Protocols deal with how to send

sequences of frames

They have two goals:

– Recover from lost frames

– Prevent buffer overflows

Network Layer may want to receive same set of

frames in the same order they were sent

Automatic Repeat Request (ARQ)

– Stop-and-wait

– Go-back-N

– Selective-repeat

Internet Engineering / 2019

Page 16: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

In a case without flow control

Sender sends frames at an arbitrary timing

Frames may be dropped on an intermediate media

Receiver takes time to process a frame

Internet Engineering / 2019

sender receiver

3 frames arrives while

processing 1 frame

→ buffer overflow

sender receiver

X

X

Page 17: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Internet Engineering / 2019

Stop-and-wait ARQ (1)

t1 t2 t3

t4

t5t1Sender

Receiver

t1: Round Trip Time

t2: Frame Transmission Time

t3: Frame Processing Time

t4: ACK Transmission Time

t5: ACK Processing Time

Page 18: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Internet Engineering / 2019

Stop-and-wait ARQ (2)

Procedure

– Waiting to receive ACK on each frame

transmission

– Setting a sender timer greater than

2t1+t2+t3+t4

– Retransmission when sender timer

times out.

Characteristics

– Simple

– The buffer never contains more than

one frame for the receiver and the

sender

– Very low utilization of channel capacity

Page 19: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Internet Engineering / 2019

Go-back-N ARQ

1 653 45432

1 653 4542

Time out for Frame3

!!

Page 20: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Internet Engineering / 2019

Selective-Repeat ARQ

1 873 65432

1 873 6542

Time out for Frame3

!!

Page 21: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

ARQ: simplicity vs efficiency, adaptability

Stop-and-Wait

– Simple

– No large buffer required in both ends

Go-back-N

– Still simple, but buffer management has to be done at

SENDER.

– N means the buffer size

– There is no large buffer required at RECEIVER side.

Selected Repeat

– Efficient but complicated scheme that requires buffer, timer,

and ACK managements.

– Buffers are required in both ends.

– Window Flow Control is needed for buffer management.

Internet Engineering / 2019

Page 22: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Internet Engineering / 2019

Burden sharing among layers

Assignment of function depends on communication

system designs

Various solutions exist

Data Link

Network

Transport sequence assurance

flow control

retransmission

interconnection of network

error detection and correction

frame boundary

Page 23: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Network Layer

Internet Engineering / 2019

Application

Presentation

Session

Transport

Network

Data Link

Physical

OSI 7 layer

Application

Transport

Network

TCP/IP model

Network

interface layer

Page 24: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Coverage

Internet Engineering / 2019

Application

Presentation

Session

Transport

Network

Data Link

Physical

ES (End System)

Physical connection

Physical

802.11 MAC

Physical

802.3 MAC

LLC

Network

Data

Link

Physical

IS (Intermediate System)

switch

Router

Data

Link

Physical

End-to-end communication over multiple

datalinks (networks).

Application

Presentation

Session

Transport

Network

Data Link

Physical

ES (End System)

Page 25: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Role of internet protocol (IP)

Globally unique IP address

– Hierarchical address architecture

– Supplemental protocols such as DHCP (Dynamic host

configuration protocol) and DNS (domain name system)

End-to-end packet delivery (Routing)

– Connecting heterogeneous datalinks

– Failure recovery

1-N communication (broadcast/multicast)

Internet Engineering / 2019

Page 26: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

How the Internet works

Internet Engineering / 2019

Network

Network

LLC

A

B

Where is B?

Network 1

Network 2

Network 3R1

R2

Network 3 → R2

Routing table:

Page 27: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

IPv4 address

Characteristics of IP address:

It is global: uniquely identifiable worldwide

It is hierarchical: delegated to regional bodies

It has two parts: network identifier and host identifier

It has several types

Type of

address

Subspace of addresses that

are hierarchically delegated

Network Host

0xDD0xA3 0x4A 0x7F

163.221.74.127/24

163 221 74 127

Network address : 16bit

Prefix length

e.g. IPv4 address

Internet Engineering / 2019

NAIST: 163.221.0.0/16

Page 28: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

IPv4 address space: minor exceptionsRFC 1918, RFC 3330

Internet Engineering / 2019

The Internet Assigned Numbers Authority (IANA) has reserved the

following three blocks of the IP address space for private internets:10.0.0.0 - 10.255.255.255 (10/8 prefix)

172.16.0.0 - 172.31.255.255 (172.16/12 prefix)

192.168.0.0 - 192.168.255.255 (192.168/16 prefix)

0.0.0.0/8 – Addresses in this block refer to source hosts on "this” network.

127.0.0.0/8 – loopback address. A datagram sent by a higher level protocol

to an address anywhere within this block should loop back inside the host.

169.254.0.0/16 – "link local" block. It is allocated for communication between

hosts on a single link. Hosts obtain these addresses by auto-configuration,192.0.2.0/24 – "TEST-NET" for use in documentation and example code.

Addresses within this block should not appear on the public Internet.

224.0.0.0/4 – multicast address. This block, formerly known as the Class D

address space, is allocated for use in IPv4 multicast address assignments.

Page 29: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

IPv4 address representations

Internet Engineering / 2019

1 0 1 0 0 0 1 1 1 1 0 1 1 1 0 1 0 1 0 0 1 0 1 0 0 1 1 1 1 1 1 1 1

163 . 221 . 74 . 127 / 24

1 byte = 8 bit x 4 section

4 byte = 32 bit

Network address (24bit)

Decimal notation

Binary notation

Host address

Page 30: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

hierarchical IP address assignment

Internet Engineering / 2019

163.221.0.0/16NAIST

* This is not a real scenario

163.221.0.0/18 163.221.64.0/18

LibraryAdmin. section

163.221.128.0/18

ITC

Graduate school

163.221.192.0/18

Bio Material

Information

163.221.192.0/20 163.221.208.0/20

163.221.224.0/20

JPNIC 0 0 0 0 0 0 0 0 = 0

0 1 0 0 0 0 0 0 = 64

1 0 0 0 0 0 0 0 = 128

1 1 0 0 0 0 0 0 = 192

Page 31: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

IP address is good for routing

Internet Engineering / 2019

163.221.0.0/16NAIST

163.221.0.0/18 163.221.64.0/18LibraryAdmin. section

163.221.128.0/18

ITC

Graduate school

163.221.192.0/18

Bio Material Information

163.221.192.0/20 163.221.208.0/20 163.221.224.0/20

R3 R4

R1

R2

163.221.0.0/16

is at me.

Single information

Routing table:

163.221.0.0/18 → R2

163.221.64.0/18 → R3

163.221.128.0/18 → R4

163.221.192.0/18 → R5

R5

* Routing will be in next class, July 26

Page 32: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Addressing one or more nodes

Unicast– Point-to-point communication

– Specify a source and a destination address

Broadcast

Multicast– Transmission to “interested” hosts

– Interested hosts join the group

Internet Engineering / 2019

Page 33: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Broadcast

Broadcast– Sends data to all hosts on the same datalink

• Broadcast depends on the same capability in datalink– IP broadcast

should be mapped to:

– Link-layer broadcast

• Some datalinks don’t support broadcast

– Some hosts may not be hearing you

• Offline hosts can’t receive

• Receiver may be busy

Internet Engineering / 2019

Page 34: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Multicast

Multicast– Group communication; one-to-many or many-to-many

– Membership:• if a host is not a member of the group, it doesn’t receive

packets to the group

– membership management

– group management

Well-defined mapping– IP multicast, to

– Link-layer multicast

Internet Engineering / 2019

Page 35: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

key protocol to connect network and datalink

A source terminal must ask a router to relays packets to

outside of the datalink

– How to reach the router?

→ identify the datalink address of router by address resolution protocol

(ARP)

→ a frame encapsulating an IP packet send to the datalink address

Internet Engineering / 2019

163.221.11.43

Known router

Destination

163.221.11.43ARP

ARP

ARP

Page 36: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Network to datalink: Address Resolution

Protocol (ARP) for IP version 4

A → B: “M”

– a → all stations (broadcast in datalink): “where is B”

– b → a: “B is at b”

– a → b: “A → B: “M””

Internet Engineering / 2019

A B C

a b c Data-link layer

Network layer

RFC 826

Page 37: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Network to datalink: the case of bridged or

switched networks

A → C: “M”

– a → all stations: “where is C”

– c → a: “C is at c”

– a → c: “A → C: “M””

Internet Engineering / 2019

A B

a b

C D

c d

T

t

Data-link layer

Network layer

Page 38: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Network to datalink: the case of routed networks

A → C: “M”

– a → all stations: “where is R”

– r → a: “R is at r”

– a → r: “A → C: “M”

Internet Engineering / 2019

r → all stations: “where is C”

c → r: “C is at c”

r → c: “A → C: “M””

A B

a b

C D

c d

Data-link layer

Network layer

R

r

Page 39: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

A hierarchical perspective

Datalink Layer Datalink Layer

Network Layer

Datalink to Network

(demultiplexing):

Using

Ethernet II header

Network to Datalink

(multiplexing):

Using ARP

Internet Engineering / 2019

Page 40: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Datalink to network layer

Multiple network layer protocols are multiplexed on a

single datalink

Needed: Multiplexing, de-multiplexing

IPv4 IPv6 ....

Ethernet

IPv4 IPv6 ....

Ethernet Datalink

Network

?

Internet Engineering / 2019

Page 41: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Demultiplexing by DIX Ethernet header

Internet Engineering / 2019

Source address Payload (IP packet)Destination

addressType

0x0800 IPv4

0x0806 ARP

0x0809 AppleTalk

0x8191 NetBIOS

0x86dd IPv6

・・・

Page 42: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Example

Internet Engineering / 2019

Page 43: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Debugging IP

How do I know IP is nicely working over given datalink?

How do I know the IP address is correct?

Internet Engineering / 2019

Page 44: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

ICMP: internet control message protocol

Handy for probing the Internet

without help of transport protocols

A very simple “debug function” for IP:

– Echo request

– Echo reply

Gateways may return diagnostic ICMP messages:

0 = net unreachable;

1 = host unreachable;

2 = protocol unreachable;

3 = port unreachable;

4 = fragmentation needed and DF set;

5 = source route failed.

Internet Engineering / 2019

RFC 792

Page 45: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

End-to-end diagnostics with ICMP

ICMP echo can be used to:

– Check if the destination IP is reachable from source

– Identify faulty section in the middle

By obtaining echo reply

or other diagnostic ICMP messages

Application

Presentation

Session

Transport

Network

Data Link

Physical

Application

Presentation

Session

Transport

Network

Data Link

Physical

Internet Engineering / 2019

ICMP message

Page 46: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

IP version 6

Internet Engineering / 2019

Page 47: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Unallocated IPv4 address

Internet Engineering / 2019

https://ipv4.potaroo.net

IPv4 address is only 232

Page 48: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

IPv6 Address representations

eight groups of four hexadecimal digits (16bits)

– Totally 128bit → 2128 = 340,282,366,920,938,463,463,374,607,431,768,211,456

– Separated by “ : “

Too long → shorten address

– One or more leading zeroes can be removed

– Consecutive sections of zeroes are replaced with :: only once

Internet Engineering / 2019

2001:0200:016a:1010:0000:0000:0796:0ae7

2001:200:16a:1010:0:0:796:ae7

2001:200:16a:1010::796:ae7

2001:0200:016a:1010:0000:0000:0796:0ae7

2001::50::351 →XTwice

hexagonal notation

2001:0:0:50:0:0:0:351?

2001:0:0:0:50:0:0:351?

Page 49: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

IPv6 address space

Internet Engineering / 2019

Usage Prefix Ratio

Reserved 00000000 1/256

...

Global Unicast 001 1/8

Unassigned 010 1/8

Unassigned 011 1/8

Unassigned 100 1/8

Unassigned 101 1/8

..

Link-Local Unicast 11111110 10 1/1024

Multicast Address 11111111 1/256

Global Unicast: It’s a pretty big address space of 2^30,

large enough to accommodate Internet of Things

Page 50: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Multiplexing/demultiplexing in IPv6

Datalink Layer Datalink Layer

Network Layer

Datalink to Network

(demultiplexing):

Using

Ethernet II header

Network to Datalink

(multiplexing):

Using

NDP (IPv6)

Internet Engineering / 2019

Same with IPv4 case

Page 51: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Network to datalink: Neighbor Discovery

Protocol for IP version 6

A → B: “M”

– A → M(B): “where is B”

– B → A: “B is at b”

– a → b: “A → B: “M””

– M() maps unicast address to solicited-node multicast

address

Internet Engineering / 2019

RFC 4861

A B C

a b c Data-link layer

Network layer

Page 52: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Some tricks in connecting networks

Is it so simple to connect vastly different two networks?

Internet Engineering / 2019

Page 53: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Fragmentation and reassembly:

adapting to diverse datalinks

Datalinks have different MTUs– MTU: Maximum Transmission Unit

Fragmentation:– Splits packets in order to fit into smaller MTU

Reassembly:– Assembles fragmented packets at the receiving host

NOTE: this applies to IPv4 only

MTU = 1520MTU = 9128

Internet Engineering / 2019

4500 1500 1500 1500

Page 54: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Fragmentation info in IPv4 header

Flags = {0, MF, DF}

Fragment offset: 13 bits

8 310 4 16

Ver.

Option (if any)

IHL Type of

ServiceTotal Length (in Octet)

Identification Flags Fragment Offset

Time to Live Protocol Header Checksum

Source Address

Destination Address

Internet Engineering / 2019

Page 55: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Path MTU discoverymandatory in IP version 6

Probe MTU for destination

Remember MTU

Avoid fragmentation in the middle

Internet Engineering / 2019

RFC 1981

Application

Presentation

Session

Transport

Network

Data Link

Physical

ICMP

packet too big

90009000 1500

Page 56: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Summary

Basic ideas of Network layer (Internet protocol)

How to make a end-to-end packet delivery

Basic concept of IPv6

Since you already got the concept, you can easily

learn the technical detail.

Internet Engineering / 2019

Page 57: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Assignment 3

build your own network and answer the following

questions for the network.

– (1) illustrate your network with IP address assignment

– (2) describe everything what you did to build the network and

what it was for

– (3) Prove that the multiplexing/demultiplexing between datalink

and network layers happens on your network

• You may need to send/capture packets anywhere on your network

※ You can use the network that you made at hands-on but you will get extra

score if you build a network with more complexity (you can find how to extend the

topology in the supplemental material).

Answer the questions by your own knowledge

– (4) Describe how the Internet delivers packets to a destination.

You must introduce how the datalink and network layers works

and how the headers of datalink and network layers are used.Internet Engineering / 2019

※ Note your report must be understandable to undergraduate students.

Page 58: Datalink and Network layers - NAIST€¦ · Network layer (Internet protocol) 4. Hands-on – Network building challenge Internet Engineering / 2019 A ppli cati on Presentati on Sessi

Assignment 3 (contd.)

Make the routing tables of all hosts in the below

figure on a paper and describe why so

Submit PDF via email by June 25, 2019 17:00 JST

– ※ Even if you do not finish, you should submit.

Internet Engineering / 2019


Recommended