Pages

Friday, May 18, 2012

Switching interview questions and answers

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 learned before PC1 sends data to PC2
The switch would not have learned 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 sent data, which is ultimately transported using ethernet frames.

How long would a switch retain a mac-address in its mac-address table
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.

What do switches do with the source and destination mac-address in a frame
 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.

What do switches do if the source and destination mac-address on a frame is the same
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.

How do hubs handle unicast and broadcast frames
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 sent to all ports on the hub.

What is the difference between manageable and unmanageable switches
Manageable switches have the capacity to be managed through Web interface, console, telnet, etc. This is possible because they contain an operating system which an unmanageable switch does not have.

How are broadcast and unicast frames differentiated by switches
Broadcast frames are identified by the value in the destination mac-address of the frame as FF-FF-FF-FF-FF-FF .Unicast frames contain the specific value of the mac-address of the intended recipient.

What are the changes that would be applied to the mac-address table of a switch if a PC which is connected to port 1 is disconnected and connected back to port 2?
 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.

Do switches use CSMA/CD
CSMA/CD is the protocol which is used by half duplex devices like hubs. Generally switch will be full-duplex. It is not used by switches

Can a hub be connected to a switch
A hub can be connected to a switch

Can a switch have an operating system
 Yes, switches which have an operating system are termed as a manageable switch. Switches which does not have an operating system, are unmanageable switch

A PC has two network cards. How many mac-addresses would it have
Every network card has a unique mac-address. So a PC with two network cards would have two mac-addresses

Can two devices on the same network have the same mac-address.
It is not possible. Every device has a different network card. Each network card has a unique mac-address.

Can a mac-address value be edited
 Certain network cards provide the provision to edit the mac-address.

What is size of a mac-address
 The size of mac-address is 48 bits.

On a computer, which hardware component has the mac-address.
The network card has the mac-address

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
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.

Can an unmanageable switch be configured with an IP address
An unmanageable switch does not have an operating system, which is required for configuring an IP address.

What is a trunk port used for
A trunk port is used for carrying 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 configured as trunk ports.

What is the impact of an Ethernet frame in a cut-through and store and forward switching
Preamble and SFD are checked when a frame arrives on a switch port. This is for clock synchronization 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.

2 comments:

  1. hi, i have a doubt.. in earms , during clean, image for all devices are copied to tftp though they are same....this consumes lot of space in tftp... in autotest this can be overcome by adding -boot_image parameter in clean array so that image is copied to tftp for only one device and other devices load that same image from tftp..but how to achieve it in autoeasy?

    ReplyDelete
  2. HI Radhika,

    In case of autoeasy , we can provide the image in separate file called clean and it should be addressed in the first line of job file. Based on the clean.tcl script, it will load the Image for particular devices.

    Hope this will clarify your doubt!

    ReplyDelete