Open In App

Top 50 IP addressing interview questions and answers

Last Updated : 03 Aug, 2022
Like Article

1. What is IP address?

IP address is an address having information about how to reach a specific host, especially outside the LAN. An IP address is  32 bit unique address having an address space of 232. Generally, there are two notations in which IP address is written, dotted decimal notation and hexadecimal notation. For more details, please refer introduction of Classful IP addressing.

2. What are the different classes of IP addresses and give the range of each class?

IP address is an address having information about how to reach a specific host, especially outside the LAN. An IP address is  32-bit unique address having an address space of 232.

For more details, please refer introduction of Classful IP addressing.

3. What is subnet mask?

A subnet mask is a 32-bit number that is used to identify the subnet of an IP address. The subnet mask is a combination of 1’s and 0’s. 1’s represents network and subnet ID while 0’s represents the host ID. In this case, the subnet mask is,


So, in order to get the network to which the destination address belongs, we have to bitwise & with a subnet mask.

&&  11001000.00000001.00000010.00010100

The address belongs to,


For more details, please refer Role of Subnet Mask article.

4. Why CIDR is used?

The problem with this classful addressing method is that millions of class A addresses are wasted, many of the class B addresses are wasted, whereas, number of addresses available in class C is so small that it cannot cater to the needs of organizations. Class D addresses are used for multicast routing and are therefore available as a single block only. Class E addresses are reserved. Since there are these problems, Classful networking was replaced by Classless Inter-Domain Routing (CIDR). For more details, please refer CIDR full-form to the article.

5. What is the LOOPBACK address?

Loopback Address is used to let a system send a message to itself to make sure that the TCP/IP stack is installed correctly on the machine. For more details, please refer Local Broadcast and Loopback address article.

6. What is a Default Gateway?

In organizational systems, a gateway is a node that routes the traffic from a workstation to another network segment. The default gateway commonly connects the internal networks and the outside network (Internet). In such a situation, the gateway node could also act as a proxy server and a firewall. The gateway is also associated with both a router, which uses headers and forwarding tables to determine where packets are sent and a switch, which provides the actual path for the packet in and out of the gateway. 

For more details, please refer to Working of different layers in the Computer network article.

7.  Why Hop limit field is used?

Hop Limit: Hop Limit field is the same as TTL in IPv4 packets. It indicates the maximum number of intermediate nodes IPv6 packet is allowed to travel. Its value gets decremented by one, by each node that forwards the packet and the packet is discarded if the value decreases to 0. This is used to discard the packets that are stuck in an infinite loop because of some routing error.

For more details, please refer to Internet Protocol version 6 (IPv6) Header article.

8. What protocol is used by PING?

ICMP (Internet Control Message Protocol) is used by PING. For more details, please refer to the Difference between Ping and Traceroute article.

9. What is used of Tracert?

Traceroute is a widely used command-line utility available in almost all operating systems. It shows you the complete route to a destination address. It also shows the time is taken (or delays) between intermediate routers. For more details, please refer to the Difference between Ping and Traceroute article.

10. Name the ports used by FTP protocol?

Basically, FTP protocol uses two ports:

Control connection: For sending control information like user identification, password, commands to change the remote directory, commands to retrieve and store files, etc., FTP makes use of connections. The control connection is initiated on port number 21.

Data connection: For sending the actual file, FTP makes use of a data connection. A data connection is initiated on port number 20.
 For more details, please refer to File Transfer Protocol (FTP) in the Application Layer article.

11. What is MAC address?

MAC Addresses are unique 48-bit hardware numbers of computers, which are embedded into a network card (known as Network Interface Card) during the time of manufacturing. The MAC Address is also known as the Physical Address of a network device. In IEEE 802 standard, the Data Link Layer is divided into two sublayers – 

  1. Logical Link Control(LLC) Sublayer
  2. Media Access Control(MAC) Sublayer

The MAC address is used by the Media Access Control (MAC) sublayer of the Data-Link Layer. MAC Address is unique worldwide since millions of network devices exist and we need to uniquely identify each. 

