LAYER-2 SWITCHING - INTERVIEW QUESTIONS

 

Question - 1 Which type address used by layer 2 switching ?

Layer 2 switching uses Hardware Address (MAC Address) of devices. Media Access Control (MAC) address burned into each and every Ethernet network interface card (NIC). The MAC, or hardware, address is a 48-bit (6-byte) address written in a hexadecimal format.

 

Question - 2 How to bridges and switches build and maintain the filter table ?

Bridges use software to create and manage a filter table, switches use application-specific integrated circuits (ASICs) to build and maintain their filter tables.

 

Question - 3 Why layer 2 switches and bridging are faster than router ? 

Layer 2 switches and bridges are faster than routers because they don’t take up time looking at the Network layer header information. Instead, they look at the frame’s hardware addresses before deciding to either forward, flood, or drop the frame.

 

Question - 4 Which type features are provided by layer 2 switching ?

  • Hardware-based bridging (ASICs)
  • Wire speed
  • Low latency
  • Low cost
  • Switch is also known as multiport bridge and by default switches breakup collision domain.

 

Question - 5 What makes layer 2 switches so efficient ?

  • In switching no modification to the data packet takes place. The device only reads the frame encapsulating the packet, which makes the switching process considerably faster and less error prone than routing processes are.
  • And if you use layer 2 switching for both work-group connectivity and network segmentation (breaking up collision domains), you can create more network segments than you can with traditional routed networks.
  • Plus, layer 2 switching increases bandwidth for each user because each connection (interface) into the switch is its own collision domain.
  • Switches create private, dedicated collision domains and provide independent bandwidth on each port, unlike hubs.

 

Question -6 What is collision domain ?

Collision domain is the network segment with the two or more host sharing the same bandwidth.

 

Question - 7 What is broadcast domain ?

Broadcast domain refers to a group of devices on a network segment that hear all broadcast sent on that network segment.

 

Question - 8 What is Latency ?

Latency is the time measured from when a frame enters a port to when it exits a port.

 

Question - 9 What is bandwidth ?

Bandwidth is the bit rate of available or consumed information capacity expressed typically in metric multiple of bit per second.

 

Question - 10 What are limitations of layer 2 switching ?

  • Neither layer 2 switches nor bridges break up broadcast domains by default—something that not only limits your network’s size and growth potential, but also can reduce its overall performance.
  • Broadcasts and multicasts, along with the slow convergence time of legacy spanning trees, can give you some major grief as your network grows. These are the big reasons layer 2 switches cannot completely replace routers (layer 3 devices) in the internetwork. 

 

Question - 11 What are differences between Bridging and LAN switching ?

  • Bridges are software based, while switches are hardware based because they use ASIC chips to help make filtering decisions.
  • A switch can be viewed as a multiport bridge.
  • There can be only one spanning-tree instance per bridge, while switches can have many. 
  • Most switches have a higher number of ports than most bridges.
  • Both bridges and switches flood layer 2 broadcasts.
  • Bridges and switches learn MAC addresses by examining the source address of each frame received.
  • Both bridges and switches make forwarding decisions based on layer 2 addresses.

 

Question - 12 Explain the function of layer 2 switching ? 

Address learning -
Layer 2 switches and bridges remember the source hardware address of each frame received on an interface, and they enter this information into a MAC database called a forward/filter table.

Forward/filter decisions -  
Step - 1 When a frame arrives at a switch interface, the destination hardware address is compared to the forward/filter MAC database. If the destination hardware address is known and listed in the database, the frame is only sent out the correct exit interface. The switch doesn’t transmit the frame out any interface except for the destination interface. This preserves bandwidth on the other network segments and is called frame filtering.
Step - 2 But if the destination hardware address is not listed in the MAC database, then the frame is flooded out all active interfaces except the interface the frame was received on. If a device answers the flooded frame, the MAC database is updated with the device’s location (interface). If a host or server sends a broadcast on the LAN, the switch will flood the frame out all active ports except the source port by default.

Loop avoidance - 
If multiple connections between switches are created for redundancy purposes, network loops can occur. Spanning Tree Protocol (STP) is used to stop network loops while still permitting redundancy

 

Question - 13 How cab we see the mac address forward-filter table of switches ?

Show mac address-table - The command show mac address-table will show you the forward/filter table used on the LAN switch.

 

Question -14 How a forward/filter table is populated when Host 1 is communicating with Host 2 in given scenario? 

