A jak do tego skonfigurować przełącznik żeby czytał vlan i cały router był jako klient bez dhcp nat itp.
Chodzi mi o to że mam dwa identyczne routery openwrt i dwa budynki chce żeby jeden router był master z dwoma łączami,
a drugi slave jako switch i wifi a w obu dostępne te same sieci.
obsługa 3 vlan na wifi każdy i do tego kilka vlan po LAN
config na master jest taki:
wireless:
config wifi-device 'radio0'
option type 'mac80211'
option hwmode '11g'
option path 'pci0000:00/0000:00:00.0/0000:01:00.0'
option country 'PL'
option channel '6'
option htmode 'HT40'
config wifi-device 'radio1'
option type 'mac80211'
option hwmode '11a'
option path 'pci0000:00/0000:00:01.0/0000:02:00.0'
option country 'PL'
option legacy_rates '1'
option htmode 'VHT80'
option channel '52'
config wifi-iface 'wifinet0'
option device 'radio0'
option mode 'ap'
option ssid 'HOME'
option network 'VLAN8'
option encryption 'psk2+ccmp'
option key '********'
config wifi-iface 'wifinet1'
option device 'radio0'
option mode 'ap'
option ssid 'Gosc'
option key '*********'
option encryption 'psk2+ccmp'
option network 'VLAN6'
config wifi-iface 'wifinet2'
option device 'radio1'
option mode 'ap'
option ssid 'HOME'
option network 'VLAN8'
option encryption 'psk2+ccmp'
option key '********'
config wifi-iface 'wifinet3'
option device 'radio1'
option mode 'ap'
option ssid 'Gosc'
option encryption 'psk2+ccmp'
option key '*********'
option network 'VLAN6'
config wifi-iface 'wifinet4'
option ssid 'DEVICE'
option device 'radio0'
option mode 'ap'
option network 'LAN'
option key '********'
option encryption 'psk2'
network:
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fdc6:87c8:9f74::/48'
config device 'lan_dev'
option name 'eth0.1'
option macaddr '78:a3:51:46:46:7e'
config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'
option metric '10'
option dns '8.8.8.8 8.8.4.4'
option peerdns '0'
config device 'wan_dev'
option name 'eth0.2'
option macaddr '78:a3:51:46:46:7f'
config interface 'wan6'
option ifname 'eth0.2'
option proto 'dhcpv6'
config switch
option name 'switch0'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'switch0'
option vlan '1'
option vid '1'
option ports '0 1 2 3 6t'
config switch_vlan
option device 'switch0'
option vlan '2'
option ports '4 6t'
option vid '2'
config interface 'wanb'
option proto '3g'
option device '/dev/ttyUSB2'
option service 'umts'
option ipv6 'auto'
option metric '20'
config interface 'wan2'
option proto 'dhcp'
option ifname 'eth0'
option metric '30'
config interface 'vpn'
option ifname 'tun0'
option proto 'none'
config switch_vlan
option device 'switch0'
option vlan '3'
option vid '3'
option ports '0t 6t'
config interface 'VLAN3'
option ifname 'eth0.3'
option proto 'static'
option ipaddr '192.168.3.1'
option netmask '255.255.255.0'
config switch_vlan
option device 'switch0'
option vlan '4'
option vid '4'
option ports '0t 6t'
config interface 'VLAN4'
option proto 'static'
option ifname 'eth0.4'
option ipaddr '192.168.4.1'
option netmask '255.255.255.0'
config switch_vlan
option device 'switch0'
option vlan '5'
option vid '5'
option ports '0t 6t'
config switch_vlan
option device 'switch0'
option vlan '6'
option vid '6'
option ports '1t 6t'
config switch_vlan
option device 'switch0'
option vlan '7'
option vid '7'
option ports '1t 6t'
config interface 'VLAN5'
option proto 'static'
option ifname 'eth0.5'
option ipaddr '192.168.5.1'
option netmask '255.255.255.0'
config interface 'VLAN6'
option proto 'static'
option ifname 'eth0.6'
option ipaddr '192.168.6.1'
option netmask '255.255.255.0'
option type 'bridge'
config interface 'VLAN7'
option proto 'static'
option ifname 'eth0.7'
option ipaddr '192.168.7.1'
option netmask '255.255.255.0'
config switch_vlan
option device 'switch0'
option vlan '8'
option vid '8'
option ports '0t 1t 3t 6t'
config interface 'VLAN8'
option proto 'static'
option ifname 'eth0.8'
option type 'bridge'
option ipaddr '192.168.8.1'
option netmask '255.255.255.0'
config interface 'LAN'
option proto 'static'
option ifname 'eth0.1'
option netmask '255.255.255.0'
option ipaddr '192.168.0.1'
option type 'bridge'