Top Banner
Network Layer Part IV Computer Networks Tutun Juhana Telecommunication Engineering School of Electrical Engineering & Informatics Institut Teknologi Bandung 7
37

Et3003 sem2-1314-7 network layers iv (ipv4)

Jun 20, 2015

Download

Technology

Tutun Juhana

IPv4
Welcome message from author
This document is posted to help you gain knowledge. Please leave a comment to let me know what you think about it! Share it to your friends and learn new things together.
Transcript
Page 1: Et3003 sem2-1314-7 network layers iv (ipv4)

Network Layer Part IV

Computer Networks

Tutun JuhanaTelecommunication EngineeringSchool of Electrical Engineering & InformaticsInstitut Teknologi Bandung

7

Page 2: Et3003 sem2-1314-7 network layers iv (ipv4)

INTERNET PROTOCOL VERSION 4 (IPV4)

Page 3: Et3003 sem2-1314-7 network layers iv (ipv4)

3

Page 4: Et3003 sem2-1314-7 network layers iv (ipv4)

4

This is why we need Total Length field

Page 5: Et3003 sem2-1314-7 network layers iv (ipv4)

5

Page 6: Et3003 sem2-1314-7 network layers iv (ipv4)

6

Page 7: Et3003 sem2-1314-7 network layers iv (ipv4)

7

Page 8: Et3003 sem2-1314-7 network layers iv (ipv4)

8

FRAGMENTATION

Page 9: Et3003 sem2-1314-7 network layers iv (ipv4)

9

Maximum Transfer Unit (MTU)

Page 10: Et3003 sem2-1314-7 network layers iv (ipv4)

10

• Maximum IP datagram length is 65,535 bytes

• We might have to divide the datagram to make it possible to pass through different physical networks This is called fragmentation.

Page 11: Et3003 sem2-1314-7 network layers iv (ipv4)

11

• When a datagram is fragmented, each fragment has its own header with most of the fields repeated, but some changed

• A fragmented datagram may itself be fragmented if it encounters a network with an even smaller MTU (a datagram can be fragmented several times before it reaches the final destination)

• A datagram can be fragmented by the source host or any router in the path

• The reassembly of the datagram, however, is done only by the destination host

Page 12: Et3003 sem2-1314-7 network layers iv (ipv4)

12

• When a datagram is fragmented, required parts of the header must be copied by all fragments The option field may or may not be copied

• The host or router that fragments a datagram must change the values of three fields: flags, fragmentation offset, and total length (The rest of the fields must be copied)

• The value of the checksum must be recalculated regardless of fragmentation.

Page 13: Et3003 sem2-1314-7 network layers iv (ipv4)

13

Fields Related to Fragmentation

• Identification• Flags• Fragmentation offset

Page 14: Et3003 sem2-1314-7 network layers iv (ipv4)

14

Identification

• 16 bit• Identifies a datagram originating from the source host• The combination of the identification and source IP

address must uniquely define a datagram as it leaves the source host.

• When a datagram is fragmented, the value in the identification field is copied into all fragments all fragments have the same identification number, which is also the same as the original datagram

• The identification number helps the destination in reassembling the datagram all fragments having the same identification value should be assembled into one datagram

Page 15: Et3003 sem2-1314-7 network layers iv (ipv4)

15

Flags

• D (Do not fragment)– ‘1’ : machine must not fragment the datagram– ‘0’ : datagram can be fragmented if necessary

• M (More fragments)– ‘1’ : datagram is not the last datagram– ‘0’ : This is the last or only fragment

not used

Page 16: Et3003 sem2-1314-7 network layers iv (ipv4)

16

Fragmentation offset• This 13-bit field shows the relative position of this

fragment with respect to the whole datagram.• Measured in units of 8 bytes

Page 17: Et3003 sem2-1314-7 network layers iv (ipv4)

17

identification

The last fragment

the offset field is always relative to the original datagram

Page 18: Et3003 sem2-1314-7 network layers iv (ipv4)

18

• Final destination host can reassemble the original datagram from the fragments received (if none of them is lost) using the following strategy:a. The first fragment has an offset field value of zero.

b. Divide the length of the first fragment by 8. The second fragment has an offset value equal to that result.

c. Divide the total length of the first and second fragment by 8. The third fragment has an offset value equal to that result.

d. Continue the process. The last fragment has a more bit value of 0.

Page 19: Et3003 sem2-1314-7 network layers iv (ipv4)

19

OPTIONS

Page 20: Et3003 sem2-1314-7 network layers iv (ipv4)

20

• Are not required for a datagram – But all IP software implementations must be

able to handle options if they are present in the header.

• Can be used for network testing and debugging.

Page 21: Et3003 sem2-1314-7 network layers iv (ipv4)

21

Format

type-length-value (TLV)

Page 22: Et3003 sem2-1314-7 network layers iv (ipv4)

22

Option Types

do not require the length or the data fields

require the length or the data fields

Page 23: Et3003 sem2-1314-7 network layers iv (ipv4)

23

No-Operation Option

• 1-byte option used as a filler between options

Page 24: Et3003 sem2-1314-7 network layers iv (ipv4)

24

End-of-Option Option

• 1-byte option used for padding at the end of the option field.

• It can only be used as the last option Only one end-of-option option can be used After this option, the receiver looks for the payload data If more than 1 byte is needed to align the option field, some no-operation options must be used, followed by an end-of-option option

Page 25: Et3003 sem2-1314-7 network layers iv (ipv4)

25

Record-Route Option• is used to record the Internet routers that handle

the datagram• It can list up to nine router IP addresses

• Pointer field is an offset integer field containing the byte number of the first empty entry It points to the first available entry.

Page 26: Et3003 sem2-1314-7 network layers iv (ipv4)

26

Page 27: Et3003 sem2-1314-7 network layers iv (ipv4)

27

Strict-Source-Route Option

• used by the source to predetermine a route for the datagram as it travels through the Internet

Page 28: Et3003 sem2-1314-7 network layers iv (ipv4)

28

Page 29: Et3003 sem2-1314-7 network layers iv (ipv4)

29

Loose-Source-Route Option• similar to the strict source route, but it is more

relaxed Each router in the list must be visited, but the datagram can visit other routers as well.

Page 30: Et3003 sem2-1314-7 network layers iv (ipv4)

30

Timestamp• A timestamp option is used to record the time of

datagram processing by a router• The time is expressed in milliseconds from midnight,

Universal Time.

Page 31: Et3003 sem2-1314-7 network layers iv (ipv4)

31

Page 32: Et3003 sem2-1314-7 network layers iv (ipv4)

32

Page 33: Et3003 sem2-1314-7 network layers iv (ipv4)

33

CHECKSUM

Page 34: Et3003 sem2-1314-7 network layers iv (ipv4)

34

Checksum Calculation at the Sender

• The packet is divided into k sections, each of n bits.

• All sections are added together using one’s complement arithmetic.

• The final result is complemented to make the checksum.

Page 35: Et3003 sem2-1314-7 network layers iv (ipv4)

35

Page 36: Et3003 sem2-1314-7 network layers iv (ipv4)

36

Checksum in the IP Packet

Page 37: Et3003 sem2-1314-7 network layers iv (ipv4)

37