cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
2533
Views
0
Helpful
7
Replies

Source mac for inter-Vlan routing

s.ram
Level 1
Level 1

Hello folks-

Let's say I have VLANs 100, 200. And I want to route between these 2 VLANs.

VLAN 100 - Default Gateway 100.100.100.1/24 - MAC address - MAC100

VLAN 200 - Default Gateway 200.200.200.1/24 - MAC address - MAC200

 

Host on VLAN-A = 100.100.100.10/24 - MAC address - MACA

Host on VLAN-B = 200.200.200.20/24 - MAC address - MACB

 

Traffic is from HOST-A to HOST-B

SMAC: MACA

DMAC: MAC100

SIP: 100.100.100.10

DIP: 200.200.200.20

 

The packet will be routed, and the nexthop will point to VLAN interface 100.

 

Now, the packet that HOST-B receives, what will be the SMAC? Will this be MAC200 (the MAC address of vlan200 interface)?

 

Thanks for your time.

2 Accepted Solutions

Accepted Solutions

Hello

The L2 header towards HostB will be 

SMAC=mac200

DMAC=macb

 

 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

View solution in original post

Joseph W. Doherty
Hall of Fame
Hall of Fame
"Now, the packet that HOST-B receives, what will be the SMAC? Will this be MAC200 (the MAC address of vlan200 interface)?"

Yes, MAC200, as also already noted by Paul.

Src MAC is frame's sending host MAC.

BTW . . .

MACs only need to be unique for the L2 domain. So, you could have:

VLAN 100 - Default Gateway 100.100.100.1/24 - MAC address - MAC000
VLAN 200 - Default Gateway 200.200.200.1/24 - MAC address - MAC000

Host on VLAN-A = 100.100.100.10/24 - MAC address - MACX
Host on VLAN-B = 200.200.200.20/24 - MAC address - MACX

Then the received Src MAC would be MAC000.

You could also have:
VLAN 100 - Default Gateway 100.100.100.1/24 - MAC address - MAC000
VLAN 200 - Default Gateway 200.200.200.1/24 - MAC address - MACX

Host on VLAN-A = 100.100.100.10/24 - MAC address - MACX
Host on VLAN-B = 200.200.200.20/24 - MAC address - MAC000

Then the received Src MAC would be MACX.

Again, you only need two unique MACs for your four host MACs because they only need to be unique per L2 domain.

View solution in original post

7 Replies 7

Hello

The L2 header towards HostB will be 

SMAC=mac200

DMAC=macb

 

 

 


Please rate and mark as an accepted solution if you have found any of the information provided useful.
This then could assist others on these forums to find a valuable answer and broadens the community’s global network.

Kind Regards
Paul

Joseph W. Doherty
Hall of Fame
Hall of Fame
"Now, the packet that HOST-B receives, what will be the SMAC? Will this be MAC200 (the MAC address of vlan200 interface)?"

Yes, MAC200, as also already noted by Paul.

Src MAC is frame's sending host MAC.

BTW . . .

MACs only need to be unique for the L2 domain. So, you could have:

VLAN 100 - Default Gateway 100.100.100.1/24 - MAC address - MAC000
VLAN 200 - Default Gateway 200.200.200.1/24 - MAC address - MAC000

Host on VLAN-A = 100.100.100.10/24 - MAC address - MACX
Host on VLAN-B = 200.200.200.20/24 - MAC address - MACX

Then the received Src MAC would be MAC000.

You could also have:
VLAN 100 - Default Gateway 100.100.100.1/24 - MAC address - MAC000
VLAN 200 - Default Gateway 200.200.200.1/24 - MAC address - MACX

Host on VLAN-A = 100.100.100.10/24 - MAC address - MACX
Host on VLAN-B = 200.200.200.20/24 - MAC address - MAC000

Then the received Src MAC would be MACX.

Again, you only need two unique MACs for your four host MACs because they only need to be unique per L2 domain.

Is there a way to use the system Mac or a router Mac as the MAC address of all the IRB interfaces ? 

MACs are per interface, so unsure what would be a "system" or "router" MAC.

An IRB interface, is, in concept, much like a switch's SVI, so an IRB MAC would be the same across all physical interfaces supporting the same IRB interface. Again, this is much like all of a switch's VLAN ports, for the same VLAN, having/seeing the same MAC for the SVI.

In theory, you could have the same MAC across different IRB interfaces, but don't recall whether Cisco's IOS, generally, has a configuration option to set it. I recall (?), Cisco's IOS sometimes allows you to set a locally administered MAC address for some interfaces.

Thanks Joseph. What is the difference between an IRB interface and an SVI interface? I believe the “interface vlan <vlan-Id>” is an SVI interface. 
Thanks for your time. 

IRB - Router; SVI - Switch

Hello @s.ram ,

in most multlayer switch cisco platforms all the SVI interfaces use the same MAC address by default.

In some special cases you may need to change the MAC address of an SVI and you can use the mac command in SVI interface configuration mode.

These special cases include communication between SVIs in different VRFs via a trasparent FW for example.

 

Lilkely IRB interfaces should use the same MAC address but I'm not sure.

 

Hope to help

Giuseppe