Interview questions on IPv4
7. If the priority value of the two switches are same, which switch would be elected as the root bridge
1. Which field in IP v4 packet is used to prevent packet looping
TTL
2. Does an IP v4 packet include subnet mask in the header
IP v4 header does not include subnet mask in the header
3. Does IP fragment reassembly take place at intermediate routers or the destination
IP fragmentation reassembly takes place at the destination only.
Why IP fragmentation reassembly takes place at the destination only
IP fragmentation and reassembly occur primarily to accommodate the Maximum Transmission Unit (MTU) limitations imposed by different network segments along the path between the source and destination. When a packet exceeds the MTU of a network segment, it must be fragmented into smaller fragments to traverse that segment.
Here's why IP fragmentation reassembly typically occurs at the destination:
1. **Fragmentation Occurs at the Sender:** When a packet exceeds the MTU of a network segment along its path, the sender (source) router or device fragments the packet into smaller fragments before transmitting them.
2. **Fragments Sent Independently:** Each fragment of the original packet is treated as a separate IP packet and is transmitted independently. This means that fragments can take different paths through the network and may arrive at the destination out of order.
3. **Reassembly at Destination:** The responsibility for reassembling the original packet from its fragments lies with the destination host or router. As the fragments arrive at the destination, they are stored temporarily until all fragments of the original packet are received.
4. **Identification and Ordering:** Each fragment contains information such as the identification field, which allows the destination to identify fragments belonging to the same original packet. Additionally, the offset field in the fragment header indicates the position of the fragment within the original packet, facilitating correct reassembly.
5. **Checksum Verification:** Before reassembly, the destination host or router verifies the checksum of each fragment to ensure data integrity. If any fragment is corrupted, it is discarded, and retransmission may be requested if necessary.
6. **Efficiency:** Reassembly at the destination allows for more efficient use of network resources since only the destination needs to perform reassembly. This reduces the processing burden on intermediate routers and improves network performance.
Overall, IP fragmentation and reassembly are designed to ensure that packets can traverse networks with varying MTU sizes while maintaining data integrity and efficient transmission. By performing reassembly at the destination, the process is streamlined, and the burden of fragmentation and reassembly is placed on the endpoint where the original data is needed.
4. Name one instance where the source IP address in the IP header is changed before reaching the destination.
In a NAT environment, the source IP address would be changed.
5. What is the value of a directed broadcast for the network 192.168.1.0/24
192.168.1.255
6. Name two protocols which do not use an IP header
STP and ARP. They are layer 2 protocols
7. Which would the value of protocol field for IP v4 header carrying HTTP data
TCP
8. Which field in an IP v4 header is used to identify packets during reassembly
Identification field
Interview questions on TFTP
1. Can a TFTP server be used on the internet
TFTP is based on TCP/IP. It can be used on any systems which support TCP/IP and also on the internet
2. Name one free TFTP Server which can be used
Solar Winds TFTP Server
3. Which port does TFTP server works on
UDP port 69.
4. Is an IP address required for the TFTP server for a router to upload configuration images to it
TFTP is based on TCP/IP.
Both the TFTP client (router) and the TFTP server should have IP addresses for communication.
5. Name one application which can be used in lieu of TFTP for transferring and storing images and configurations
FTP
6. Is TFTP a secure protocol
TFTP does not encrypt nor authenticate. It is not a secure protocol.
7. Do TFTP client and TFTP server be on the same network for communication to be successful
The client and the server can be on different networks. They just need to have IP reachability among each other.
Interview questions on ICMP
1. Name two network commands which use ICMP at the network layer
Ping and Tracert
2. Which transport layer protocol does ICMP use
ICMP does not use any transport layer protocol.
3. Which two fields in the ICMP header is used for identifying the intent of ICMP message
Type and Code
4. What feature on a router can be used to block an ICMP packet
Access control lists
5. Which port number does ICMP use
ICMP does not use any port number as it does not use any transport layer protocols.
Interview questions on DNS
1. Is the DNS protocol involved when a user pings a website name
Yes, it is involved. When the user pings the website name, a DNS request packet is sent to the DNS server which would then respond with the IP address of the web server on which the website is hosted.
2. On a network, should the DNS server IP address be configured on the computer or the internet router for users to browse the internet
The DNS server IP address should be configured on the computer for the users to browse the internet.
3. In a LAN network should the DNS server be inside the network or can it reside on the internet
The DNS server can reside anywhere as long as the computers and devices requiring DNS service have network access to it.
4. How does a computer know to which DNS server it has to send the request
The DNS server IP address is configured on the TCP/IP adapter setting of the computer. With this information, the computer knows the DNS server to which the request has to be sent.
5. How many root DNS servers are available in the world
13
6. Which port does a DNS Server Use
UDP port 53
7. A user opens the browser and types the IP address of the web server on which a website is hosted. Is DNS protocol involved during the scenario?
The DNS protocol is used to resolve the website name into the corresponding IP address. In this case, since the IP address is already known, DNS protocol is not required and is not involved in the scenario.
8. Name two methods by which DNS can be configured on a computer
It can be manually configured on the TCP/IP adapter or by a DHCP server.
9. If a computer is configured with a default gateway address, should the same address be used as the DNS server IP address
It is not mandatory. The DNS server IP address can be any value provided the computer has access to it.
10. What happens when you ping a DNS server IP address
A response to the ping is sent by the DNS server IP address.
Interview questions on UDP
1. Name two fields which are available in TCP header but not in UDP header
Sequence and acknowledgment number.
2. Do UDP based applications have port numbers
UDP has source and destination port numbers available in the header.
3. Name one criterion where an application developer would choose UDP over TCP
If the application does not require a guaranteed delivery, the application developer would choose UDP.
4. Name one application which uses UDP on the internet
DNS
5. How does a UDP based application know that a packet has been lost in transit.
UDP based applications use a timeout mechanism. They would wait for a specific time and then triggers a timeout if the response has not been received.
In a UDP-based application, the User Datagram Protocol (UDP) does not provide mechanisms for reliable delivery, acknowledgments, or error recovery like TCP does. Therefore, if a packet is lost in transit, the UDP-based application itself must implement its own mechanisms to detect and handle packet loss. Here are some common techniques used by UDP-based applications to detect packet loss:
1. **Sequence Numbers:**
- The sender of UDP packets can assign sequence numbers to each packet it sends. The receiver can then track the sequence numbers of incoming packets and detect missing or out-of-order packets. If there is a gap in the sequence numbers, the receiver can infer that a packet has been lost.
2. **Timeouts:**
- The receiver can set a timeout period for each expected packet. If a packet does not arrive within the timeout period after the previous packet, the receiver can assume that the packet has been lost and take appropriate action, such as requesting retransmission.
3. **Negative Acknowledgments (NACKs):**
- The receiver can send negative acknowledgments (NACKs) to the sender for missing or out-of-order packets. When the sender receives a NACK, it can retransmit the requested packet.
4. **Application-Level Acknowledgments:**
- The receiver can send acknowledgments (ACKs) to the sender for each successfully received packet. If the sender does not receive an ACK within a certain time frame, it can infer that the packet has been lost and retransmit it.
5. **Checksums:**
- UDP packets include a checksum field that allows the receiver to detect corrupted packets. If a packet fails the checksum verification, the receiver can discard the packet and request retransmission if necessary.
6. **Error Detection and Correction Codes:**
- Some UDP-based applications use error detection and correction codes, such as forward error correction (FEC), to detect and recover from packet loss. These codes add redundant information to the packets, which can be used to reconstruct lost or corrupted packets at the receiver.
These techniques can be implemented within the application logic or using external libraries or frameworks. However, it's important to note that UDP-based applications typically prioritize low latency and simplicity over reliability, and therefore may not implement all of these mechanisms. The choice of packet loss detection and recovery techniques depends on the specific requirements and characteristics of the application.
ARP Interview questions
1. What is the destination mac-address of an ARP request frame
Broadcast
2. Is ARP used on a PPP link
No
3. Does ARP contain an IP header
ARP is a layer 2 protocol. It does not use IP header.
4. What does a switch do when it receives an ARP request frame on one of its ports
It adds the source port to its mac-address-table and broadcasts the frame out to all ports.
5. Would an ARP request frame generated on a port which is member of VLAN 2, be received on a port which is a member of VLAN 3
ARP is a layer 2 broadcast. VLAN’s are used for segregating broadcast domains. So it would not be received.
6. Can an ARP packet cross IP networks
ARP is a layer 2 broadcast. It cannot traverse across networks.
7. If an ARP entry is available on the local cache of a computer, would an ARP request be triggered
No. The computer would first check it’s ARP entry before sending out an ARP request frame.
STP interview questions
1.What is the Spanning Tree Protocol used for
Spanning tree protocol is used to prevent looping of frames. Unlike IP, which has a TTL value field in the packet which is decremented every time the packet passes through a router and is dropped once the value reaches 0, the frame does not have any similar field. So if a scenario arises where a frame is looping in a switched environment, the frame would not automatically time out. The spanning tree protocol is used for preventing the looping.
2. Can STP be configured on a router
STP can be configured only on switches and not on routers. STP is used to prevent frame looping
3. Is STP required to be configured when there is only one switch involved?
It is not required. STP is used to shut down redundant links between switches to prevent loops.
4. Is a generic ethernet frame modified when STP is configured on the network
STP is a protocol. It has it’s own frame when configured. So it would not affect a generic ethernet frame on the network.
5. How many designated ports can be available on a root bridge
All ports on a root bridge are designated ports.
6. How many root bridges can be available on an STP configured network
1
7. If the priority value of the two switches are same, which switch would be elected as the root bridge
The switch with the lowest mac-address value would be elected as the root bridge
RIP interview questions
1. What is the destination IP address of a Rip v1 packet
Rip v1 is a broadcast packet. The destination IP address of a Rip v1 packet is 255.255.255.255
2. What is the main difference in RIP v1 and v2 packet
RIP v1 does not include the subnet mask information inside the packet. It does not support classless addressing. RIP v2 includes the subnet mask information inside the packet. For example, assume that the subnetted network 192.168.1.64/26 is configured on a RIP enabled router. If RIP v1 is configured, the route would be advertised as 192.168.1.0 ( It would take the default subnet mask of /24 and not /26). If RIP v2 is configured, the subnet mask information (/26) would also be advertised in the route.
3. If a Rip v2 router advertise it’s route, would it be received by all the devices on the network
Rip v2 is multicast. So the route advertisement would be received only by devices which has Rip v2 enabled. If the advertisement was Rip v1, then it would be received by all devices on the network as Rip v1 is broadcast.
4. How can a Rip route advertisement be blocked on a specific interface
By using the passive-interface command.
5. Which transport layer protocol does RIP use and the associated port number
UDP – Port 520
6. If a static route and a Rip learned route is available on a router which entry would be chosen by the router to forward the packet
Static route would be chosen since it has lower administrative distance than Rip
7. What is the major benefit of dynamic routing protocol like RIP over Static route
In a static route, the route entries have to be manually configured on the router. Whereas in a dynamic routing protocol like Rip, routes are learned automatically.
8. Can a subnet mask information be stored in a Rip v1 packet
Rip v1 is a classful routing protocol. It does not understand classless concepts like Subnets. So it is not possible
9. Is a subnet mask field available in a Rip v2 packet
Rip v2 is classless routing protocol. A rip v2 packet has a field to include the subnet mask information.
10. What is the administrative distance of Ripip
120
11. What is the multicast address that Rip v2 uses
224.0.0.9
Interview questions on FTP
1. How much data can be sent in a Single FTP session
The amount of data which can be sent is infinite. FTP uses TCP. The TCP channel can be used until the complete data is transferred. Multiple TCP segments can be used within the same TCP channel.
2. Can an IP packet carry FTP data
An IP packet is a carrier protocol used for carrying application layer data. The FTP data is packaged in TCP, which is sent to the intended recipient using the IP protocol in an IP based network
3. How does Active FTP communication Work
When an FTP client initiates a connection with FTP server in Active FTP mode, initially the FTP client initiates tcp 3 way handshake with the FTP server. This is initiated to port 21 on the server and is referred to as the control connection. Once the control connection is successful, the client responds with the port command to the server, which contains the port number to which the server needs to initiate the second TCP connection. The server initiates the connection ( 2ND tcp 3 way handshake) from port 20 on it to the port number provided by the client. This is known as data connection.Once the data connection is successful, the data transmission can commence.
4. How many TCP connections
Both Active and Passive FTP uses two TCP connections
5. Why does Active FTP not work when a firewall is involved between the client and the server.
In Active FTP, once the FTP client establishes the connectivity with the server, the server initiates the data connection to the client. This is a TCP connection which is initiated from a system (FTP Server) which resides outside the network. All traffic initiated from outside is considered as untrusted, and the firewall would drop it by default.
6. How does Passive FTP resolve the issue with firewalls
In Passive FTP, the FTP client initiates the connection with the server and not the FTP server with the client. Since the client is residing within the network, the connection is considered as trusted by the firewall.
7. In Active FTP, which TCP port is used for initiating the control channel
Port 21
Interview questions on DHCP
1. In a DHCP environment, which of the components (Client or Server) initiates the request
The client would always initiate the DHCP request. The request is triggered from the client when the TCP/IP adapter is configured for the option “Obtain IP address automatically”. When this is selected, the operating system would automatically generate the DHCP Discover to identify valid DHCP Servers on the network.
2. How many DHCP packets are exchanged between a client and a server before the client receives an IP address
4 DHCP packets are exchanged between the client and the server. They are DHCP Discover, DHCP Offer, DHCP Request, DHCP Ack.
3. What type of packet is a DHCP Discover packet
DHCP Discover is a layer 3 broadcast packet with destination IP address as 255.255.255.255
4. What is an IP Helper address feature and why is it required in a DHCP environment
DHCP Discover packets are broadcast packets. This means that a DHCP Discover packet which is sent from the client would not reach the DHCP Server, if the server resides on a different network. This is because routers are required for communication between different networks and routers do not forward broadcast packets. The IP Helper address feature is configured on the router. The feature informs the router the DHCP Servers IP address for the network. So, When the router receives the DHCP Discover packet, it would convert it from broadcast to unicast packet and then send it to the DHCP Server.
5. What is a DHCP Scope and why is it required
A scope includes information like IP address ranges, Subnet Masks, gateway address, DNS Server etc. This required so that clients would require the necessary information from the server.
5. What would happen if there are multiple DHCP servers on a network
The clients would trigger DHCP Discover packets and the server which respond first would provide the IP address to the client
6. How does a client know that a lease has expired and how is it renewed
When a client receives an IP address from the DHCP Server, the lease expiry date and time is provided as part of DHCP options. This is maintained and recorded by the client. Just before the lease expiry time, the client would initiate a renew request to the server for a new lease
7.How many DHCP Servers can reside on one subnet
It’s unlimited. But if there is a DHCP client, which server would lease out the IP address? It’s a simple logic. The first server which responds to the DHCP clients IP address request would lease out the IP address.
8.Explain the communication flow between a DHCP client and server on a network with two DHCP Servers
The first packet the DHCP Client initiates would be the DHCP Discover packet. The DHCP Discover packet is broadcast in nature and would be received by both the DHCP servers. The DHCP servers would respond with DHCP offer packet containing the IP addresses which they offer. Based on the first DHCP offer the client receives, the client would respond with DHCP request packet which contains the IP address which it would be using along with the DHCP servers IP address which had provide the respective. This packet is sent as a broadcast. The packet, when received by the other DHCP server would understand that the IP address which it had leased to the client (In the DHCP offer packet) is not taken. So the DHCP server would put the IP address back to its pool.
Post more information on this.
ReplyDeleteDHCP Interview Question Answers
require more basic interview question for L1 engineer or for fresher
ReplyDelete