Skip to main content
mkienast
New Member
May 24, 2016
Question

Set MAC address for a VLAN interface

  • May 24, 2016
  • 1 reply
  • 13728 views

Hello,

 

I want to set a MAC Address for a VLAN Interface.

  Have anynone an idea how can i set the MAC? And how can read out the MAC adresses for my VLANs?

 

I used this command but it didn´t work.

config system interface
    edit "vlan30"
        set vdom "root"
        set subst enable
        set substitute-dst-mac 00:09:0f:ef:0b:89
        set snmp-index 7
        set interface "wan1"
        set vlanid 20
    next
end

    1 reply

    emnoc
    New Member
    May 24, 2016

    My 1st question would be why do you need to set the mac addr?

     

    The next part, the mac address is carried from the parent interface Current mac_addr

     

    i.e ( let's say you have asubinterface on wan1 as in above

     

    diag hardware  deviceinfo nic  wan1

     

    ( the above wil not work on a AggregEthernet  or a physical interface  bonded into a AggregEthernet bundle )

     

    The Current HWaddr would be  your mac-addr &  if you use the set macaddr cli cmd on  the parent physical device it will CHANGE all macaddress on those subinterfaces bind to that physical device.

     

    But  this goes back to why do think you need to do this?

     

    Keep in mind HA modes of operations or AggregEthernets interfaces will not allow you to change mac_address.

     

    YMMV depending on FortiOS version, model, interface,etc.....

     

     

    mkienast
    mkienastAuthor
    New Member
    May 24, 2016

    Thanks for your info!

     

    Ticket can be closed.

    emnoc
    New Member
    May 24, 2016

    This isn't a TAC support forum ;)