cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
618
Views
0
Helpful
5
Replies
Highlighted

Will the port Fa1/0/1 learn the mac address of the device? If not, why not?

Suppose I have a port Fa1/0/1 mapped to Vlan A. I connect a device that has an IP address in the range of Vlan B (an IP address that is not within Vlan A range.). Will the port  Fa1/0/1 learn the mac address of the device? If not, why not?

5 REPLIES 5
Highlighted
Advisor

Are you connecting the device in vlan b to a L2 or L3 switch? The router will know about anything in the local subnet that it supports. If you have subinterfaces on the router that support the routing for the vlans, the router will have each vlan mac address listed, but if you have the router on a L3 switch, and you have the switch configured to do the routing, the router really only needs to know what's in vlan 1, and it will route for everything else.

When a host is in vlan 1 has to communicate to another host in vlan 1, the host will arp for the mac address for whoever owns the ip address that it knows about. The arp request is broadcasted only on the vlan that the host is a member of. If it's a subnet that the host doesn't know about, but the default gateway does know about, then the default gateway will answer the arp request for the host. The host will send the traffic to the router/switch for it to be routed.

So, when you're talking about a L3 switch or a router that has to support multiple vlans, they'll know about all mac addresses on each vlan they support because they route between vlans in this manner - by answering arp requests on vlans to be the 'middle man' so to speak.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***
Highlighted

What would happen if it is an L2 switch?

Highlighted

The router will know it because it has to keep track of it. With a L2 switch, you'll need subinterfaces to support vlan tags. The port that the router connects to on the switch is trunked to allow for hosts to use different vlans. All hosts that need to cross vlans have to go up to he router. The router will have the mac address in its table for all supported vlans.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***
Highlighted

Will an L2 switch have mac address in its mac address table when no subinterfaces configured?

Highlighted

Yes, it will have mac addresses listed for the associated port that they were learned on. For example, if the ip address 192.168.1.50 is on port fa0/5, the associated mac address for that IP is listed in the mac address table to port fa0/5.

HTH,
John

*** Please rate all useful posts ***

HTH, John *** Please rate all useful posts ***
Content for Community-Ad