For more details, please refer to Introduction of MAC Address in Computer Network article.

12. Explain ARP?

Address Resolution Protocol is a communication protocol used for discovering physical addresses associated with a given network address. Typically, ARP is a network layer to data link layer mapping process, which is used to discover MAC addresses for a given Internet Protocol Address.
In order to send the data to the destination, having an IP address is necessary but not sufficient; we also need the physical address of the destination machine. ARP is used to get the physical address (MAC address) of the destination machine.

Before sending the IP packet, the MAC address of the destination must be known. If not so, then the sender broadcasts the ARP-discovery packet requesting the MAC address of the intended destination. Since ARP-discovery is broadcast, every host inside that network will get this message but the packet will be discarded by everyone except that intended receiver host whose IP is associated. Now, this receiver will send a unicast packet with its MAC address (ARP-reply) to the sender of the ARP-discovery packet. After the original sender receives the ARP-reply, it updates ARP-cache and starts sending a unicast message to the destination.

For more details, please refer to the How Address Resolution Protocol works article.

13.  What is MTU?

A maximum transmission unit also called MTU, is a term used in networking and operating systems. It defines the largest size of the packet that can be transmitted as a single entity in a network connection. The size of the MTU dictates the amount of data that can be transmitted in bytes over a network. For more details, please refer What is MTU article.

14. If a class B network on the Internet has a subnet mask of, what is the maximum number of hosts per subnet?
The binary representation of the subnet mask is 11111111.11111111.11111000. 00000000. There are 21 bits set in a subnet. So 11 (32-21) bits are left for host ids. The total possible value of host ids is 2^11 = 2048. Out of these 2048 values, 2 addresses are reserved. The address with all bits as 1 is reserved as broadcast address and the address with all host id bits as 0 is used as a network address of the subnet.
In general, the number of addresses usable for addressing specific hosts in each network is always 2^N – 2 where N is the number of bits for host id. So the answer is 2046.

15. What is IP multicast?

Multicasting has one/more senders and one/more recipients participate in data transfer traffic. In multicasting, traffic reclines between the boundaries of unicast and broadcast. Its server’s direct single copies of data streams and that are then simulated and routed to hosts that request it. IP multicast requires the support of some other protocols such as Internet Group Management Protocol (IGMP), Multicast routing for its work. And also, in Classful IP, addressing Class D is reserved for multicast groups.

16. Difference between public and private IP addresses?

  1. Public IP address
    A public IP address is an Internet Protocol address, encrypted by various servers/devices. That’s when you connect these devices with your internet connection. This is the same IP address we show on our homepage. So why the second page? Well, not all people speak the IP language. We want to make it as easy as possible for everyone to get the information they need. Some even call this their external IP address. A public Internet Protocol address is an Internet Protocol address accessed over the Internet. Like the postal address used to deliver mail to your home, the public Internet Protocol address is a different international Internet Protocol address assigned to a computer device. The web server, email server, and any server device that has direct access to the Internet are those who will enter the public Internet Protocol address. Internet Address Protocol is unique worldwide and is only supplied with a unique device.
  2. Private IP address
    Everything that connects to your Internet network has a private IP address. This includes computers, smartphones, and tablets but also any Bluetooth-enabled devices such as speakers, printers, or smart TVs. With the growing internet of things, the number of private IP addresses you have at home is likely to increase. Your router needs a way to identify these things separately, and most things need a way to get to know each other. Therefore, your router generates private IP addresses that are unique identifiers for each device that separates the network.

17. Can you explain what subnetting?

When a bigger network is divided into smaller networks, in order to maintain security, then that is known as Subnetting. so, maintenance is easier for smaller networks. For more details please read an introduction to a subnetting article.

18. Do you know what is Network Address Translation?