Figure : Empty Mac Forward Filter Table on Switch
Mac Forward Filter Table
                                                             F0/0:
                                                             F0/1:
                                                             F0/2:
                                                             F0/3:
Figure : How switches learn host's locations
Mac Forward Filter Table
                                                             F0/0: 0000.8c01.000A  Step - 2
                                                             F0/1: 0000.8c01.000B  Step - 4
                                                             F0/2:
                                                             F0/3:

In this figure four hosts attached to a switch. When the switch is powered on, it has nothing in its MAC address forward/filter table, But when the hosts start communicating, the switch places the source hardware address of each frame in the table along with the port that the frame’s source address corresponds to.

Step 1. Host 1 sends a frame to Host 2. Host 1’s MAC address is 0000.8c01.000A; Host 2’s MAC address is 0000.8c01.000B.
Step 2. The switch receives the frame on the F0/0 interface and places the source address in the MAC address table.
Step 3. Since the destination address is not in the MAC database, the frame is forwarded out all interfaces—except the source port.
Step 4. Host 2 receives the frame and responds to Host 1. The switch receives this frame on interface F0/1 and places the source hardware address in the MAC database.
Step 5. Host 1 and Host 2 can now make a point-to-point connection and only the two devices will receive the frames. Hosts 3 and 4 will not see the frames, nor are their MAC addresses found in the database because they haven’t yet sent a frame to the switch.
If Host 1 and Host 2 don’t communicate to the switch again within a certain amount of time, the switch will flush their entries from the database to keep it as current as possible.

 

Question - 15 What is the advantage of redundant link between switches ?

Redundant links between switches are a good idea because they help prevent irrecoverable network failures in the event one link stops working. 

 

Question - 16 How do you stop someone from simply plugging a host into one of your switch ports—or worse, adding a hub, switch, or access point into the Ethernet jack in their office? 

 You can stop them in their tracks by using port security.

Switch#config t
Switch(config)#int f0/1
Switch(config-if)#switchport mode access →[Change the port from desirable mode to access port]

Switch(config-if)#switchport port-security ?
aging                       Port-security aging commands
mac-address            Secure mac address
maximum               Max secure addresses
violation                 Security violation mode
Switch(config-if)#switchport port-security maximum 1 → [Allow only one host per port means only one mac address can be used on that port]
Switch(config-if)#switchport port-security violation shutdown →[Shutdown the port if rule is violated or user try to add another host on that segment]

Switch(config-if)#switchport port-security mac-address sticky
Switch(config-if)#switchport port-security maximum 2
Switch(config-if)#switchport port-security violation shutdown

 

Question - 17 What are difference between Protect Mode and Restrict Mode in Security Violation ?

                                 Switch(config-if)#switchport port-security violation ?
                                 protect                              Security violation protect mode
                                 restrict                              Security violation restrict mode
                                 shutdown                          Security violation shutdown mode
Protect Mode -  Protect mode means that another host can connect but its frames will just be dropped.
Restrict Mode - It alerts you via SNMP that a violation has occurred on a port. You can then call the
abuser and give the warning.

 

Question - 18 What is use of Sticky in port-security ?

Note -  If the port shuts down, all dynamically learned addresses are removed. 
  •  You can use "switchport port-security mac-address sticky" command to enable sticky learning. It convert the dynamic MAC addresses to sticky secure MAC addresses and to add them to the running configuration by enabling sticky learning.  
  • When you enter this command, the interface converts all the dynamic secure MAC addresses, including those that were dynamically learned before sticky learning was enabled, to sticky secure MAC addresses.
  • If you save the sticky secure MAC addresses in the configuration file, when the switch restarts, the interface does not need to relearn these addresses. If you do not save the configuration, they are lost.
  • If sticky learning is disabled, the sticky secure MAC addresses are converted to dynamic secure addresses and are removed from the running configuration.

 

Question - 19 What is aging in port-security ?

By port security aging you can set the aging time and aging type for all secure addresses on a port. Aging use to remove and add hosts on a secure port without manually deleting the existing secure MAC addresses while still limiting the number of secure addresses on a port.
    
Switch(config-if)# switchport port-security [ aging {static | time aging_time | type {absolute | inactivity} ]
  • Static keyword enables aging for statically configured secure addresses on this port. 
  • Time aging_time keyword specifies the aging time for this port. Valid range for aging_time is from 0 to 1440 minutes. If the time is equal to 0, aging is disabled for this port. 
  • Type keyword sets the aging type as absolute or inactive. 
  • If you are using absolute aging, then all the secure addresses on this port ago out exactly after the time (minutes) specified and are removed from the secure address list. 
  • If you are using inactive aging, then secure addresses on this port ago out only if there is no data traffic from the secure source address for the specified time period

  

