How to configure the switch on LS1028 as a common switch, that is, self-learning type? I have now set eno2's IP address and plugged the network cable into swp0. eno2's IP cannot be pinged.
Does this configuration actually work at runtime, or does it have to be configured in the device tree?
已解决! 转到解答。
Run the following configure:
# ip link add name br0 type bridge stp_state 0
# ip link set swp0 master br0 && ip link set swp0 up
# ip link set swp1 master br0 && ip link set swp1 up
# ip link set swp2 master br0 && ip link set swp2 up
# ip link set swp3 master br0 && ip link set swp3 up
# ip link set br0 up
Then ls1028a will work as an normal switch device. You can test it by connect two Ethernet devices with 2 of the swp ports and use ping to test.
Run the following configure:
# ip link add name br0 type bridge stp_state 0
# ip link set swp0 master br0 && ip link set swp0 up
# ip link set swp1 master br0 && ip link set swp1 up
# ip link set swp2 master br0 && ip link set swp2 up
# ip link set swp3 master br0 && ip link set swp3 up
# ip link set br0 up
Then ls1028a will work as an normal switch device. You can test it by connect two Ethernet devices with 2 of the swp ports and use ping to test.