To access the Internet, one public IP address is needed, but we can use a private IP address on our private network. The idea of NAT is to allow multiple devices to access the Internet through a single public address. To achieve this, the translation of a private IP address to a public IP address is required. Network Address Translation (NAT) is a process in which one or more local IP addresses is translated into one or more Global IP addresses and vice versa in order to provide Internet access to the local hosts. Also, it does the translation of port numbers i.e. masks the port number of the host with another port number in the packet that will be routed to the destination. It then makes the corresponding entries of IP address and port number in the NAT table. NAT generally operates on a router or firewall. For more details, please refer to Network Address Translation.

19. An organization requires a range of IP addresses to assign one to each of its 1500 computers. The organization has approached an Internet Service Provider (ISP) for this task. The ISP uses CIDR and serves the requests from the available IP address space The ISP wants to assign address space to the organization which will minimize the number of routing entries in the ISP’s router using route aggregation. To calculate the address spaces are potential candidates from which the ISP can allow any one of the organizations?

Subnet Mask for the given IP address: 
⇒ 11111111 11111111 10000000 00000000

Now, since we need 1500 hosts, so, bits for host address,

= ceiling (log2 (1500)) 
= ceiling (10.55) 
= 11 bits for host address 

So, the last 11 bits will be for host addresses:

00000000.00000000 → 00000111.11111111 (0.0  →  7.255)

00001000.00000000 → 00010000.00000000 (8.0 - 15.255)

00001111.11111111 → 00010111.11111111 (16.0 - 23.255) 

Sequences are 0, 8, 16, 24, 32, 40, 48, 56, 64, 72, 80, 96, 104, 112, 120.

Hence, 64 and 104 are present in the sequence, so / 21 and / 21 are the possible IP addresses.

20. Explain the difference between Static and Dynamic IP?

S.NO Static IP Address Dynamic IP address
1. It is provided by ISP(Internet Service Provider). While it is provided by DHCP (Dynamic Host Configuration Protocol).
2. The static IP address does not change at IP any time, which means if a static ip address is provided then it can’t be changed or modified. While dynamic IP addresses static changes at any time.
3. A static IP address is less secure. While in a dynamic IP address, there is a low amount of risk than static ip address’s risk.
4. A static IP address is difficult to designate. While the dynamic IP address is easy to designate.
5. The device designed by static IP address can be trace. But the device designed by dynamic ip address can’t be traced.
6. The static IP address is more stable than a dynamic IP address. While dynamic ip address is less stable than static ip address.
7. The cost to maintain the static ip address is higher than the dynamic IP address. While the maintaining cost of dynamic ip address is less than static IP address.
8. It is used where computational data is less confidential. While it is used where data is more confidential and needs more security.

For more details, please refer to Difference between Static and Dynamic IP addresses.

21. How will my computer get its IP Address?

To get IP address :

  1. Click on start ->Programs->Accessories->Command prompt.
  2. Type ipconfig on command prompt and press enter key.

By using these steps, you can get your PC IP address, Subnet Mask, and default gateway details.

22. What are the features of Gateway?

Gateways provide a wide variety of features. Some of which are:

  • Gateways work as a network bridge for data transmission as it makes the transmission of data possible to transmit with more ease and does not demand high storage capacity.
  • Gateways create a structural temporary storeroom for the data transmitted by the server and data requests made by the user end.
  • Gateways made the transmission more feasible as it queued up all the data and divide it into small packets of data rather than sending it bulk. Data transmitted through Gateway is divided into various useful and small packets each having its individual significance and a role to play while processing data.
  • Gateways made the data more secure if the modifications to the gateway could be done which then could create more reliability over smart devices.
  • Gateways optimize the data for search engines, applications, and servers by implanting better readability to the content so that a machine could understand and optimize data with ease. For more details, please refer to the Introduction of Gateways.

23. Is Ipv6 Backward Compatible With Ipv4?

No, IPv6 is not backward compatible with IPv4 protocol.  For more details, please refer to the Internet protocol version 6 article.

24. Is It Possible To Have An Ipv4 And An Ipv6 Addresses Simultaneously?