Question - 20 What is desirable mode ?

If port is in desirable mode then port desires to trunk if it senses another switch just connected.

 

Question - 21 You must know these following basic thing, when you are configuring a layer 2 switch.

  •  There is no ip address configure on the switch's physical interface, the ip address is configured under a logical interface, called a management domain or vlan.
  • All port on the switch are enabled by default.
  • You can apply securities and other features on more than one interface at a time through the int range command.
Switch#config t
Switch(config)#int f0/1-4             →   It means you are taking F0/1, F0/2, F0/3 and F0/4
Switch(config-if-range)#switchport mode access
Switch(config-if-range)#switchport port-security ?
Switch(config-if-range)#switchport port-security maximum 1
Switch(config-if-range)#switchport port-security mac-address sticky
Switch(config-if-range)#switchport port-security violation shutdown
  • You cannot set port security on a port while in desirable mode, so initially you will have to change interface desirable mode to access port through the Switchport mode access command.

 

Question - 22 Why did I get only four pings to work instead of five ?  

First ping didn’t work because of the time that ARP takes to resolve the IP address to its corresponding hardware MAC address.


SHARE

Anubhav Upadhyay

Hello and welcome to networktopic Blog. My name is Anubhav. I am a Senior Network Egineer. I have created this blog specially to serve interview questions and answer on Network Routing and Switching, I will try my best to serve correct and updated networking knowledge for you as per my corporate experience.

  • Image
  • Image
  • Image
  • Image
  • Image
    Blogger Comment
    Facebook Comment

