MAC Address of Default Gateway

shadowepowershadowepower Registered Users Posts: 1 ■□□□□□□□□□
Hi everyone,

I am currently studying for the CCENT and while labbing, I found something that is bugging me. For a 3750 switch, I have assigned it a default gateway of 192.168.1.1 which is a router i have connected to it on one of the interface. I have also set up vlans and a svi for each vlan. My question is, how does the switch discover the mac address of the default gateway. With so many interfaces assigned to various vlans, how does it know which vlan that router is currently residing in or which port it is attached to? If I have the switch ping the gateway, does it just flood all the ports with ARP requests to find the mac and ignore the vlans assigned to it? Or the router broadcast a gratuitous arp on its end? Thanks.

Comments

  • clarsonclarson Member Posts: 903 ■■■■□□□□□□
    your example uses ipv4 so lets address that.
    first all the ports are in one vlan.
    the switch checks it's mac address tables for the mac address. doesn't find it, it floods all the ports in the one vlan.

    for multiple vlans.
    the mac address table contains information of which mac addresses have arrived on which vlans.
    the switch checks for the mac address table for the mac address assigned to the vlan that the svi is part of.
    doesn't find it. floods all the ports in the vlan that the svi is part of.

    so even if the router's mac address is in the mac address table. The switch separates all the mac address via vlan. So, if the svi isn't in the same vlan as the router's interface, the svi won't get the mac address information.

    you could just test it out. do a ping when the svi is in the same vlan as router interface, this should work. and then ping for a svi the ins't in the same vlan and that will fail.
  • carterw65carterw65 Member Posts: 318 ■■■□□□□□□□
    It will use ARP to discover the MAC addresses. Clarson explained all that, but just didn't use the term "ARP."
Sign In or Register to comment.