Pages

Wednesday, May 16, 2012

Scenarios based questions



Refer the above diagram.
Scenario Two PC’s are connected to a switch. The IP addresses of the PC’s are as displayed in the diagram. PC (192.168.1.2) is connected to port 2 on the switch and PC (192.168.1.3) is connected to port 3 on the switch

Questions
1. Does the switch need an IP address for PC1 to communicate with PC2
2. What would be the mac-address learned by the switch on port 2
3. If the PC on port is disconnected, would the mac-address table be flushed
4. If PC1 requires to communicate with PC2, what is required from PC2
5. Is a router required for PC1 to communicate with PC2
6. In the above diagram, how many mac-addresses would be available in the mac-address table of the switch after PC1 communicates with PC2.
7. What should be the value of default gateway on the TCP/IP adapter settings on the respective PC’s for communication between them to be succesfull.

Answers
1. An IP address is not required. The PC’s are both on the same network and can communicate directly.
2. The mac-address of PC1 would be learned by the switch on port 2
3. The mac-address table would not be flushed. The mac-address entry corresponding to the specific port would be removed
4. PC1 needs to know the mac-address of PC2 to construct the frame and send the data. For this, PC1 sends an ARP request to PC2.
5. Both the PC’s are on the same network. So a router is not required.
6. The mac-addresses of PC1 and PC2 would be available on both the switches.
7. A default gateway is not required for communication to be successful since both the PC’s are on the same network





Questions –
PC1 is configured with default gateway address of 192.168.1.1. PC2 is not configured with a default gateway. What would happen if PC1 pings (ICMP) PC2.
1. The ICMP request packet would be dropped on PC1.
2. The ICMP request packet would be dropped on PC2.
3. The ICMP reply packet would not exit PC2.
4.The ICMP reply packet would exit PC2 but would not reach PC1

Answer -3



IP address of PC1 – 192.168.1.1/24
IP address of PC2 – 192.168.1.2/24
IP address of PC3 – 192.168.2.1/24
PC1, PC2 and PC3 are connected to port 2, port 3 and port 4 on the switch. Port 2, Port 3 and Port 4 are members of VLAN 2.

Questions –
1. If PC1 pings PC3, will a response be received?
2. If an ARP Packet intended for PC2 is initiated by PC1, will it reach PC3?
3. Can PC1 ping PC2 without a default gateway configured on it’s TCP IP adapter settings.
4. If Port 3 is made a member of VLAN 3 would PC1 be able to ping PC2?

Answers
1. Although PC1 and PC2 reside on the same VLAN, the IP networks are different. So a response would not be received
2. All the devices are on the same VLAN , which is the same broadcast domain. ARP is a Layer 2 broadcast. So the ARP packet will also reach PC3.
3. PC1 and PC2 reside on the same IP network as well as on the same VLAN. So a default gateway would not be required.
4. When port 3 is made a member of VLAN 3, PC1 would be unable to ping PC2 although they reside on the same IP Network. This is because, to communicate between VLAN ’s, a layer 3 or gateway device would be required.


User 1 and User 2 is connected to the internet. User 1 is located in India and User 2 is located in Kenya. The Web Server is located in US and the DNS Server in Singapore.

Questions
1. User 1 types www.tcpipguru.com on the browser window. What would be the destination port number when the DNS request is sent to the DNS Server by user 1.
2. User 2 pings www.tcpipguru.com. Is the DNS Server required for the ping to be successful?
3. What has to be established before HTTP data can be sent or received from user 1 to the Web Server.
4. User 1 and User 2 simultaneously types www.tcpipguru.com on the browser of the respective computers. How does the server differentiate between the connections?
5. Will the communication be disrupted between the Web Server and the users if the DNS Server goes down during the data transfer between the web server and the user?
6. User 1 opens two instances of the website www.tcpipguru.com on his computer. How does the Web Server differentiate between the communication?

Answers
1. DNS works on UDP port 53. The DNS request would be sent to UDP port 53 on the DNS server.
2. For ping to be successful, the name www.tcpipguru.com has to be resolved into an IP address for which a DNS Server is required.
3. The user1′s computer has to establish a TCP 3-way handshake between the client and the server before data can be sent or received.
4. The server differentiates the connection based on the tcp source port numbers and source IP address in the incoming packet.
5. The DNS server is required only for retrieving the IP address associated with a name. Once the IP address is retrieved, the DNS server is not required, until the next time the user tries to access the website and the information is not available in the local DNS cache of the computer.
6. The tcp source port numbers for both the connections would be different based on which the server would differentiate the connections.










52 comments:

  1. good website i like it.thanks yar....

    ReplyDelete
  2. Helpful website ,specially for attending interviews

    ReplyDelete
  3. Thank you so much ..I am glad you liked it !! happy reading !!

    ReplyDelete
  4. very useful, thanks , hoping this can help with my interviews...

    ReplyDelete
  5. Very helpful indeed. Thank you!

    ReplyDelete
  6. Please make more scenario based questions. This is the only site where I can see questions like this. Thank you for your time Nawraj. I really appreciate it.

    ReplyDelete
  7. Thank you !! Will try to upload more such questions!!

    ReplyDelete
  8. I also appreciate your contribution. Thank you for this!

    ReplyDelete
  9. I don't have words to express how i am feeling when reading your explanations
    on diverse topics so request Nawraj upload some more scenario based question.


    ReplyDelete
    Replies
    1. Thank you for your kind words. Please search across the blog, you will find more content!!

      Delete
  10. Can you provide headers question and answers

    ReplyDelete
    Replies
    1. It should be already there .. Please search across the blog.

      Delete
  11. please provide us more scenario based questions...these questions are very good and informative..

    ReplyDelete
    Replies
    1. Thanks .. Please search across the blog .. you will find more

      Delete
  12. Superb write up!! I appreciate it.

    ReplyDelete
  13. Can you sahre few more scenario based questions with diagrams or any site to refer. Between your blog is ultimate (y)

    ReplyDelete
    Replies
    1. Thanks you for your kind words!! yes have updated few more .. please search

      Delete
  14. Thanks a lot Sir ji..please share such more questions..

    ReplyDelete
  15. Good job done , please post more scenario with latest technologies... ��

    ReplyDelete
  16. Great job!! Expecting more scenarios..

    ReplyDelete
  17. Please send scenario based interview questions for 3years experience

    ReplyDelete
  18. good job!keep uploading such questions

    ReplyDelete
  19. Plese post more imp networking interview questions ans scanario based coz every interviewer ask this question ... Thank you

    ReplyDelete
    Replies
    1. Welcome!! Please search across the blog., you will find more such questions!

      Delete
  20. Please do more posting with different network features as well. This is very helpful to understand real time scenarios

    ReplyDelete
    Replies
    1. Thank you!! Updated few more. Please search across blog!!

      Delete
  21. It was really very helpful. Please do more of such questions.

    ReplyDelete
    Replies
    1. Thank you!! Have updated few more. Please search across the blog!!

      Delete
  22. Hi Nawraj.
    Hope you are well and good.
    Hats off to you man.
    good work brother, Please do same for routing as well.

    ReplyDelete