54 comments:

  1. These are very informative, thanks a lot. But I have a confusion in switch learning Mac address. Whether switch learns source host's Mac address or switch port's Mac address where that particular host is connected. Please clarify.

    ReplyDelete
  2. Hey there, You've performed an incredible job. I will certainly digg
    it and personally recommend to my friends. I am confident they'll be
    benefited from this web site.

    ReplyDelete
  3. Good ? I should certainly pronounce, impressed with your website.
    I had no trouble navigating through all tabs as well
    as related info ended up being truly easy to do to access.
    I recently found what I hoped for before you know it at
    all. Reasonably unusual. Is likely to appreciate it for
    those who add forums or something, web site theme .
    a tones way for your client to communicate. Nice
    task.

    ReplyDelete
  4. Thank you for sharing with us, I conceive this website truly stands
    out :D.

    ReplyDelete
  5. Having your city, state, or county name with your url of your website is an excellent method
    to help enhance your regional online research rank. not everyone is
    blessed using a creative mind that can come with names which might be unique, useable understanding that sound
    interesting. The URL (your url of your website plus whatever comes
    after) of the given content on your site also plays a
    huge role in SEO.

    ReplyDelete
  6. I dugg some of you post as I cogitated they were very useful very helpful.

    ReplyDelete
  7. Outstanding post, I believe people should acquire a lot from this web blog its really user pleasant.
    So much fantastic info on here :D.

    ReplyDelete
  8. It is always great to experience a good partner when you are doing a business.
    Although after anyone will be searching for your business on the web, they will often be
    searching for your unique brand name. Without having the
    latest configuration it's difficult to handle the competition as well as the speed of the
    server highly rely on the hardware.

    ReplyDelete
  9. So you now know the stomach could become sensitive not only
    to the properties of foods generally speaking but additionally with foods
    combined together inside the stomach which a lot of times are within the wrong combinations.
    You're probably looking for an solution to why your
    gut hurts after meals, right. Major Irritable Bowel
    Syndrome Signs And Symptoms - Belching or burping expels gas with the mouth.

    ReplyDelete
  10. You will be able to shield your original CD's,
    create a straightforward protocol for making use of software, and release your other
    servers and drives for other functions. The result is that
    your internet site won't be encountered with any threats because in the other sites
    about the server. Clients who employ this service go for to find the particular software they would rather use.

    ReplyDelete
  11. Ok, let's now contrast Positive SSL Wildcard Certificate
    and Platinum SSL Wildcard Certificate. The annual renewing of websites could be
    bad idea for SEO companies since the Google gives more priority to websites
    which is around for a longer time period therefore setting the renewal period for
    two years, or extending your website over to be at least two years
    from renewal can sort out SEO on your site. Place reviews of
    your website with a separate page, in order that people is
    able to see the experiences others have had by shopping
    with you.

    ReplyDelete
  12. So -- who wrote the interior, conceptual framework in the church
    that you're most familiar. The Cathedral at Plaza
    de la Seu (near subway Jaume I) was made of 1317 till 1441.
    His themes include co-ordination between entities with responsibility,
    in the security and response areas; the significance of intelligence and communication where many contributing
    agencies and bodies are collaborating; detailed planning,
    early mobilisation and several practice.

    ReplyDelete
  13. As I website possessor I think the content
    material here is really good, thanks for your efforts.

    ReplyDelete
  14. What's up to every body, it's my first pay a quick visit of this web site;
    this webpage contains amazing and truly fine information in favor of readers.

    ReplyDelete
  15. Right away you burn more calories digesting it, and you will stay full longer.
    For an added challenge try incorporating yet another
    workout element of your plank. The problem is
    that in our busy world, even eating organically, it can be nearly
    impossible to not get no less than some extent of daily contact with these xenoestrogens.

    ReplyDelete
  16. Do you have video or media enabled website such as the You - Tube videos
    you'll be able to select dedicated server. Usage of resources - As you possess a portion in the server all on your own,
    you can use your individual resources without needing to give other websites.

    If you enter business, you ought to really consider researching after which using Microsoft's Office
    Share - Point Server.

    ReplyDelete
  17. Without leptin, you'll eat more, after which you'll wind up
    passing more hours in the club figuring out the simple way of burning fat off simply because you overate.
    In addition to cutting calories, wine provide antioxidants in your body.
    This is much more that face men than it can be in woman because men store a greater portion of their excess
    fat on their stomach whereas women have a tendency to store it on the hips and thighs.

    ReplyDelete
  18. It is also recommended that you keep your electrical system complies with recent regulations.

    If you are replacing WEEE bought before this date with new EEE of the type, it is possible
    to return the WEEE free of charge to whoever makes the new equipment.
    The emergence of new rules or guidelines
    got feasible for all PAT testers to check electrical appliances and conclude when the electrical
    appliance were indeed safe or not.

    ReplyDelete
  19. If you are looking at adding ETFs for your 401(k) plan, you need to be informed about what
    your recordkeeper charges for utilizing those assets in your plan. Conservation Nation - A major basic in building green is conservation-not just in the materials, and fundamentals for creating a facility but of people who are essential for the facility to function-like
    water. Although a SOA won't remove all IT obstacles, a well-designed SOA does give IT managers a whole new way of creating
    solutions depending on proven business applications.

    ReplyDelete
  20. Switchgear 's been around for quite a while, and consequently, the current technology is very advanced compared towards the original switchgear systems, which required a manual shutdown. So, quite
    matter to consider about what WEEE is is that WEEE is Waste Electrical and Electronic
    Equipment as defined within the European Union from the Hazardous Waste Directive, and also the Waste Electrical and Electronic Equipment (WEEE)
    Directive. The emergence of latest rules or guidelines caused it to be possible for all PAT testers
    to check electrical appliances and conclude if your electrical appliance were indeed
    safe or not.

    ReplyDelete
  21. Hi! This is my first visit to your blog! We are a collection of
    volunteers and starting a new project in a
    community in the same niche. Your blog provided
    us beneficial information to work on. You have done a marvellous job!

    ReplyDelete
  22. I like the helpful information you provide in your articles.
    I will bookmark your blog and check again here frequently.
    I am quite sure I'll learn lots of new stuff right here!
    Good luck for the next!

    ReplyDelete
  23. My brother suggested I might like this website. He was totally right.
    This post actually made my day. You can not imagine simply how much time I had spent for this info!
    Thanks!

    ReplyDelete
  24. This information is worth everyone's attention. How
    can I find out more?

    ReplyDelete
  25. Hey Nice Blog!! Thanks For Sharing!!!Wonderful blog & good post.Its really helpful for me, waiting for a more new post. Keep Blogging!
    Network security training in coimbatore
    IT security training in coimbatore

    ReplyDelete
  26. whoah this weblog is great i love reading your posts. Keep up the good work!

    You realize, many individuals are hunting around for this information, you can aid them greatly.

    ReplyDelete
  27. I rattling delighted to find this website on bing, just what I was
    looking for :D also saved to bookmarks.

    ReplyDelete
  28. thank you for all your efforts that you have put in this. Very interesting info.

    ReplyDelete
  29. What's up to every single one, it's genuinely a nice for me
    to visit this web page, it consists of useful Information.

    ReplyDelete
  30. Great article and right to the point. I don't know if this
    is truly the best place to ask but do you guys have any thoughts
    on where to get some professional writers? Thanks :)

    ReplyDelete
  31. I really love your site.. Excellent colors & theme.

    Did you build this site yourself? Please reply back as I'm wanting to
    create my own website and would like to know where you
    got this from or what the theme is named. Thank you!

    ReplyDelete
  32. Ahaa, its good conversation about this article here at
    this webpage, I have read all that, so now me also commenting here.

    ReplyDelete
  33. What a material of un-ambiguity and preserveness of valuable knowledge concerning
    unpredicted feelings.

    ReplyDelete
  34. Hello! I know this is kinda off topic however , I'd figured I'd ask.
    Would you be interested in exchanging links or maybe guest writing a blog post
    or vice-versa? My website covers a lot of the same subjects as yours and I believe we could greatly
    benefit from each other. If you might be interested feel free to shoot me an email.
    I look forward to hearing from you! Awesome blog by the way!

    ReplyDelete
  35. Hi there would you mind letting me know which web
    host you're working with? I've loaded your blog in 3 completely different internet browsers and I must say
    this blog loads a lot faster then most. Can you recommend a good web hosting provider at a
    reasonable price? Thanks a lot, I appreciate it!

    ReplyDelete
  36. Hello there, You have done an incredible job. I will certainly digg it and personally suggest to my friends.
    I'm confident they will be benefited from
    this web site.

    ReplyDelete
  37. I could not refrain from commenting. Well written!

    ReplyDelete
  38. I am curious to find out what blog system you happen to be using?
    I'm experiencing some small security problems with my latest website and I would like to find something
    more secure. Do you have any recommendations?

    ReplyDelete
  39. Ahaa, its fastidious conversation about this article here
    at this website, I have read all that, so
    at this time me also commenting at this place.

    ReplyDelete
  40. Informative article, exactly what I was looking for.

    ReplyDelete
  41. I do accept as true with all of the concepts you have introduced for your
    post. They're very convincing and can certainly work.
    Still, the posts are too quick for starters. May you please
    lengthen them a bit from subsequent time? Thank you for the post.

    ReplyDelete
  42. I feel this is one of the such a lot important information for me.
    And i am glad reading your article. However wanna commentary on few normal issues, The website style is wonderful, the articles is actually excellent :
    D. Just right activity, cheers

    ReplyDelete
  43. Hi, its nice piece of writing regarding media print, we all be aware of media is a impressive source of facts.

    ReplyDelete
  44. Today, I went to the beach front with my children. I found a sea
    shell and gave it to my 4 year old daughter and said "You can hear the ocean if you put this to your ear." She put the shell to her ear and screamed.
    There was a hermit crab inside and it pinched her
    ear. She never wants to go back! LoL I know this is entirely off topic but I had to tell someone!

    ReplyDelete
  45. Hello great blog! Does running a blog similar to this take a
    massive amount work? I've very little understanding of coding however I had
    been hoping to start my own blog soon. Anyhow, if
    you have any recommendations or techniques for new blog owners
    please share. I know this is off topic however I just wanted to ask.
    Many thanks!

    ReplyDelete
  46. Greetings! Very useful advice within this post!
    It is the little changes that will make the most significant changes.
    Many thanks for sharing!

    ReplyDelete
  47. I have been exploring for a little bit for any high
    quality articles or blog posts on this kind of house .
    Exploring in Yahoo I finally stumbled upon this website.
    Studying this information So i am happy to
    show that I have a very just right uncanny feeling I came upon just what
    I needed. I most for sure will make certain to don?t omit this website and provides it a glance regularly.

    ReplyDelete
  48. Hi there, this weekend is good in favor of me, because this point in time i am reading this wonderful educational paragraph
    here at my house.

    ReplyDelete
  49. You really make it seem so easy with your presentation but I find this topic to be actually something that I think I would never understand.
    It seems too complex and extremely broad for me.
    I am looking forward for your next post, I will try to get the
    hang of it!

    ReplyDelete
  50. Thanks in favor of sharing such a fastidious opinion,
    piece of writing is fastidious, thats why i have read it entirely

    ReplyDelete
  51. Thanks for finally writing about >"LAYER-2 SWITCHING - INTERVIEW QUESTIONS" <Liked it!

    ReplyDelete

If you like my posts then please comment and if you don’t like then please suggest me to improve, and if you have any query related to post then please text me through the comment box or mail me on upadhyayambition@gmail.com , I will try my best to solve your queries as soon as possible.