cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2119
Views
0
Helpful
9
Replies

Basic layer 2 question

kaustubhchavan
Level 1
Level 1

If suppose in 1 switch (pure layer 2) vlan 2 & vlan 3 configured with 1 pc in respective vlan & both pc's having same mac address wht action will switch take ?

Thanks in advance.

9 Replies 9

kaustubhchavan
Level 1
Level 1

If any frame comes for that mac address wht switch will do with that.

Hi Kaustubh,

The two machines cant hv a same MAC-Address. MAC address is a unique identity for a machine.

ok its universal but in extream if due to some corrupt arp entry or unupdated filter table. how switch will behave for that particular frame.

Manoj goes a bit too far when he says that 2 devices can not have the same MAC address. It is true that the usual case is that the MAC address will be unique. But there are circumstances where the MAC address may be the same on 2 machines (mistakes in manufacturing, or locally configured MAC address are some circumstances that come to mind).

What the switch will do depends on where the frame arrived at the switch. If the frame arrived in VLAN 2 then the switch will forward to the PC in VLAN 2. If the frame arrived at the switch in VLAN 3 then the switch will forwrd to the PC in VLAN 3. And if the frame arrived at the switch in some other VLAN then the switch will not forward the frame to either PC.

HTH

Rick

HTH

Rick

Hi Rick,

I have some queries regarding your explanation ,

1 > as you said , If same mac address present in Vlan 2 & Vlan3 , If the frame arrived in VLAN 2 then the switch will forward to the PC in VLAN 2. If the frame arrived at the switch in VLAN 3 then the switch will forwrd to the PC in VLAN 3.

Whether Switch allowed same mac address learn on two different vlan or on interface.

  As if there is only one vlan &  if same mac address learn on two interface then switch keep the latest entry only & flush old one.

  Then how switch allowed same mac learn on two different vlan.

Please correct me.

Regards,

Suryakant.

Suryakant

I am not sure that I really understand your questions. Here is my attempt at answers. If some answer is not sufficient then perhaps you can clarify your questions so that I can answer it better.

Whether Switch allowed same mac address learn on two different vlan or on interface.

The switch should allow the same MAC address to be learned in different VLANs and will separate them on the basis of the VLAN. If the same MAC address is learned on 2 interfaces within the same VLAN then the switch will keep learning the most recent MAC (and dropping the older MAC). This should generate error messages about interface flapping and may generate messages about duplicate MAC.

  As if there is only one vlan &  if same mac address learn on two interface then switch keep the latest entry only & flush old one.

As I answered above with 1 VLAN and same MAC address on 2 interfaces then the switch keeps learning the most recent MAC and dropping the older one. And it should generate error messages.

  Then how switch allowed same mac learn on two different vlan.

When there are 2 different VLANs then the switch is able to keep separate forwarding entries since the forwarding entry contains the MAC, the VLAN, and the associated interface. This allows the switch to make separate forwarding decisions separating the addresses by their associated VLAN.

HTH

Rick

HTH

Rick

Very tricky..-:)

1. If the hosts are on different host vlans ports on a L2 switch, then NOTHING is going to happen here (doubtful about errors too)

2. If vlans are trunked via a L3 device, the gateway will also NOT learn both the mac entries at the same time on the same interface which again leads to no communication ! (this should throw error)

If performed on a switch adhering to stds, it should throw an error if duplicate macs are found in the CAM for the same VLAN and flush the older one...whoosh and this should repeat in a loop, based on the frames it recieves on which port..

pompeychimes
Level 4
Level 4

Since there are multiple VLANs and because each VLAN likely has its own MAC-Address table, the switch will forward frames normally.

Please rate helpful posts.

James

I agree with pompeychimes

The switch will report 'duplicate MAC address' when they are in the same VLAN. I don't know if this is the case when they're in a separate VLAN? But from a technical point of view this should work as the MAC table records the MAC address and the VLAN. At the first layer 3 hop there could be maybe confusion concerning the ARP table...

Edit:

It's possible to have several HSRP groups with the same standby ID which results in the virtual MAC address

Getting Started

Find answers to your questions by entering keywords or phrases in the Search bar above. New here? Use these resources to familiarize yourself with the community: