Startseite‎ > ‎Linuix‎ > ‎Banana Pi-R1‎ > ‎

Konfiguration des Switch vom BPI-R1

Als 2 V-LANs verbunden über Bridge:
 
in /etc/network/if-pre-up.d/swconfig

ifconfig eth0 up
swconfig dev eth0 set reset 1
swconfig dev eth0 set enable_vlan 1
swconfig dev eth0 vlan 101 set ports '3 8t'
swconfig dev eth0 vlan 102 set ports '0 1 2 4 8t'
swconfig dev eth0 port 0 set pvid 102
swconfig dev eth0 port 1 set pvid 102
swconfig dev eth0 port 2 set pvid 102
swconfig dev eth0 port 3 set pvid 101
swconfig dev eth0 port 4 set pvid 102
swconfig dev eth0 set apply 1


in /etc/network/interfaces

auto lo
iface lo inet loopback
auto eth0.101 eth0.102 br0
 
iface br0 inet static
        bridge_ports eth0.101 eth0.102
        address 192.168.178.100
        netmask 255.255.255.0
        gateway 192.168.178.1

-------------------------------------------------------


Comments