Yes, it is possible to have an IPv4 and IPv6 addresses simultaneously. For more details, please refer to the Internet protocol version 6  and the difference between IPv4 and IPv6 articles.

25. What is TTL?

The lifespan or lifetime of data that is being sent. Once after that specified time is over or elapsed, the data will be discarded Or it can also be stated as the number of hops that packet is set to exist in the network, after which that packet is discarded. The purpose of the TTL field is to avoid a situation in which an undeliverable datagram keeps circulating in the network. For more details, please refer to the difference between RTT and TTL article.

26. If the TTL field has the value of 10. How many routers (max) can process this datagram?

TTL stands for Time to Live. This field specifies the life of the IP packet based on the number of hops it makes ( number of routers it goes through). TTL field is decremented by one each time the datagram is processed by a router. When the value is 0, the packet is automatically destroyed. For more details, please refer to the difference between RTT and TTL articles.

27. If the value in the protocol field is 17, the transport layer protocol used is which protocol?

If the value in the protocol field is 17, the transport layer protocol uses UDP (User Datagram Protocol). For more details, please refer to UDP article.

28. What happens in  classless addressing, if there are no classes but addresses are still granted?

In classless addressing, there are no classes but addresses are still granted in blocks. The total number of addresses in a block of classless IP addresses = 2(32 – CIDR_value).  For more details, please refer to the introduction of Classful IP addressing.

29.  Suppose two IPv6 nodes want to interoperate using IPv6 datagrams, but they are connected to each other by intervening IPv4 routers. Then what is the best solution?

If two IPv6 nodes want to interoperate using IPv6 datagrams, they are connected to each other by intervening IPv4 routers. Then tunneling is the best solution.  For more details, please refer to  Internet protocol version 6 article.

30. What is IANA?

IANA, the Internet Assigned Numbers Authority, is an administrative function of the Internet that keeps track of IP addresses, domain names, and protocol parameter identifiers that are used by Internet standards. Some of these identifiers are parameters, such as those used by Internet protocols (like TCP, ICMP or UDP) to specify functions and behaviour; some of them represent Internet addresses and others represent domain names. Regardless of the type of identifier, the IANA function (IANA for short below) ensures that values are managed for uniqueness and made available in publicly accessible registries.

31. What is DHCP?

DHCP is an abbreviation for Dynamic Host Configuration Protocol. It is an application layer protocol used by hosts for obtaining network setup information. The DHCP is controlled by a DHCP server that dynamically distributes network configuration parameters such as IP  addresses, subnet mask, and gateway address. For more details, please refer to Dynamic Host Configuration Protocol (DHCP) article.

32. How can you manage a network using a router?

Routers have built-in console that lets you configure different settings, like security and data logging.We can assign restrictions to computers, such as what resources they are allowed to access, or what particular time of the day they can browse the internet.We can even put restrictions on what websites are not viewable across the entire network. For more details, please refer to the introduction of a Router.

33. What is ipconfig?

IPCONFIG stands for Internet Protocol Configuration. This is a command-line application that displays all the current TCP/IP (Transmission Control Protocol/Internet Protocol) network configuration, refreshes the DHCP (Dynamic Host Configuration Protocol) and DNS (Domain Name Server). It also displays an IP address, subnet mask, and a default gateway for all adapters. It is available for Microsoft Windows, ReactOS, and Apple macOS. ReactOS version was developed by Ged Murphy and licensed under the General Public License. For more details, please refer to ipconfig full form article.

34. When you move the NIC cards from one PC to another PC, does the MAC address get transferred as well?

Yes, if we move the NIC cards from one PC to another PC, then the MAC address also gets transferred, because the MAC address is hard-wired into the NIC circuit, not the personal computer. This also means that a PC can have a different MAC address when another one replaces the NIC card. 

35. Explain clustering support?

Clustering support refers to the ability of a network operating system to connect multiple servers in a fault-tolerant group. The main purpose of this is that in the event that one server fails, all processing will continue on with the next server in the cluster.

