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

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

bash 复制代码
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'

接口详情

bash 复制代码
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:~# 
相关推荐
24zhgjx-lxq12 小时前
OSPF的网络类型:P2P与Broadcast
网络·智能路由器·p2p·broadcast·ensp
算法即正义12 小时前
知识竞赛系统网络架构设计:高并发、高可用与安全实践
网络·安全
vortex512 小时前
【红队】企业内部安全区域划分与攻防思路解析
网络·安全·网络安全·渗透测试
墨染倾城殇12 小时前
FSC-BW5028MV适配车载多场景方案:WiFi7+蓝牙5.4 让音频与数据并发稳定输出
网络·音视频·wifi 7·蓝牙5.4·车载蓝牙模块
9523612 小时前
网络原理TCP/UDP
网络
@insist12312 小时前
网络工程师-因特网与网络互联(五):应用层协议与互联网新技术
网络·网络工程师·软考·软件水平考试
为何创造硅基生物2 天前
ESP32S3的RGB屏幕漂移问题
网络
好运的阿财2 天前
process 工具与子agent管理机制详解
网络·人工智能·python·程序人生·ai编程
周杰伦fans2 天前
C# required 关键字详解
开发语言·网络·c#
洛水水2 天前
深入理解网络编程核心:Reactor、IOCP 与异步 IO 模型详解
网络·iocp