cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2069
Views
10
Helpful
8
Replies

802.1Q frame retains original MAC destination or not?

mahesh18
Level 6
Level 6

Hi all,

My question is do 802.1Q  trunking retains original MAC  destination or not?

IF someone can explain me this in detail.

thanks

mahesh

1 Accepted Solution

Accepted Solutions

Hi Mahesh,

As long as the packet is in same vlan (does not matter if same or different switches), the MAC addresses remain the same. Only when the packet moves to a different vlan (different subnet) we need to change the MAC addresses on the packet. This can again happen on the same switch (if it is an L3 switch) or on the default gateway router.

Yes, when the frame travels across the trunk to the next switch, the tag is removed on the next hop and no changes are made to the source/destination MAC addresses in this process of insertion/removal of the dot1Q tag.

Cheers,

Shashank

Please rate if this helped answer your question

View solution in original post

8 Replies 8

Shashank Singh
Cisco Employee
Cisco Employee

Hi Mahesh,

When an ethernet frame is tagged with a dot1q tag, both source and destination MAC addresses are retained. dot1Q is a just a 4 byte field that is inserted in the frame and no changes are made to MAC addresses.

/image/gif/paws/17056/741_4-1.gif

For detailed information, visit:

http://www.cisco.com/en/US/tech/tk389/tk689/technologies_tech_note09186a0080094665.shtml#topic2

Hope that helps,

Shashank

P.S. Please rate if this helped answer your question.

Hi Shashank,

My understanding was when a pc needs to reach another PC  say  on other side of WAN  then the

source and destination IP remains same but source and destination mac address changes as packet passes by.

first PC uses it own mac address as source and router interface  as its destination mac address .

so here we see that as packet goes to different network source and destination mac address changes.

Can you explain me how on 802.1q trunking source and destination mac address does not change??????

Many thanks

Mahesh

Hi Mahesh,

Yes you are right in saying that the MAC addresses change as the packet travels between subnets. In other words, MAC addresses change whenever the frame hits an L3 device. But this is not because of trunking. The MAC address can change even when the the packet travels through an access port to the L3 device.

Trunking is a concept of having the same link carry data for one or more vlans. We use the dot1q tag to distinguish data from different vlans. This tag is a 4 byte field that is inserted in the frame on the sender switch and is removed from the frame at the receiver switch. No changes are made to the frame in this process.

MAC address changes in case the destination IP is in a different subnet as the source PC subnet. In this case the PC puts SMAC as its own MAC, DMAC as the default gateway's MAC and sends the packet to the default gateway.

Default gateway rewrites the SMAC with its own MAC and DMAC with the next hop device's MAC and sends the packet. Trunking is not a requirement for the rewrite to happen.

If you still think that dot1q trunking changes the MAC address of a frame, please elaborate a little more on this process so that I can understand your question in a better way.

Hope that helps,

Shashank

Please rate helpful posts

Hi Shashank,

Many thanks for reply.

so in 802.1q trunking as long as packet is within same vlan but  on different switch then source and destination mac address remains same untill the

packet goes to destination switch  .

when packet hits destination switch then 4byte tag is removed and do  source address of packet changes to switch source  interface mac address or not??

regards

mahesh

Hi Mahesh,

As long as the packet is in same vlan (does not matter if same or different switches), the MAC addresses remain the same. Only when the packet moves to a different vlan (different subnet) we need to change the MAC addresses on the packet. This can again happen on the same switch (if it is an L3 switch) or on the default gateway router.

Yes, when the frame travels across the trunk to the next switch, the tag is removed on the next hop and no changes are made to the source/destination MAC addresses in this process of insertion/removal of the dot1Q tag.

Cheers,

Shashank

Please rate if this helped answer your question

Hi Shashank,

Many thanks for detailed explanation.

Best regards

mahesh

Hi Mahesh,

Glad to answer your questions, and thanks for the generous rating

Cheers,

Shashank

nathan demers
Level 1
Level 1

I think we're confusing the issue.  802.1q is not chaning the MAC address. It is adding the 4 byte tag.  IP protocol changes the mac address as needed.  I think the real answer is when 802.1q is implemented on a frame is the mac address changed?  The nswer is no.

If he was referring to the question in the exam:

which three statements are correct with regard to the IEEE 802.1Q standard (choose three). 

One answer is : The IEEE 802.1q frame retains the original mac destination address

In my opinion when 802.1q is applied to a frame the original mac address is retained.

Review Cisco Networking products for a $25 gift card