Check Mac Update

This scenario shows how to change or select the MAC address of a bridge interface.

Test Update Bridge MAC

Description

Initially, the bridge MAC is not explicitely configured. In this case, the MAC with the lowest value of all attached interfaces is set in the bridge. In order to assign the bridge MAC address we can select a specific interface from the ones that are attached; or even a custom MAC.

Scenario

Step 1: Set the following configuration in DUT0:

set interfaces bridge br0
set interfaces ethernet eth0 bridge-group bridge br0
set interfaces ethernet eth0 mac '10:00:00:00:00:01'
set interfaces ethernet eth1 bridge-group bridge br0
set interfaces ethernet eth1 mac '20:00:00:00:00:02'
set system login user admin authentication encrypted-password '$6$GSjsCj8gHLv$/VcqU6FLi6CT2Oxn0MJQ2C2tqnRDrYKNF8HIYWJp68nvXvPdFccDsT04.WtigUONbKYrgKg8d6rEs8PjljMkH0'

Step 2: Run command interfaces bridge show detailed at DUT0 and check if output contains the following tokens:

10:00:00:00:00:01
Show output
--------------------------------------------------------------------------------------------------------------
Name  Idx           IP Address           Admin  Oper  Link  MTU   Vrf  Upper  Lower   Type       Phys addr
--------------------------------------------------------------------------------------------------------------
 br0  445  fe80::4098:7aff:feef:25dc/64  up     up    up    1500                     bridge  10:00:00:00:00:01

Step 3: Modify the following configuration lines in DUT0:

set interfaces bridge br0 mac eth1

Step 4: Run command interfaces bridge show detailed at DUT0 and check if output contains the following tokens:

20:00:00:00:00:02
Show output
--------------------------------------------------------------------------------------------------------------
Name  Idx           IP Address           Admin  Oper  Link  MTU   Vrf  Upper  Lower   Type       Phys addr
--------------------------------------------------------------------------------------------------------------
 br0  445  fe80::4098:7aff:feef:25dc/64  up     up    up    1500                     bridge  20:00:00:00:00:02

Step 5: Modify the following configuration lines in DUT0:

set interfaces bridge br0 mac '30:00:00:00:00:03'

Step 6: Run command interfaces bridge show detailed at DUT0 and check if output contains the following tokens:

30:00:00:00:00:03
Show output
--------------------------------------------------------------------------------------------------------------
Name  Idx           IP Address           Admin  Oper  Link  MTU   Vrf  Upper  Lower   Type       Phys addr
--------------------------------------------------------------------------------------------------------------
 br0  445  fe80::4098:7aff:feef:25dc/64  up     up    up    1500                     bridge  30:00:00:00:00:03