How will request send by http browser from workstation to any website goes through router and come back to workstation and open web page. Explain how packets travel in term of ip protocols. ?
Once a web site is entered in the address bar and enter key pressed the following process happens.
- The system performs a check on the dns cache to check if there is any entry for the concerned domain name if yes goes to step 3.
- The system performs a dns query for converting the domain name into ip by sending a query to the DNS server.
- Once a dns response for the query is received the initiates a 3 way handshake with destination ip on port 80 or 443.
- Client sends a sync to server, server sends a sync+ack to client. the client sends a ack to sync from the server.
- Once a 3 way hand shake is completed the browser presents the request to server.
- Based on the received request the server responds with requested file/data.
- Once the transmitting of data is completed the server sends a fin packet, then client sends a fin packet and connection gets terminated.
Switching Interview Q/A
====================
Q1. PC1 and PC2 are connected to port 1 and port 2
of an ethernet switch using cat 5e cables. How many mac addresses would the
switch have learnt before PC1 sends data to PC2?
Ans.The switch would not have learnt any mac-address in its
mac-address table. Switches learn mac-addresses only after receipt of frame on
the respective ports. In the above scenario, PC 1 has not yet send data, which
is ultimately transported using ethernet frames.
Q2. How long would a switch retain a mac-address in its mac-address
table?
Ans.Assume that a PC is connected to a switch port. When the PC
sends a frame to the switch port, the source mac-address in the frame is learnt
and added to the table. Switches have mac-age-time which are configurable as
well as set with a default value. When there is inactivity from the PC
(Data/frames are not send) for the mac-age-time value, the mac-address is
removed.
Q3. What do switches do with the source and destination mac-address
in a frame?
Ans. Switches would check the source mac-address in the frame and verify if it is available in the mac-address table. If not, the source mac-address would be added to the table. Switches would check if the destination mac-address is available in the mac-address table. If not, the frame would be flooded to all ports on the switch.Once a response is received from the intended recipient, the corresponding port would be updated with the mac-address entry (destination mac-address). In this way switch populates the mac-address table.
Ans. Switches would check the source mac-address in the frame and verify if it is available in the mac-address table. If not, the source mac-address would be added to the table. Switches would check if the destination mac-address is available in the mac-address table. If not, the frame would be flooded to all ports on the switch.Once a response is received from the intended recipient, the corresponding port would be updated with the mac-address entry (destination mac-address). In this way switch populates the mac-address table.
Q4. What do switches do if the source and destination mac-address on
a frame is the same?
Ans. When the source and destination mac-address in the frame is the
same, the switch would not add the entry to it’s mac-address table or send it
to the required destination.The frame will be filtered by the switch and
discarded.
Q5. How do hubs handle unicast and broadcast frames
Ans. Hubs work at Layer 1 of the OSI model. They do not understand
frames. Irrespective of the type of the frame, unicast or broadcast, the signal
carrying the frame would be send to all ports on the hub.
Q6. How are broadcast and unicast frames differentiated by switches
Ans. Broadcast frames are identified by the value in the destination
mac-address of the frame as FF-FF-FF-FF-FF-FF .Unicast frames contains the
specific value of the mac-address of the intended recipient.
Q7. What are the changes that would be applied on the mac-address
table of a switch if a PC which is connected to port 1 is disconnected and
connected back to port 2.Ans.When the PC is disconnected, from switch port1, the
mac-address entry for the PC would be removed from the table since the link is
broken. When it is connected back to switch port 2, the mac-address table would
still not have the entry since there has been not data which is initiated yet
from the PC.
Q8. Can a switch have an operating systemAns. Yes, switches which have operating system are termed as
manageable switch. Switches which does not have an operating system, are
unmanageable switch
Q9. A PC has two network cards. How many mac-addresses would it have
Ans.Every network card has a unique mac-address. So a PC with two
network cards would have two mac-addresses
Q10. Can two devices on same network can have the same mac-address.
Ans. It is not possible. Every device has a different network card.
Each network card has a unique mac-address.
Q11. What is size of a mac-addressAns.The size of mac-address is 48 bits.
Q12.PC1 wishes to communicate with PC2. PC1 is aware of the IP
address of PC2. Would the mac-address of PC2 be required, for data
communication between PC1 and PC2 or would the knowledge of IP address suffice
Ans. The IP address information of the peer would be sufficient from
a users perspective. But for data to be sent on the physical network, computers
need to be aware of the mac-address of the device with which it needs to
communicate.
Q13. What is a trunk port used for
Ans. trunk port is used for carrying traffic traffic from different
VLANS. Take an example of two switches connected using a cable on two ports.
VLAN 2 and VLAN 3 are configured on both the switches. For VLAN communication
to be successful between the switches, the ports should be configure as trunk
ports.
Q14. What is the impact of an Ethernet frame in a cut-through and
store and forward switching
Ans. Preamble and SFD is checked when a frame arrives on a switch
port. This is for clock synchronisation and the SFD informs the switch port the
beginning of a new frame. The next field is the destination mac-address. In
cut-through switching as soon as the Destination mac-address is read, the frame
is forwarded to the intended destination port. In store and forward switching,
the entire frame is copied to the buffer, the CRC value of the frame calculated
and then the frame is forwarded to the intended destination port. The
destination would also calculate the CRC value of the frame.
Routing Interview Q/A
===================
Q1. Can routers check ethernet frames?
Ans. 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.
Ans. 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.
Q2. How do routers populate routing entry for a directly connected network?
Ans. 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.
Q3. How do routers forward IP packets?
Ans. 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.
Q4. What are the parameters that are provided in a static route
Ans. 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.
Q5. How does a PC know as to whether the destination IP address is
on the same or different network
Ans. 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.
Q6. 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
Ans .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
Q7. In which type of addressing (class full or classless) is the
subnet mask information carried in the IP header.
Ans. Whatever the type of addressing, the subnet mask is never
carried in an IP header
Q8. What is the difference between class full and classless addressing
Ans.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.
Q9. What type of IP address (Private or Public ) is used when a
computer is connected to the internet directly
Ans. Public IP address
Q10. On which hardware component on a computer is the IP address
configured
Ans. The IP address is configured on the network card.
Q11. What route would be populated in the routing table of a PC when
the default gateway is configured on it
Ans. 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.
Q12. How many default route entries would be available in the routing
table of a PC with two gateways
Ans. 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
13. How router advertise
control and data packet.:
Flow of Routing Information
Routing information is the information about routes learned
by the routing protocols from a router’s neighbors. This information is stored
in routing tables. The routing protocols advertise active routes only from the
routing tables. An active route is a route that is chosen from all routes in
the routing table to reach a destination.
To control which routes the routing protocols place in the
routing tables and which routes the routing protocols advertise from the
routing tables, you can configure routing policies, which are sets of rules
that the policy framework uses to preempt default routing policies.
The Routing Engine, which runs the router's control plane
software, handles the flow of routing information between the routing protocols
and the routing tables and between the routing tables and the forwarding table.
The Routing Engine runs the Junos OS and routing policies and stores the active
router configuration, the master routing table, and the master forwarding
table,
Flow of Data Packets
Data packets are chunks of data that transit the router as
they are being forwarded from a source to a destination. When a router receives
a data packet on an interface, it determines where to forward the packet by
looking in the forwarding table for the best route to a destination. The router
then forwards the data packet toward its destination through the appropriate
interface.
The Packet Forwarding Engine, which is the central processing
element of the router’s forwarding plane, handles the flow of data packets in
and out of the router’s physical interfaces. Although the Packet Forwarding
Engine contains Layer 3 and Layer 4 header information, it does not contain the
packet data itself (the packet's payload).
14. What is difference
between L3 Switch and Router?
- L3 Switch do switching at layer 3 by
preserving the source and destination mac and preserving the TTL value of the
IP header of the 1st routed packet,
so the first packet is
routed using normal routing lookup, but after that all packet are switched.
- router do normal routing lookup, but by introducing
fast switching and CEF, packets are also now switched on a router.
- Switches doesnt support some QoS features.
- Switches doesnt support NAT.
- The forwarding on switches is done on ASIC
(Application Specific Integrated Circuits) which is done in hardware rather
than a software.
- Forwarding on routers are done in a software.
- router supports different WAN technologies
(modules) unlike switches.
No comments:
Post a Comment
Note: only a member of this blog may post a comment.