1.
Which class is used to create servers that listen for either local client or remote client programs?
Correct Answer
A. ServerSockets
Explanation
ServerSockets is the correct answer because it is a class in Java that is used to create servers that listen for either local client or remote client programs. This class allows the server to establish a connection with the client and exchange data over the network. It provides methods to bind the server to a specific port and address, accept incoming client connections, and handle the communication between the server and the client.
2.
Which constructor of DatagramSocket class is used to creates a datagram socket and binds it with the given Port Number?
Correct Answer
B. DatagramSocket(int port, InetAddress address)
Explanation
The constructor DatagramSocket(int port, InetAddress address) is used to create a datagram socket and bind it with the given Port Number. This constructor allows the user to specify both the port number and the IP address to bind the socket to.
3.
What is an example of a MAC address
Correct Answer
D. A625:cbdf:6525
4.
If a datagram router goes down then …………..
Correct Answer
B. Only those packets which are queued in the router at that time will suffer
Explanation
When a datagram router goes down, only those packets which are queued in the router at that time will suffer. This is because the router is responsible for forwarding packets to their intended destinations. If the router is down, it cannot process and forward the packets that are currently in its queue. However, packets that have already been forwarded and are in transit will not be affected.
5.
What is route poisoning?
Correct Answer
D. It describes when a router sets the metric for a downed link to infinity
Explanation
Route poisoning is a mechanism used in routing protocols where a router sets the metric for a downed link to infinity. This means that the router considers the link as completely unreachable and prevents regular update messages from reinstating the route. By setting the metric to infinity, the router effectively "poisons" the route, ensuring that it is not used for forwarding packets. This helps to prevent routing loops and ensures efficient and accurate routing in the network.
6.
Which statement is true regarding classless routing protocols?
Correct Answer
B. The use of variable length subnet masks is permitted
Explanation
Classless routing protocols allow for the use of variable length subnet masks (VLSM). This means that the network can be divided into subnets of different sizes, allowing for more efficient use of IP addresses. With VLSM, networks can be subnetted into smaller subnets, which can then be further divided into even smaller subnets if needed. This flexibility allows for better utilization of IP address space and more efficient routing.
7.
The DatagramSocket and DatagramPacket classes are not used for connection-less socket programming.
Correct Answer
B. False
Explanation
The statement is false because the DatagramSocket and DatagramPacket classes are indeed used for connection-less socket programming. These classes provide the functionality for sending and receiving datagrams, which are packets of data that can be sent over a network without establishing a connection beforehand. DatagramSocket is used to create a socket for sending and receiving datagrams, while DatagramPacket is used to encapsulate the data and address information of a datagram. Therefore, these classes are essential for connection-less socket programming.
8.
Which methods are commonly used in ServerSocket class?
Correct Answer
B. Public Socket accept()
Explanation
The correct answer is "public Socket accept()". This method is commonly used in the ServerSocket class to accept a connection from a client. It blocks until a client connects to the server and returns a Socket object that represents the client connection. This method allows the server to establish communication with the client and handle incoming requests.
9.
Each packet is routed independently in ……………….
Correct Answer
C. Datagram subnet
Explanation
In a datagram subnet, each packet is routed independently without any prior setup or connection establishment. This means that each packet is treated as a separate entity and can take different paths through the network. This approach allows for more flexibility and scalability as there is no need to establish and maintain a dedicated path for each packet. It also allows for better fault tolerance as packets can be rerouted in case of network failures.
10.
Which address is meant for delivery of packet at Transport layer?
Correct Answer
C. Socket Adress
Explanation
The correct answer is Socket Address. At the Transport layer, a socket address is used to identify the destination for the delivery of a packet. It consists of an IP address and a port number, which together specify the specific process or application running on a device that should receive the packet. The IP address alone only identifies the device, while the socket address provides the necessary information to deliver the packet to the correct process or application on that device.