i have RTL8380M based switch
i have compiled and installed D-LINK DGS-1210-10P sysupgrade img for it.
it works normally but
when i configure this:
WAN > switch.1 default vlan
MODEM > VLAN 100 access
When i connect modem to switch WAN port switch obtained ip and default gateway correctly from modem but device itself has no internet access even i can't ping my gateway.
i can ping other computer on WAN side.
for this configuration no problem :
WAN > switch.1 default vlan
MODEM > VLAN 1
If your upstream router used the same lan subnet as your openwrt device, you must change one of them. Maybe use 192.168.3.1/24 for the openwrt lan address.
Also, it looks like you are not using proper dsa syntax, based on your description.
Please copy the output of the following commands and post it here using the "Preformatted text </> " button:
Remember to redact passwords, MAC addresses and any public IP addresses you may have:
The switch doesn’t have a meaningful WAN port (or wifi!?)!?
Are you sure you have your expectations right for a business class switch in your network rig?
Where do you have the router and network firewall?
Realtek doesn’t even have routing capabilities since those resources (like DHCP functions and dnsmasq) have been removed from the switch firmware a while back since it can’t do the job anyway.
root@OpenWrt:~# ping 192.168.80.1
PING 192.168.80.1 (192.168.80.1): 56 data bytes
BUT when i plug OpenWrt switch WAN port to aruba 2530 modem swtich's default vlan 1 port no problem exist it access internet corrrectly and pings gateway. I think Switch have trouble with access vlans except vlan 1
Here is new CORRECTED configs:
root@OpenWrt:~# cat /etc/config/network
config interface 'loopback'
option device 'lo'
option proto 'static'
option ipaddr '127.0.0.1'
option netmask '255.0.0.0'
config globals 'globals'
option ula_prefix 'fd12:cb91:d317::/48'
config device 'switch'
option name 'switch'
option type 'bridge'
option macaddr 'xx:xx:xx:xx:xx:xx'
list ports 'lan1'
list ports 'lan10'
list ports 'lan2'
list ports 'lan3'
list ports 'lan4'
list ports 'lan5'
list ports 'lan6'
list ports 'lan7'
list ports 'lan8'
list ports 'lan9'
option bridge_empty '1'
option ipv6 '0'
config device
option type '8021q'
option ifname 'switch'
option vid '1'
option name 'switch.1'
config bridge-vlan 'wan_vlan'
option device 'switch'
option vlan '1'
list ports 'lan1'
list ports 'lan2'
config interface 'wan'
option device 'switch.1'
option proto 'dhcp'
config device
option type '8021q'
option ifname 'switch'
option vid '100'
option name 'switch.100'
config device
option type '8021q'
option ifname 'switch'
option vid '200'
option name 'switch.200'
config device
option type '8021q'
option ifname 'switch'
option vid '300'
option name 'switch.300'
config interface 'LAN100'
option proto 'none'
option device 'switch.100'
config interface 'LAN200'
option proto 'none'
option device 'switch.200'
config interface 'LAN300'
option proto 'none'
option device 'switch.300'
config bridge-vlan
option device 'switch'
option vlan '100'
list ports 'lan3'
config bridge-vlan
option device 'switch'
option vlan '200'
list ports 'lan4'
config bridge-vlan
option device 'switch'
option vlan '300'
list ports 'lan5'
######################################################
root@OpenWrt:~# cat /etc/config/wireless
cat: can't open '/etc/config/wireless': No such file or directory
######################################################
root@OpenWrt:~# cat /etc/config/dhcp
cat: can't open '/etc/config/dhcp': No such file or directory
######################################################
root@OpenWrt:~# cat /etc/config/firewall
config defaults
option input 'ACCEPT'
option output 'ACCEPT'
option synflood_protect '1'
option forward 'ACCEPT'
config zone
option name 'lan'
option input 'ACCEPT'
option output 'ACCEPT'
option forward 'ACCEPT'
config zone
option name 'wan'
option output 'ACCEPT'
option masq '1'
option mtu_fix '1'
list network 'wan'
list network 'wan6'
list network 'lan'
option input 'ACCEPT'
option forward 'ACCEPT'
config forwarding
option src 'lan'
option dest 'wan'
config rule
option name 'Allow-DHCP-Renew'
option src 'wan'
option proto 'udp'
option dest_port '68'
option target 'ACCEPT'
option family 'ipv4'
config rule
option name 'Allow-Ping'
option src 'wan'
option proto 'icmp'
option icmp_type 'echo-request'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-IGMP'
option src 'wan'
option proto 'igmp'
option family 'ipv4'
option target 'ACCEPT'
config rule
option name 'Allow-DHCPv6'
option src 'wan'
option proto 'udp'
option dest_port '546'
option family 'ipv6'
option target 'ACCEPT'
config rule
option name 'Allow-MLD'
option src 'wan'
option proto 'icmp'
option src_ip 'fe80::/10'
list icmp_type '130/0'
list icmp_type '131/0'
list icmp_type '132/0'
list icmp_type '143/0'
option family 'ipv6'
option target 'ACCEPT'
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'
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'
config rule
option name 'Allow-IPSec-ESP'
option src 'wan'
option dest 'lan'
option proto 'esp'
option target 'ACCEPT'
config rule
option name 'Allow-ISAKMP'
option src 'wan'
option dest 'lan'
option dest_port '500'
option proto 'udp'
option target 'ACCEPT'
If the port on the other switch is configured as "access," that means the packets on the cable are untagged. The VLAN number on that end is not important since the VLAN tags are stripped off before the packets leave the switch. However, you need to use consistent VLAN numbers between your switches so that trunk (tagged) connections will work properly.
The CPU section in these chips is not powerful, it can only NAT/route packets at about 50 Mb, so in general you need a separate piece of hardware to do the routing, and use the switch for switching.
Thank you @mk24 . I will try to change wan side access vlan 100 to tagged vlan 100 is this true?and same tagged vlan for other switch?
and before changing above configurations i saw logs shown below from serial terminal When i made restart network settings.
[11114.011933] rtl83xx_fib4_del: no such gateway: 0.0.0.0
[11114.017721] rtl83xx_fib4_del: no such gateway: 192.168.80.1
root@OpenWrt:/# [11113.902170] rtl83xx_fib4_del: found a route with id 1, nh-id 0
[11113.908733] rtl83xx-switch switch@1b000000: unknown nexthop, id 0
[11113.951961] rtl83xx-switch switch@1b000000: unknown nexthop, id 0
[11113.958826] rtl83xx_fib4_del: found a route with id 2, nh-id 0
[11113.965532] rtl83xx-switch switch@1b000000: unknown nexthop, id 0
[11114.011933] rtl83xx_fib4_del: no such gateway: 0.0.0.0
[11114.017721] rtl83xx_fib4_del: no such gateway: 192.168.80.1
[11114.070238] Not offloading default route for now