Pages

Tuesday, March 17, 2015

Interview questions on routing

Can routers check ethernet frames
Routers look for information inside the IP packet header for routing the packets. But the packets itself would be encapsulated inside frames like ethernet, PPP etc. For example, if the IP packet is encapsulated inside an ethernet frame, the router would first need to check the destination mac-address inside the frame and verify if it is intended for itself and only then be able to process the IP packet header, which would be the data inside the packet.

How do routers populate routing entry for a directly connected network
A directly connected network refers to the network address corresponding to the IP address and subnet mask configured on the specific network interface card on the router. The IP address and subnet mask would be “And” ed to derive the network address.

How do routers forward IP packets
When a router receives an IP packet, it would check the destination IP address in the packet. The router would then performing an “And “ operation with the subnet mask of the different route table entries with the destination IP address and verify if the corresponding network address in the routing table matches. On a match, the packet would be forwarded to the interface to which it the route entry is associated with.

What are the parameters that are provided in a static route
A static entry would typically contain the network address, network mask and the default gateway. Let’s table an example where a router has two directly connected networks. The hosts within the router, needs to access a network which is not a directly connected network. The network is one hop away from the router and is reachable via the default gateway of the router. So the network address value would be the one which the hosts would want to reach via the router. This network address along with the network mask and the gateway address through which the network can be reached is configured as a static route.

How does a PC know as to whether the destination IP address is on the same or different network
Assume that a PC is configured with an IP address 192.168.2.1 and subnet mask 255.255.255.0. If the user on the PC issues a ping to the IP address 192.168.1.1, the PC would check in its routing table for matching network address and decide if it is on the same or different network.

An ADSL router is configured for internet connection. A switch is connected to the router to which the hosts are connected. What type of route entry should be configured on the router for the hosts to access the internet
A default route entry should be configured on the router. IP addresses which are internet based, cannot be configured explicitly on the routers since they would not be known beforehand. Examples are IP addresses of websites which the user tries to access. The default route once configured would take care of destination networks which the router is unaware

In which type of addressing (class full or classless) is the subnet mask information carried in the IP header.
Whatever the type of addressing, the subnet mask is never carried in an IP header

What is the difference between class full and classless addressing
In classful addressing, based on the first octet value of the IP address, the class of the network (A,B,C) is decided. In classless addressing, the octet value is not considered. Rather, the subnet mask is used to derive the network address.

What type of IP address (Private or Public ) is used when a computer is connected to the internet directly
Public IP address

On which hardware component on a computer is the IP address configured
The IP address is configured on the network card.

Does a computer have routing tables
A computer has routing table. The routing table is populated by the operating system, once the IP address, subnet mask and default gateway is configured. On a windows PC, the routing table can be viewed by typing the command ‘route print’ on the command prompt.

A default route (0.0.0.0) would be populated when the default gateway is configured.
The default route is required to route packets to unknown networks , like packets bounded for internet.

How many default route entries would be available in the routing table of a PC with two gateways
Every default gateway would correspond with a default route. So two default entries would be available on the routing table of a PC with two gateways


No comments:

Post a Comment