TCP IP Interview Questions- With Simple Answers

TCP IP Interview Questions

TCP and IP are the two different protocols working on different layers. The TCP/IP architecture distributes the messages in four layers and uses a three-way handshake to connect the sender with the receiver. Here, let’s know some TCP IP Interview Questions.

The questions for such an interview will be the technical ones regarding the protocol layers, classes of IP address, examples of the protocols working on each layer, and more.

The TCP/IP interview questions

  1. Explain The Layers In A TCP/IP Architecture.

Sample Answer:

There are four layers in the TCP/IP protocol from bottom to top as follows:

  • Network Interface Layer

It combines the physical and data link layers of the OSI reference model. It deals with the sending and receiving of bits physically from one device to another over various cables on the same network.

  • Internet Layer

This layer works in line with the network layer of the OSI model. It routes the datagrams from one node to another located on different LANs.

  • Transport Layer

It provides host-to-host transmission in line with the transport layer of the OSI model. It is responsible for data correction, reliability, and flow control of the data. The two protocols at this layer are TCP and UDP.

  • Application Layer

It merges the session, presentation, and application layers of the OSI model. It provides data compression, decompression, encryption, and decryption.

  1. What Are The Different Classes Of IP Addresses?

Sample Answer:

There are five classes of IP addresses. They exist to determine the total number of devices to get used in a network.

CLASSPUBLIC IP RANGESUBNET MASKNUMBER OF HOSTS PER NETWORKUSES
A1.0.0.0 to 127.0.0.0255.0.0.016,777,214For large-sized networks
B128.0.0.0 to 191.255.0.0255.255.0.065534Medium-sized networks
C192.0.0.0 to 223.255.255.0255.255.255.0254Small-sized networks
D224.0.0.0 to 239.255.255.255NANAMulticasting
E240.0.0.0 to 254.255.255.255NANAResearch and Experiments

Addresses between 127.0.0.0 and 127.255.255.255 get used for loopback and diagnostics.

  1. What Is TRACERT?

Sample Answer:

The Trace Route (TRACERT) command determines the possible routes from the source to destination, find out the response delays, and check for the routing loops over a packet-switched network. Some routers block this command thinking of it as a suspicious activity. Thus, the TRACERT command is not much reliable.

Example: tracert mybook.com

This command determines the number of hops from the source to 

mybook.com.

  1. What Are The Protocols At Different Layers Of TCP/IP Architecture?

Sample Answer:

Some protocols working at the Network Interface Layer are ARP, RARP, MAC, PPP, and OSPF.

Some protocols working at the Internet Layer are IGMP, ICMP, IPV4, IPV6, IPSec, and ECN.

Some protocols working at the Transport Layer are TCP, UDP, RDP, RDS, WTP, and WDP.

Some protocols working at the Application Layer are HTTP, HTTPS, FTP, DHCP6, SMTP, SNMP, SSH, POP, PTP, IMAP, LDAP, RIP, and SIP.

  1. Explain The Difference Between IPV4 And IPV6.

Sample Answer:

IPV4 is the current version of IP used widely. But, it provides 4 billion addresses that are not enough to connect all the devices across the globe. The facilities provided by the IPV4 are not enough. It gave rise to IPV6.

IPV4 contains five different classes whereas, IPV6 does not. An IP address in IPV4 is 32 bit long and numeric with four fields separated by a dot (.). It gets represented in decimal format. An IP address in IPV6 is 128 bit long and alphanumeric with eight fields separated by a colon (:). It gets shown in the hexadecimal format. IPV6 provides flow label field, authentication, and encryption while IPV4 does not.

  1. What Is A Subnet Mask?

Sample Answer:

A subnet mask is a 32-bit number according to the class of the given IP address, but TCP/IP does not contain a fixed number of host and network id bits. A binary-AND operation is performed between the individual binary bits of the IP address and the subnet mask to get the network address and host address. Accordingly, the users can determine whether the host lies on the remote or local network.

For example, if the given IP address is 193.62.82.09 and the subnet mask is 255.255.255.224, their ANDing will be as follows:

11000001.00111110. 01010010.00001001 —— (193.62.82.09)

11111111.11111111.11111111. 11100000 —— (255.255.255.224)

After performing an AND operation, the result will be:

11000001.00111110.01010010.00000000 ——- (193.62.82.0)

  1. What Is The Loopback Address?

Sample Answer:

