ceng415 communication networks
Download
Skip this Video
Download Presentation
CENG415 – Communication Networks

Loading in 2 Seconds...

play fullscreen
1 / 12

CENG415 – Communication Networks - PowerPoint PPT Presentation


  • 113 Views
  • Uploaded on

CENG415 – Communication Networks. Lectures 14 Network layer – IP protocol. ICMP/IP protocol error reporting router “signaling”. IP protocol addressing conventions datagram format packet handling conventions. Routing protocols path selection RIP, OSPF, BGP. forwarding table.

loader
I am the owner, or an agent authorized to act on behalf of the owner, of the copyrighted work described.
capcha
Download Presentation

PowerPoint Slideshow about ' CENG415 – Communication Networks' - travis


An Image/Link below is provided (as is) to download presentation

Download Policy: Content on the Website is provided to you AS IS for your information and personal use and may not be sold / licensed / shared on other websites without getting consent from its author.While downloading, if for some reason you are not able to download a presentation, the publisher may have deleted the file from their server.


- - - - - - - - - - - - - - - - - - - - - - - - - - E N D - - - - - - - - - - - - - - - - - - - - - - - - - -
Presentation Transcript
ceng415 communication networks

CENG415 – Communication Networks

Lectures 14

Network layer – IP protocol

the internet network layer

ICMP/IP protocol

  • error reporting
  • router “signaling”
  • IP protocol
  • addressing conventions
  • datagram format
  • packet handling conventions
  • Routing protocols
  • path selection
  • RIP, OSPF, BGP

forwarding

table

The Internet Network Layer

Host, router network layer functions:

Transport layer: TCP, UDP

Network

layer

Link layer

physical layer

ip datagrapm format

IP protocol version number

32 bits

total datagram

length (bytes)

head.

len

type of

service

header length (bytes)

length

ver

for

fragmentation/

reassembly

fragment

offset

“type” of data

flgs

16-bit identifier

max number remaining hops (decremented at

each router)

upper

layer

time tolive

header

checksum

32 bit source IP address

32 bit destination IP address

upper layer protocol

to deliver payload to

E.g. timestamp,

record route

taken, specify

list of routers

to visit.

Options (if any)

data

(variable length,

typically a TCP

or UDP segment)

IP Datagrapm Format
fragmentation reassembly
Fragmentation & Reassembly

Definition

    • MTU: Maximum Transfer size. The maximum number of a datagram in bytes, including the IP header, that can travel a specific network (LAN)
    • Fragmentation is the process of dividing a Datagram into smaller pieces.

Why?

    • A datagram reaches a router and need to be transferred to a network with MTU smaller than the datagram size

Where?

    • Fragmentation happen in Routers
    • Reassembly in destination host only
  • How?
    • Identifier, Flags and Fragment Offset
fragmentation reassembly1

length

=1500

ID

=x

length

=4000

ID

=x

ID

=x

length

=1500

length

=1040

ID

=x

fragflag

=1

offset

=0

fragflag

=0

fragflag

=0

offset

=0

offset

=370

fragflag

=1

offset

=185

One large datagram becomes

several smaller datagrams

Fragmentation & Reassembly

Example

  • 4000 byte datagram
  • MTU = 1500 bytes

1480 bytes in data field

offset =1480/8

Steps:

1. Subtract 20 from original length: 4000 -20 = 3980 (bytes of "IP data")

2. Subtract 20 from new MTU: 1500- 20 = 1480 (max. bytes of data in each fragment)

3. Divide "maximum data bytes" by 8: 1480/8 = 185 to get offset increment

4. Offset of each fragment "n" (n = 0, 1, 2, ...) = n x "offset increment": 0, 185, 370. ...

5. Length of each fragment (except last) = 20 + "max. data bytes" = 20 +1480 = 1500

Length of last fragment = 20 + remaining data bytes = 20 + 3980 - 2 x 1480 = 1040

fragmentation reassembly2
Fragmentation & Reassembly

Stepsto remember:

  • Subtract 20 from original length: (bytes of "IP header data")
  • Subtract 20 from new MTU: (max. bytes of data in each fragment)
  • Divide "maximum data bytes" by 8: to get offset increment
  • Offset of each fragment "n" (n = 0, 1, 2, ...) = n x "offset increment"
  • Length of each fragment (except last) = 20 + "max. data bytes“
  • Length of last fragment = 20 + remaining data bytes
example fragmentation

40.0.0.7

40.0.0.0/12

MTU=900

30.0.0.7

30.0.0.0/15

MTU=1700

Router 1

50.1.0.8

40.0.0.8

60.2.0.0/17

MTU=800

Router 2

50.1.0.0/18

MTU=700

C1

Router 3

C2

50.1.0.9

60.2.0.9

Example: Fragmentation
  • Computer 1 sends a 1500 bytes datagram to C2.
  • Find the fragments that reaches C2
example fragmentation1

40.0.0.7

40.0.0.0/12

MTU=900

30.0.0.7

30.0.0.0/15

MTU=1700

Router 1

C2

50.1.0.8

40.0.0.8

60.2.0.0/17

MTU=800

Router 2

50.1.0.0/18

MTU=700

C1

Router 3

50.1.0.9

60.2.0.9

Example: Fragmentation

Router 1: output MTU is 900. Datagram is 1500.

1500-20 = 1480 900-20 = 880 880/8 = 1101480 = 880 + 600  Two segments

example fragmentation2

40.0.0.7

40.0.0.0/12

MTU=900

30.0.0.7

30.0.0.0/15

MTU=1700

Router 1

C2

50.1.0.8

40.0.0.8

60.2.0.0/17

MTU=800

Router 2

50.1.0.0/18

MTU=700

C1

Router 3

50.1.0.9

60.2.0.9

Example: Fragmentation

Router 2: output MTU is 700. Datagram 880 need to be fragmented

fragmentation
Fragmentation

Complete Datagram

To identify segments:

  • Flag = 0
  • Offset = 0
  • Flag = 1
  • Offset = 0
  • Flag ≠ 0
  • Offset ≠ 0
  • Flag = 0
  • Offset ≠ 0

First segment

Intermediate fragment

Last fragment

reassembly
Reassembly

fragmentation:

in: one large datagram

out: 3 smaller datagrams

  • different link types, different MTUs
  • large IP datagram divided (“fragmented”) within net
    • one datagram becomes several datagrams
    • “reassembled” only at final destination
    • IP header bits used to identify, order related fragments

Blue: IP Header

reassembly

Another fragment flag, DNF (do not fragment) causes a ICMP response (and dropped datagram) instead of fragmentation. The sender then resends future datagrams with smaller size (may fragment itself or reduce MSS for TCP)

ad