36. What is Brouter?

 Brouter – It is also known as the bridging router is a device that combines features of both bridge and router. It can work either at the data link layer or a network layer. Working as a router, it is capable of routing packets across networks, and working as the bridge, it is capable of filtering local area network traffic. For more details, please refer to the difference between Router and Brouter article.

37. Explain the features of VPN?

  1. VPN also ensures security by providing an encrypted tunnel between client and vpn server.
  2. VPN is used to bypass many blocked sites.
  3. VPN facilitates anonymous browsing by hiding your ip address.
  4. Also, the most appropriate Search engine optimization(SEO) is done by analyzing the data from VPN providers which provide country-wise states for browsing a particular product. This method of SEO is used widely by many internet marketing managers to form new strategies.For more details, please refer to Virtual Private Network.

38. What are the important differences between MAC address and IP address?

S.NO MAC Address IP Address
1. MAC Address stands for Media Access Control Address. IP Address stands for Internet Protocol Address.
2. MAC Address is a six byte hexadecimal address. IP Address is either four byte (IPv4) or eight byte (IPv6) address.
3. A device attached with MAC Address can retrieve by ARP protocol. A device attached with IP Address can retrieve by RARP protocol.
4. NIC Card’s Manufacturer provides the MAC Address. Internet Service Provider provides IP Address.
5. MAC Address is used to ensure the physical address of computer. IP Address is the logical address of the computer.
6. MAC Address operates in the data link layer. IP Address operates in the network layer.
7. MAC Address helps in simply identifying the device. IP Address identifies the connection of the device on the network.
8. MAC Address of computer cannot be changed with time and environment. IP Address modifies with the time and environment.
9. MAC Address can’t be found easily by third party. IP Address can be found by third party.

39. What is

In IPv4, IP addresses that start with decimal 127 or that has 01111111 in the first octet are loopback addresses(127.X.X.X). Typically is used as the local loopback address.
This leads to the wastage of many potential IP addresses. But in IPv6 ::1 is used as local loopback address and therefore there isn’t any wastage of addresses.

40. What is a DNS?

DNS is a host name to IP address translation service. DNS is a distributed database implemented in a hierarchy of name servers. It is an application layer protocol for message exchange between clients and servers. For more details, please refer to DNS in the application layer.

41. What is the use of a proxy server?

Proxy server refers to a server that acts as an intermediary between the request made by clients, and a particular server for some services or requests for some resources. There are different types of proxy servers available that are put into use according to the purpose of a request made by the clients to the servers. The basic purpose of Proxy servers is to protect the direct connection of Internet clients and internet resources. The proxy server also prevents the identification of the client’s IP address when the client makes any request is made to any other servers. For more details, please refer to Proxy server article.

42. What is the difference between ipconfig and ifconfig commands?

IPCONFIG stands for Internet Protocol Configuration. This is a command-line application that displays all the current TCP/IP (Transmission Control Protocol/Internet Protocol) network configuration, refreshes the DHCP (Dynamic Host Configuration Protocol) and DNS (Domain Name Server). It also displays IP address, subnet mask, and default gateway for all adapters. It is available for Microsoft Windows, ReactOS, and Apple macOS. ReactOS version was developed by Ged Murphy and licensed under the General Public License.

ifconfig(interface configuration) command is used to configure the kernel-resident network interfaces. It is used at boot time to set up the interfaces as necessary. After that, it is usually used when needed during debugging or when you need system tuning. Also, this command is used to assign the IP address and netmask to an interface or to enable or disable a given interface. For more details, please refer to

43. What is the importance of APIPA in networking?

Automatic Private IP Addressing is important in networking because communication can be established properly if you don’t get a response from DHCP Server. APIPA regulates the service, by which the response and status of the main DHCP server at a specific period of time. Apart from that, it can be used as a backup to DHCP because when DHCP stops working, APIPA has the ability to assign IP to the networking hosts.It stops unwanted broadcasting. It uses ARP(Address Resolution Protocol) to confirm the address isn’t currently in use. For more details, please refer to What is APIPA.

