3 physical port device

I am having device which is having 3 physical port.I have flashed LEDE on it. it has taken all port in switch as switch0.in dmesg i found switch is switch0: Atheros AR8337 rev. 2 switch registered on ag71xx-mdio.0 . only eth0 single port i can see in OS. How can i separate all 3 physical port with separate mac address? like eth0 eth1 eth2. Currently all ports are separate by vlan but only one physical address.

This is not possible with these kinds of switches.

1 Like

eth0 will be your single cpu port and you could create three vlan interfaces as you have already done.

You could set to each vlan interface a own mac with something like in /etc/config/network:

config interface 'test'
	...
	option ifname 'eth1.10'
	option macaddr '00:11:22:33:44:55'

Thanks Juppin for reply. :slight_smile:
I want manage port individually.This will set a software mac.
switch0 points on eth0 only. Can't i manage switch for all three ports eth0,eth1 ,eth2. is there any change required in build or driver file of device profile?

If your device is capable, you can try to define a VLAN for each port, tagged on the CPU port and untagged on the LAN port, so you end with interfaces eth0.1, eth0.2, and eth0.3.

Your CPU does only have one port, this one connects to a switch and all three physical ports are connected also to the switch...

The only solution to manage each physical port by it´s own, is with vlans on eth0 as @eduperez mentioned.
Then you can set to each vlan a own mac address as i mentioned before...

Thanks for reply.
How can i exclude port from switch in case of trucking specific port or make port manged indivisually(like unmanaged port)?

https://openwrt.org/docs/guide-user/network/vlan/switch_configuration#assigning_vlan_ids_on_vlan-enabled_switch_hardware

If you want to "trunk" between two ports, you will have to set up a list of VLANs in the switch covering each individual VLAN ID that needs to pass through. There isn't a way in OpenWrt to have a "wildcard" VLAN. Though some switch hardware may support it, it is not in the Linux driver and swconfig command.

There is no way to bypass the switch, since the external Ethernet ports are only connected to the CPU's single port through the switch chip.