Temat: Nie działają VLAN-y
Problemem jest brak komunikacji dla sieci wewnątrz VLAN-ów. Wysyłam pingi - one nie docierają. Na debianie tcpdmp nie widzi aby na interfejs eth1 docierały tagowane ramki podczas gdy na openwrt puszczony jest ping.
Debian:
dmesg | grep eth
[ 1.176576] r8169 0000:01:00.0: eth0: RTL8102e at 0xffffc90000330000, 00:27:0e:05:a2:88, XID 04e00000 IRQ 44
[ 1.281993] eth1: VIA Networking Velocity Family Gigabit Ethernet Adapter
[ 1.282006] eth1: Ethernet Address: 00:0f:38:02:26:d5
[ 9.060435] 8021q: adding VLAN 0 to HW filter on device eth1
[ 12.209427] eth1: Link auto-negotiation speed 1000M bps full duplexlsmod | grep 802
8021q 19291 0
garp 13193 1 8021q ifconfig
eth1 Link encap:Ethernet HWaddr 00:0f:38:02:26:d5
inet addr:10.1.1.111 Bcast:10.1.1.127 Mask:255.255.255.224
inet6 addr: fe80::20f:38ff:fe02:26d5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1100 errors:0 dropped:0 overruns:0 frame:0
TX packets:569 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:731776 (714.6 KiB) TX bytes:48635 (47.4 KiB)
Interrupt:21 Base address:0x1000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:185 errors:0 dropped:0 overruns:0 frame:0
TX packets:185 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:20096 (19.6 KiB) TX bytes:20096 (19.6 KiB)
vlan10 Link encap:Ethernet HWaddr 00:0f:38:02:26:d5
inet addr:10.3.1.1 Bcast:10.3.1.255 Mask:255.255.255.0
inet6 addr: fe80::20f:38ff:fe02:26d5/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:209 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:14573 (14.2 KiB)cat /etc/network/interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
# The loopback network interface
auto lo
iface lo inet loopback
# The primary network interface
allow-hotplug eth1
iface eth1 inet dhcp
auto vlan10
iface vlan10 inet static
address 10.3.1.1
netmask 255.255.255.0
vlan-raw-device eth1Openwrt 1043nd
cat /etc/config/network
config interface 'loopback'
option ifname 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config interface 'lan'
option ifname 'eth0.1'
option type 'bridge'
option proto 'static'
option ipaddr '10.1.1.120'
option netmask '255.255.255.224'
config interface 'wan'
option ifname 'eth0.2'
option proto 'dhcp'
config switch
option name 'rtl8366rb'
option reset '1'
option enable_vlan '1'
config switch_vlan
option device 'rtl8366rb'
option vlan '1'
option ports '1 2 3 4 5t'
config switch_vlan
option device 'rtl8366rb'
option vlan '2'
option ports '0 5t'
config switch_vlan
option device 'rtl8366rb'
option vlan '10'
option ports '1t 5t'
config interface 'vlan10'
option ifname 'eth0.10'
option type 'bridge'
option proto 'static'
option ipaddr '10.3.1.2'
option netmask '255.255.255.0' ifconfig
br-lan Link encap:Ethernet HWaddr 00:27:19:FC:8D:9E
inet addr:10.1.1.120 Bcast:10.1.1.127 Mask:255.255.255.224
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:687 errors:0 dropped:316 overruns:0 frame:0
TX packets:218 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:108451 (105.9 KiB) TX bytes:25248 (24.6 KiB)
br-vlan10 Link encap:Ethernet HWaddr 00:27:19:FC:8D:9E
inet addr:10.3.1.2 Bcast:10.3.1.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:795 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:33390 (32.6 KiB)
eth0 Link encap:Ethernet HWaddr 00:27:19:FC:8D:9E
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:927 errors:0 dropped:11 overruns:59349 frame:0
TX packets:1343 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:216006 (210.9 KiB) TX bytes:190529 (186.0 KiB)
Interrupt:4
eth0.1 Link encap:Ethernet HWaddr 00:27:19:FC:8D:9E
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:894 errors:0 dropped:0 overruns:0 frame:0
TX packets:220 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:191359 (186.8 KiB) TX bytes:25340 (24.7 KiB)
eth0.10 Link encap:Ethernet HWaddr 00:27:19:FC:8D:9E
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:804 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:33804 (33.0 KiB)
eth0.2 Link encap:Ethernet HWaddr 00:27:19:FC:8D:9E
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:318 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:0 (0.0 B) TX bytes:124974 (122.0 KiB)
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:8468 errors:0 dropped:0 overruns:0 frame:0
TX packets:8468 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:558160 (545.0 KiB) TX bytes:558160 (545.0 KiB)swconfig dev rtl8366rb vlan 10 show
VLAN 10:
info: VLAN 10: Ports: '1t5t', members=0022, untag=0000, fid=0
fid: 0
ports: 1t 5tcat /etc/config/firewall
config defaults
option syn_flood 1
option input ACCEPT
option output ACCEPT
option forward REJECT
# Uncomment this line to disable ipv6 rules
# option disable_ipv6 1
config zone
option name lan
option network 'lan'
option input ACCEPT
option output ACCEPT
option forward REJECT
config zone
option name wan
option network 'wan'
option input REJECT
option output ACCEPT
option forward REJECT
option masq 1
option mtu_fix 1
config zone
option name vlan10
option network vlan10
option input ACCEPT
option output ACCEPT
option forward REJECT
config forwarding
option src lan
option dest wan
# We need to accept udp packets on port 68,
# see [url]https://dev.openwrt.org/ticket/4108[/url]
config rule
option name Allow-DHCP-Renew
option src wan
option proto udp
option dest_port 68
option target ACCEPT
option family ipv4
# Allow IPv4 ping
config rule
option name Allow-Ping
option src wan
option proto icmp
option icmp_type echo-request
option family ipv4
option target ACCEPT
# Allow DHCPv6 replies
# see [url]https://dev.openwrt.org/ticket/10381[/url]
config rule
option name Allow-DHCPv6
option src wan
option proto udp
option src_ip fe80::/10
option src_port 547
option dest_ip fe80::/10
option dest_port 546
option family ipv6
option target ACCEPT
# Allow essential incoming IPv6 ICMP traffic
config rule
option name Allow-ICMPv6-Input
option src wan
option proto icmp
list icmp_type echo-request
list icmp_type echo-reply
list icmp_type destination-unreachable
list icmp_type packet-too-big
list icmp_type time-exceeded
list icmp_type bad-header
list icmp_type unknown-header-type
list icmp_type router-solicitation
list icmp_type neighbour-solicitation
list icmp_type router-advertisement
list icmp_type neighbour-advertisement
option limit 1000/sec
option family ipv6
option target ACCEPT
# Allow essential forwarded IPv6 ICMP traffic
config rule
option name Allow-ICMPv6-Forward
option src wan
option dest *
option proto icmp
list icmp_type echo-request
list icmp_type echo-reply
list icmp_type destination-unreachable
list icmp_type packet-too-big
list icmp_type time-exceeded
list icmp_type bad-header
list icmp_type unknown-header-type
option limit 1000/sec
option family ipv6
option target ACCEPT
# include a file with users custom iptables rules
config include
option path /etc/firewall.user
### EXAMPLE CONFIG SECTIONS
# do not allow a specific ip to access wan
#config rule
# option src lan
# option src_ip 192.168.45.2
# option dest wan
# option proto tcp
# option target REJECT
# block a specific mac on wan
#config rule
# option dest wan
# option src_mac 00:11:22:33:44:66
# option target REJECT
# block incoming ICMP traffic on a zone
#config rule
# option src lan
# option proto ICMP
# option target DROP
# port redirect port coming in on wan to lan
#config redirect
# option src wan
# option src_dport 80
# option dest lan
# option dest_ip 192.168.16.235
# option dest_port 80
# option proto tcp
# port redirect of remapped ssh port (22001) on wan
#config redirect
# option src wan
# option src_dport 22001
# option dest lan
# option dest_port 22
# option proto tcp
# allow IPsec/ESP and ISAKMP passthrough
#config rule
# option src wan
# option dest lan
# option protocol esp
# option target ACCEPT
#config rule
# option src wan
# option dest lan
# option src_port 500
# option dest_port 500
# option proto udp
# option target ACCEPT
### FULL CONFIG SECTIONS
#config rule
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 80
# option dest wan
# option dest_ip 194.25.2.129
# option dest_port 120
# option proto tcp
# option target REJECT
#config redirect
# option src lan
# option src_ip 192.168.45.2
# option src_mac 00:11:22:33:44:55
# option src_port 1024
# option src_dport 80
# option dest_ip 194.25.2.129
# option dest_port 120
# option proto tcp
config rule
option src wan
option target ACCEPT
option proto tcp
option dest_port 22
config rule
option src wan
option target ACCEPT
option proto tcp
option dest_port 23
config rule
option src wan
option target ACCEPT
option proto tcp
option dest_port 80