44. What is the difference between Firewall and Antivirus?

S.NO Firewall Antivirus
1. Firewall is implemented in both hardware and software. Antivirus is implemented in software only.
2. Firewall deals with external threats only. Antivirus deals with both external threats and internal threats.
3. In firewall counter attacks are possible such as IP Spoofing and routing attacks. In antivirus no counter attacks are possible after removing the malware.>
4. Firewall works on monitoring and filtering. Antivirus works on Scanning of infected files and software.
5. Firewall checks the threat from incoming packets. Antivirus checks the threat from malicious software.
6. Firewall saves the system from all kinds of threats to the system. Antivirus saves the system only from viruses.
7. Firewall’s programming is complex than antivirus. Antivirus’s programming is simpler as comparison to firewall.

45. What is SLIP?

SLIP stands for Serial Line Internet Protocol. It is a TCP/IP implementation which was described under RFC 1055 (Request for Comments). SLIP establishes point-to-point serial connections which can be used in dial-up connections, serial ports and routers. It frames the encapsulated IP packets across a serial line for establishing connection while using line speed between 12000 bps and 19.2 Kbps.  SLIP was introduced in 1984 when Rick Adams used it to connect 4.2 Berkeley Unix and Sun Microsystems workstations. It soon caught up with the rest of the world as a credible TCP/IP implementation. It has now become obsolete after being replaced by PPP (Point to Point Protocol) which solves many deficiencies present in it. For more details, please refer to

46.  What is Kerberos protocol?

Kerberos provides a centralized authentication server whose function is to authenticate users to servers and servers to users. In Kerberos Authentication server and database is used for client authentication. Kerberos runs as a third-party trusted server known as the Key Distribution Center (KDC). Each user and service on the network is a principal.

The main components of Kerberos are:

  • Authentication Server (AS):
    The Authentication Server performs the initial authentication and ticket for Ticket Granting Service.
  • Database:
    The Authentication Server verifies the access rights of users in the database.
  • Ticket Granting Server (TGS):
    The Ticket Granting Server issues the ticket for the Server.

For more details, please refer to Kerberos article.

47.  What is HSRP?

Hot Standby Router Protocol (HSRP) is a CISCO proprietary protocol, which provides redundancy for a local subnet. In HSRP, two or more routers give an illusion of a virtual router.

HSRP allows you to configure two or more routers as standby routers and only a single router as an active router at a time. All the routers in a single HSRP group share a single MAC address and IP address, which acts as a default gateway to the local network. The Active router is responsible for forwarding the traffic. If it fails, the Standby router takes up all the responsibilities of the active router and forwards the traffic.

For more details, please refer to HSRP protocol.

48. Why is the MAC address called the Physical address?

The MAC address is a physical address (also called a hardware address) because it physically identifies an item of hardware. MAC addresses use three types of number systems and all use the same format, only the size of the identifier differs. The addresses can be “Universally Managed” or “Locally Managed”. For more details, please refer to Introduction of MAC Address in Computer Network article.

49. Process of DHCP(DORA)?

In DHCP, the client and the server exchange mainly 4 DHCP messages in order to make a connection. This process is known as  DORA process (discovery, offer, request, and acknowledgment), but there are 8 DHCP messages in the process.  For more details, please refer to Dynamic Host Configuration Protocol (DHCP) article.

50.  What is ‘APIPA’?

APIPA stands for Automatic Private IP Addressing (APIPA). It is a feature or characteristic in operating systems (eg. Windows) which enables computers to self-configure an IP address and subnet mask automatically when their DHCP(Dynamic Host Configuration Protocol) server isn’t reachable. The IP address range for APIPA is ( to having 65, 534 usable IP addresses, with the subnet mask of For more details please read  What is APIPA article.


Like Article
Suggest improvement
Share your thoughts in the comments

Similar Reads