techtud's picture

IPv4/IPv6 header and all fields explanation, Distance Vector Routing, Link state routing, transient and permanent problems. TCP Header, TCP connection establishment, Data transfer, Connection termination, Congestion Control, Slow start and congestion avoidance phase.

Content covered: 

IPv4 Header

More Less


IPv6: A quick introduction

IPv6 Addressing :
IPv6 is an Internet layer protocol for packet- switched internetworking & provides end-to-end datagram transmission across multiple IP networks.
An IPv6 address is 128 bits or 16 bytes long, the addresses are represented as eight groups of four hexadecimal digits separated by colons.
For example, FDEC:0000:0000:0000:BBFF:0000:FFFF:002E is an IPv6 address.
1. The leading zeros of a section can be omitted.
For example, 002E can be written as 2E and 0000 can be written as 0.
So the above address will look like, FDEC:0:0:0:BBFF:0:FFFF:2E
2. If there are consecutive sections consisting of zeros only, we can remove all the zeros and replace them with a double semicolon.(Note that this type of abbreviation is allowed only once per address)
So the above address will now look like, FDEC::BBFF:0:FFFF:2E

IPv6 Address Space:
The address space of IPv6 contains 2128 addresses.
In Ipv6, a destination address can belong to one of three categories:

1.Unicast Address:
A unicast address defines a single interface. The packet sent to a unicast address will be routed to the intended recipient.

2. Anycast Address:
An anycast address defines a group of computers that all share a single address. A packet with an anycast address is delivered to only one
member of the group, the most reachable one. The hardware and software generate only one copy of the request; the copy reaches only one of the servers. IPv6 does not designate a block for anycasting; the addresses are assigned from the unicast block.

3. Multicast Address
A multicast address also defines a group of computers. However, there is a difference between anycasting and multicasting. In anycasting, only one copy of the packet is sent to one of the members of the group; in multicasting each member of the group receives a copy. IPv6 considers broadcasting as a special case of multicasting.

The IPv6 Protocol :
The IPv6 packet is shown below:

Each packet is composed of a base header followed by the payload. The base header occupies 40 bytes, whereas payload can be up to 65,535 bytes of information.One thing to note here is that unlike IPv4, base header size is fixed in IPv6 and it is 40 bytes.
The IPv6 Base header is shown below:

The description of fields follows.
Version- The 4-bit version field defines the version number of the IP. For IPv6, the value is 6.
Traffic class- The 8-bit traffic class field is used to distinguish different payloads with different delivery requirements. It replaces the type-of-service field in IPv4.
Flow label- The flow label is a 20-bit field that is designed to provide special handling for a particular flow of data.
Payload length-The 2-byte payload length field defines the length of the IP datagram excluding the header. Note that IPv4 defines two fields related to the length: header length and total length. In IPv6, the length of the base header is fixed (40 bytes); only the length of the payload needs to be defined.
Next header-The next header is an 8-bit field defining the type of the first extension header (if present) or the type of the data that follows the base header in the datagram. This field is similar to the protocol field in IPv4.
Hop limit- The 8-bit hop limit field serves the same purpose as the TTL field in IPv4.
Source and destination addresses-The source address field is a 16-byte (1 28-bit) Internet address that identifies the original source of the datagram. The destination address field is a 16-byte (128-bit) Internet address that identifies the destination of the datagram.

IPv6 New Features:

1) Stateless Auto-configuration
New host can assign its own host address
- No need for DHCP

2) Supports new IP security protocols
- Authentication of source
- Encryption of payload

3) IPv4 and IPv6 packets both limit payload size to 64KB. However, with a Jumbo Payload option, the IPv6 may have up to 4GB payload.

4) IPv6 uses a classless view of addressing, with no concept of classful addressing. Hence, it is no longer required to consider the classful boundaries of addresses.


Suppose a router receives an IP packet containing 600 data bytes and has to forward the packet to a network with maximum transmission unit of 200 bytes. Assume that IP header is 20 bytes long. How many packets it going to divide and what are more fragments bits for divided packets?

                             1st packet  2nd packet 3rd packet 4th packet
4 packets =             (176+20), (176+20), (176+20), (72+20)
More Fragment bits =    1             1             1              0


Suppose a router receives an IP packet containing 600 data bytes and has to forward the packet to a network with maximum transmission unit of 200 bytes. Assume that IP header is 20 bytes long. What are fragment offset values for divided packets?

             0/8      (176)/8     (176+176)/8     (176+176+176)/8

Offset =   0            22               44                     66

TCP: Transmission control protocol
Content covered: 

TCP: Transmission control protocol 

More Less
TCP connection walkthrough
Content covered: 

TCP connection walkthrough

More Less

TCP Header : 


TCP operates in two phases:
Slow Start Phase: the period when TCP has no information about the current network status.
In particular, TCP does not know how much traffic the network can handle safely (i.e., withput causing congestion).
Congestion Avoidance Phase: the period when TCP knows that it is transmitting at a data rate that is very close to a rate that can cause congestion.


  • This quiz contains 5 questions on the topic Network Layer.
  • You can attempt the quiz unlimited number of times.

Difficulty Level:  basic
No. of Questions:  5
vishesh bajpai visheshbajpa 30 Dec 2016 12:09 pm

PSH flag is used to terminate the connection ?

Shivesh Kumar Roy shiveshroy 31 Dec 2016 06:45 pm

I think In Quiz that was typing mistake, It should be FIN.

saurabh sharma saurabh11 30 Dec 2016 01:40 pm

i think it is used to pushing data in buffer.

Hradesh hradeshpatel 31 Dec 2016 12:23 pm

here PSH flag is basically used eventhough data is less than MSS than also it will push via (PSH=1). it follow inorder . ....but  it terminate the condition i am not sure plz explain???

Shraddha shraddhagami 1 Jan 2017 09:40 pm

When you send data, your TCP buffers it.As an when bytes are received then it can pushed to Application Layer(PSH=1).


Prajwal Bhat prajwalbhat 1 Jan 2017 08:01 am

@Admin please correct question number 7 it should be either option A is correct since PSH flag is used to push the data that is reciever should not wait until the window to be filled which is not at all related to terminate the connection.

If option  A is intended to be FIN flag then it should be changed ...

Suman suman08513 2 Jan 2017 10:13 am


Suppose that the TCP congestion window is set to 18 KB and a timeout occurs. _________ kB will the window be if the next four transmission bursts are all successful. Assume that the maximum segment size is 1 KB.


for the above question answer is 9KB. It is given 8KB in the above explanation.



I think the answer here should be 9KB. After the timeout has occurred, the threshhold=currentwindow size/2=9KB(9MSS), and the congestion window sets to 1MSS.

i.e the first tranmission starts from congestion window size 1MSS. After 1st successful burst the window size increases to 2MSS

After 2nd successful burst the window size increases to 4MSS

After 3rd successful burst the window size increases to 8MSS

After 4th successful burst the window size increases to 9MSS(since threshold is 9MSS)

Niharika dniharika 5 Jan 2017 07:42 pm

Which of the following is false regarding flags in TCP header?

I think answer for this question is wrong.PSH flag is used to push bytes without waiting for Maximum data to be filled before transferring.