1 of 28

18BCT41 – COMPUTER NETWORKS

Prepared by:

Ms. K.Sathya

AP/CT-UG

Kongu Engineering College

2 of 28

Network Layer

  • Internetworking
  • Fragmentation
  • IP Addressing

3 of 28

INTERNETWORKING

Internetworking, connecting networks together to make an internetwork or an internet.

An IPv4 address is a 32-bit address that uniquely and universally defines the connection of a device to the Internet.

The address space of IPv4 is 232 .

4 of 28

Network layer in an internetwork

5 of 28

Finding the classes in binary and dotted-decimal notation

6 of 28

Default masks for classful addressing

7 of 28

Dotted-decimal notation and binary notation for an IPv4 address

8 of 28

Change the following IPv4 addresses from binary notation to dotted-decimal notation.

Example

Solution

We replace each group of 8 bits with its equivalent decimal number (see Appendix B) and add dots for separation.

9 of 28

Change the following IPv4 addresses from dotted-decimal notation to binary notation.

Example

Solution

We replace each decimal number with its binary equivalent (see Appendix B).

10 of 28

Position of IPv4 in TCP/IP protocol suite

11 of 28

IPv4 datagram format

12 of 28

Encapsulation of a small datagram in an Ethernet frame

13 of 28

Protocol field and encapsulated data

14 of 28

Fragmentation example

15 of 28

Detailed fragmentation example

16 of 28

A packet has arrived with an M bit value of 1. Is this the first fragment, the last fragment, or a middle fragment? Do we know if the packet was fragmented?

Solution

If the M bit is 1, it means that there is at least one more fragment. This fragment can be the first one or a middle one, but not the last one. We don’t know if it is the first one or a middle one; we need more information (the value of the fragmentation offset).

Example

17 of 28

A packet has arrived with an M bit value of 1 and a fragmentation offset value of 0. Is this the first fragment, the last fragment, or a middle fragment?

Solution

Because the M bit is 1, it is either the first fragment or a middle one. Because the offset value is 0, it is the first fragment.

Example

18 of 28

Classful addressing, which is almost

obsolete, is replaced with classless

addressing.

Classful Address

In classful addressing, a large part of the available addresses were wasted.

19 of 28

Another way to find the first address, the last address, and the number of addresses is to represent the mask as a 32-bit binary (or 8-digit hexadecimal) number. This is particularly useful when we are writing a program to find these pieces of information. In Example /28 can be represented as

11111111 11111111 11111111 11110000

Find

a. The first address

b. The last address

c. The number of addresses.

Example

20 of 28

Solution

a. The first address can be found by ANDing the given� addresses with the mask. ANDing here is done bit by� bit. The result of ANDing 2 bits is 1 if both bits are 1s;� the result is 0 otherwise.

Example

21 of 28

b. The last address can be found by ORing the given� addresses with the complement of the mask. ORing� here is done bit by bit. The result of ORing 2 bits is 0 if� both bits are 0s; the result is 1 otherwise. The� complement of a number is found by changing each 1� to 0 and each 0 to 1.

Example

22 of 28

A frame in a character-oriented protocol

23 of 28

A NAT implementation

24 of 28

The first address in a block is �normally not assigned to any device; �it is used as the network address that represents the organization �to the rest of the world.

25 of 28

IPv6 ADDRESSES

Despite all short-term solutions, address depletion is still a long-term problem for the Internet. This and other problems in the IP protocol itself have been the motivation for IPv6.

An IPv6 address is 128 bits long

26 of 28

IPv6 datagram header and payload

27 of 28

Format of an IPv6 datagram

28 of 28

Comparison between IPv4 and IPv6 packet headers