openwrt中br-lan,eth0,eth0.1,eth0.2

发布于:2025-07-31 ⋅ 阅读:(18) ⋅ 点赞:(0)

CPU是QCA9558 有两个以太网接口 这个好像没有外接交换机直接印出来的
在这里插入图片描述

openwrt中br-lan,eth0,eth0.1,eth0.2

https://blog.csdn.net/f2157120/article/details/119460852

这个哥用的是 链接: DomyWifi DW33D 路由器

CPU是QCA9558 有两个以太网接口
因为CPU没集成千兆交换,所以需要有独立的千兆交换机芯片,型号是QCA8337。

在这里插入图片描述
eth1 是接上了交换机芯片
eth0 是接上了WAN

同时这个划分了VLAN WAN属于eth0.2
同时这个划分了VLAN LAN属于eth1.1

root@OpenWrt:~# 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 globals 'globals'
	option ula_prefix 'fdfd:dcb6:dfdc::/48'

config interface 'lan'
	option type 'bridge'
	option ifname 'eth1.1'
	option proto 'static'
	option netmask '255.255.255.0'
	option ip6assign '60'
	option ipaddr '192.168.11.1'

config interface 'wan'
	option ifname 'eth0.2'
	option proto 'dhcp'

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 ports '2 3 4 5 6t'  ## 感觉这个顺序有点问题

config switch_vlan
	option device 'switch0'
	option vlan '2'
	option ports '1 0t'  ## 感觉这个顺序有点问题

root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# cat /etc/config/wireless 

config wifi-device 'radio0'
	option type 'mac80211'
	option channel '36'
	option hwmode '11a'
	option path 'pci0000:00/0000:00:00.0'
	option htmode 'VHT80'
	option country 'US'
	option legacy_rates '1'

config wifi-iface 'default_radio0'
	option device 'radio0'
	option network 'lan'
	option mode 'ap'
	option ssid 'DW33D-5G'
	option encryption 'psk2'
	option key 'lsgxwifilink'

config wifi-device 'radio1'
	option type 'mac80211'
	option channel '11'
	option hwmode '11g'
	option path 'platform/qca955x_wmac'
	option htmode 'HT20'
	option country 'US'
	option legacy_rates '1'

config wifi-iface 'default_radio1'
	option device 'radio1'
	option network 'lan'
	option mode 'ap'
	option ssid 'DW33D-24G'
	option encryption 'psk2'
	option key 'lsgxwifilink'

接口详情

root@OpenWrt:~# ifconfig 
br-lan    Link encap:Ethernet  HWaddr 14:3D:F2:CB:9A:DD  
          inet addr:192.168.11.1  Bcast:192.168.11.255  Mask:255.255.255.0
          inet6 addr: fe80::163d:f2ff:fecb:9add/64 Scope:Link
          inet6 addr: fdfd:dcb6:dfdc::1/60 Scope:Global
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:3790087 errors:0 dropped:0 overruns:0 frame:0
          TX packets:6492932 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1301078776 (1.2 GiB)  TX bytes:6703438607 (6.2 GiB)

eth0      Link encap:Ethernet  HWaddr 14:3D:F2:CB:9A:DE  
          inet6 addr: fe80::163d:f2ff:fecb:9ade/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7156095 errors:0 dropped:0 overruns:75 frame:0
          TX packets:4787213 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:2503390857 (2.3 GiB)  TX bytes:1442610380 (1.3 GiB)
          Interrupt:4 

eth0.2    Link encap:Ethernet  HWaddr 14:3D:F2:CB:9A:DE  
          inet addr:192.168.1.7  Bcast:192.168.1.255  Mask:255.255.255.0
          inet6 addr: fe80::163d:f2ff:fecb:9ade/64 Scope:Link
          inet6 addr: fe80::163d:f2ff:fecb:9ade/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:7156071 errors:0 dropped:0 overruns:0 frame:0
          TX packets:4787198 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:6669546570 (6.2 GiB)  TX bytes:1423460094 (1.3 GiB)

eth1      Link encap:Ethernet  HWaddr 14:3D:F2:CB:9A:DD  
          inet6 addr: fe80::163d:f2ff:fecb:9add/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34693 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:3854512 (3.6 MiB)
          Interrupt:5 

eth1.1    Link encap:Ethernet  HWaddr 14:3D:F2:CB:9A:DD  
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34685 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:3714764 (3.5 MiB)

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:65536  Metric:1
          RX packets:2466 errors:0 dropped:0 overruns:0 frame:0
          TX packets:2466 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1 
          RX bytes:196065 (191.4 KiB)  TX bytes:196065 (191.4 KiB)

wlan0     Link encap:Ethernet  HWaddr 14:3D:F2:CB:9A:DF  
          inet6 addr: fe80::163d:f2ff:fecb:9adf/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:4411547 errors:0 dropped:33393 overruns:0 frame:0
          TX packets:6527097 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:1391076302 (1.2 GiB)  TX bytes:6837481031 (6.3 GiB)

wlan1     Link encap:Ethernet  HWaddr 14:3D:F2:CB:9A:DC  
          inet6 addr: fe80::163d:f2ff:fecb:9adc/64 Scope:Link
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:34682 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 txqueuelen:1000 
          RX bytes:0 (0.0 B)  TX bytes:4338526 (4.1 MiB)

root@OpenWrt:~# 
root@OpenWrt:~# 
root@OpenWrt:~# brctl show
bridge name	bridge id		STP enabled	interfaces
br-lan		7fff.143df2cb9add	no		eth1.1
							wlan0
							wlan1
root@OpenWrt:~# 

网站公告

今日签到

点亮在社区的每一天
去签到