The standard IPV4 loopback address 127.0.0.1 gets supported by all Operating Systems. It gets used when the local server wants to communicate with itself to check the connection, diagnosis, and troubleshooting. Multiple server applications can run on a local host at the same time, and all of them can use the same port. It works when the higher-level protocol sends a datagram to a network. The address 127 must loopback within the localhost.

  1. Explain The Ping Command.

Sample Answer:

The ping command works on a wide range of operating systems and exists to identify the number of nodes to the receiver, check whether the target node is reachable, time to respond, and packet loss. It works under the Internet Control Message Protocol (ICMP). When a user uses the ping command, an echo request gets sent to the target node. When it reaches the destination, the user at the destination sends an echo reply.

  1. Explain The Difference Between The OSI And TCP/IP Architecture.

Sample Answer:

OSI header has 5 bytes and seven layers, whereas TCP/IP header has 20 bytes and four layers. OSI model, developed by the International Standard Organization (ISO), provides an easy replacement of the hidden protocols, while the TCP/IP model developed by Advanced Research Project Agency Network (ARPANET) does not provide easy replacements of the protocols.

The interfaces, protocols, and services are well separated by the OSI model but not by the TCP/IP model. The OSI model provides connection-oriented services at the transport layer, whereas the TCP/IP model provides both connection-oriented and connection-less services at the transport layer and is much reliable than the OSI model.

  1. What Are The Advantages And Disadvantages Of Using The TCP/IP Model?

Sample Answer:

The OSI model is only a reference model. Thus, the TCP/IP model emerged as a practical implementation of the OSI model.

Some of the advantages of the TCP/IP model are:

  • It allows the nodes from heterogeneous networks to communicate but, does not depend on the Operating System for its operations.
  • It is not owned by anyone and allows more networks to get added to the client-server architecture without disturbing the existing components.
  • Every site gets a domain name, and every node on the network gets an IP address assigned according to this architecture and maps a domain name to an IP address.

Some of the disadvantages of the TCP/IP model are:

  • It combines the physical and the data link layer having distinct functionalities and does not separate the interfaces and services.
  • It does not represent any protocol stack and was developed mainly for Wide Area Networks (WANs).
  1. Can The Ping Command Be Used Between The Two Nodes Connected To A Switch In Different Networks?

Sample Answer:

No. no two nodes connected to the switches on different networks can communicate through the ping command because a switch cannot transmit the packages from one network to another.

  1. Explain The TCP 3-Way Handshake.

Sample Answer:

It gets used over a TCP/IP network where both the sender and the receiver can initiate and negotiate the connection concurrently. First, the sender sends an SYN segment to establish the connection and request to initiate the communication. When the receiver receives the request, it responds with an SYN-ACK segment to acknowledge the request and provide a starting segment number, to begin with, the communication. Finally, the sender sends an ACK segment to acknowledge the SYN-ACK segment, and thus a strong connection gets established.

  1. What Is The Difference Between OSI And ISO?

Answer:

The headquarter of the International Organization for Standardization (ISO) is in Geneva. This non-governmental organization provides standardization across the industrial, commercial, and technical fields and concentrates on maintaining safety, development, and quality in different areas.

The Open Systems Interconnection (OSI) model developed by the ISO is a reference model that provides the standard protocols for the devices to communicate over a network. It helps to break down the problems in the network and diagnose only a specific layer.

Conclusion

The TCP/IP model has a very vast concept, and working with it introduces multiple challenges every time. However, the problems under this concept are easy to solve. The candidate must possess patience, strong analytical and reasoning skills. He/she must be ready to dive deep into the details and change with the changing networking technology. The candidate must have required degrees from a technical background and be well aware of different networking components.

Frequently Asked Questions

  1. What Is DHCP?

Answer:

The Dynamic Host Configuration Protocol (DHCP) is an application layer protocol that works in IPV4 and IPV6. It assigns IP addresses to the nodes in a network dynamically and looks after their configurations. This protocol works for both small and large networks.

  1. How Do We Compare TCP And UDP?

Answer:

TCP establishes a connection before sending the segments whereas, UDP does not do that. Thus, TCP is slower, more heavyweight, and a bit complicated than UDP. The establishment of a connection in TCP provides the retransmission of the lost packages whereas, UDP does not. The packets arrive in the correct order to the destination as sent by the sender, but UDP does not guarantee the order of the data packets reaching the receiver.

TCP IP Interview Questions- With Simple Answers

Leave a Reply

Your email address will not be published. Required fields are marked *

Scroll to top