ac2100 multi lan
This commit is contained in:
184
01.Multi_LAN_redmi_ac2100/README.md
Normal file
184
01.Multi_LAN_redmi_ac2100/README.md
Normal file
@@ -0,0 +1,184 @@
|
||||
# 多 LAN 接口配置 - 红米 AC2100
|
||||
|
||||
## 项目简介
|
||||
|
||||
本配置用于在 OpenWrt 固件(红米 AC2100 路由器)上配置多个独立的 LAN 接口,实现网络隔离和分段管理。
|
||||
|
||||
## 功能特性
|
||||
|
||||
- **多 LAN 接口配置**:配置 5 个独立的 LAN 接口(LAN0-LAN4)
|
||||
- **DHCP 服务器**:为每个 LAN 接口配置独立的 DHCP 服务
|
||||
- **防火墙规则**:自动配置防火墙规则,支持端口转发
|
||||
- **WiFi 配置**:配置 2.4G 和 5G WiFi,分别绑定到不同的 LAN 接口
|
||||
- **PPPoE 支持**:可选的 PPPoE 拨号配置
|
||||
- **UPnP 支持**:自动配置 UPnP 服务
|
||||
- **Web 管理端口**:配置额外的 Web 管理端口(18080/18443)
|
||||
|
||||
## 网络接口配置
|
||||
|
||||
| 接口名称 | IP 地址 | 设备/网络 | 说明 |
|
||||
|---------|---------|-----------|------|
|
||||
| LAN0 | 192.168.0.1/24 | lan1 | 物理网口 1 |
|
||||
| LAN1 | 192.168.1.1/24 | lan2 | 物理网口 2 |
|
||||
| LAN2 | 192.168.2.1/24 | lan3 | 物理网口 3 |
|
||||
| LAN3 | 192.168.3.1/24 | radio0.network1 | 2.4G WiFi |
|
||||
| LAN4 | 192.168.5.1/24 | radio1.network1 | 5G WiFi |
|
||||
|
||||
## 文件说明
|
||||
|
||||
### `firstboot.sh`
|
||||
首次启动自动配置脚本,包含以下功能模块:
|
||||
|
||||
1. **网络接口配置** (`configure_network`)
|
||||
- 创建 5 个独立的 LAN 接口
|
||||
- 删除旧的 lan 接口和 br-lan 桥接设备
|
||||
- 配置 PPPoE(可选)
|
||||
|
||||
2. **DHCP 服务器配置** (`configure_dhcp`)
|
||||
- 为每个 LAN 接口配置独立的 DHCP 服务
|
||||
- IP 地址池:100-249(每个接口 150 个地址)
|
||||
- 租期:12 小时
|
||||
|
||||
3. **防火墙配置** (`configure_firewall`)
|
||||
- 将所有 LAN 接口添加到 LAN 防火墙区域
|
||||
- 添加端口转发规则(18080、18443)
|
||||
|
||||
4. **无线网络配置** (`configure_wireless`)
|
||||
- 配置 2.4G WiFi(radio0)绑定到 LAN3
|
||||
- 配置 5G WiFi(radio1)绑定到 LAN4
|
||||
- 支持自定义 SSID 和加密方式
|
||||
|
||||
5. **UPnP 配置** (`configure_upnp`)
|
||||
- 启用 UPnP 服务
|
||||
- 配置安全模式和端口
|
||||
|
||||
6. **uHTTPd 配置** (`configure_uhttpd`)
|
||||
- 添加额外的 Web 管理端口(18080、18443)
|
||||
|
||||
### `TEMP.SH`
|
||||
临时参考脚本,包含 UCI 配置命令的示例,用于参考和调试。
|
||||
|
||||
## 使用方法
|
||||
|
||||
### 1. 配置参数
|
||||
|
||||
在 `firstboot.sh` 脚本中修改以下配置变量:
|
||||
|
||||
```bash
|
||||
# WiFi 配置
|
||||
wlan_name0="OpenWrt_2.4G" # 2.4G WiFi SSID
|
||||
wlan_name1="OpenWrt_5G" # 5G WiFi SSID
|
||||
wlan_password="" # WiFi 密码(留空则不设置密码)
|
||||
wlan_encryption="sae-mixed" # WiFi 加密方式(sae-mixed, psk2, psk, none)
|
||||
|
||||
# PPPoE 配置(可选)
|
||||
pppoe_username="" # PPPoE 用户名(留空则不配置)
|
||||
pppoe_password="" # PPPoE 密码(留空则不配置)
|
||||
```
|
||||
|
||||
### 2. 部署脚本
|
||||
|
||||
将 `firstboot.sh` 脚本上传到路由器的 `/etc/` 目录,并设置执行权限:
|
||||
|
||||
```bash
|
||||
chmod +x /etc/firstboot.sh
|
||||
```
|
||||
|
||||
### 3. 执行脚本
|
||||
|
||||
在路由器上执行脚本:
|
||||
|
||||
```bash
|
||||
/etc/firstboot.sh
|
||||
```
|
||||
|
||||
或者将脚本添加到 OpenWrt 的启动脚本中,实现首次启动自动配置。
|
||||
|
||||
### 4. 查看日志
|
||||
|
||||
脚本执行日志保存在 `/root/setup.log`,可以查看配置过程:
|
||||
|
||||
```bash
|
||||
cat /root/setup.log
|
||||
```
|
||||
|
||||
## 配置说明
|
||||
|
||||
### DHCP 配置
|
||||
- 起始地址:100
|
||||
- 地址池大小:150(每个接口)
|
||||
- 租期:12 小时
|
||||
- IPv6:启用 RA 服务器
|
||||
|
||||
### 防火墙规则
|
||||
- 所有 LAN 接口默认允许互访
|
||||
- 允许从 WAN 访问端口 18080 和 18443(用于 Web 管理)
|
||||
|
||||
### WiFi 配置
|
||||
- 2.4G WiFi 默认 SSID:`OpenWrt_2.4G`
|
||||
- 5G WiFi 默认 SSID:`OpenWrt_5G`
|
||||
- 默认加密方式:`sae-mixed`(WPA3/WPA2 混合模式)
|
||||
|
||||
### Web 管理端口
|
||||
- HTTP:80(默认)、18080(额外)
|
||||
- HTTPS:443(默认)、18443(额外)
|
||||
|
||||
## 注意事项
|
||||
|
||||
1. **首次配置**:脚本会删除默认的 `lan` 接口和 `br-lan` 桥接设备,请确保在首次启动时执行。
|
||||
|
||||
2. **网络隔离**:配置后,5 个 LAN 接口处于不同的网段,默认可以互访。如需完全隔离,需要额外配置防火墙规则。
|
||||
|
||||
3. **WiFi 配置顺序**:WiFi 接口的 device 配置需要在网络接口创建之后设置,脚本已按正确顺序处理。
|
||||
|
||||
4. **PPPoE 配置**:如果不需要 PPPoE,保持 `pppoe_username` 和 `pppoe_password` 为空即可。
|
||||
|
||||
5. **日志记录**:所有配置操作都会记录到 `/root/setup.log`,便于排查问题。
|
||||
|
||||
## 故障排查
|
||||
|
||||
### 查看配置状态
|
||||
```bash
|
||||
# 查看网络接口配置
|
||||
uci show network
|
||||
|
||||
# 查看 DHCP 配置
|
||||
uci show dhcp
|
||||
|
||||
# 查看防火墙配置
|
||||
uci show firewall
|
||||
|
||||
# 查看无线配置
|
||||
uci show wireless
|
||||
```
|
||||
|
||||
### 查看日志
|
||||
```bash
|
||||
cat /root/setup.log
|
||||
```
|
||||
|
||||
### 重置配置
|
||||
如果需要重置配置,可以删除相关配置并重新执行脚本:
|
||||
|
||||
```bash
|
||||
# 删除网络配置(谨慎操作)
|
||||
uci delete network.LAN0
|
||||
uci delete network.LAN1
|
||||
uci delete network.LAN2
|
||||
uci delete network.LAN3
|
||||
uci delete network.LAN4
|
||||
uci commit network
|
||||
/etc/init.d/network restart
|
||||
```
|
||||
|
||||
## 适用设备
|
||||
|
||||
- **路由器型号**:红米 AC2100 (Redmi AC2100)
|
||||
- **固件要求**:OpenWrt(版本建议 21.02 或更高)
|
||||
|
||||
## 更新日志
|
||||
|
||||
- 初始版本:支持 5 个独立 LAN 接口配置
|
||||
- 支持 WiFi 接口绑定到不同 LAN
|
||||
- 支持 PPPoE 拨号配置
|
||||
- 支持 UPnP 和额外 Web 管理端口
|
||||
322
01.Multi_LAN_redmi_ac2100/firstboot.sh
Normal file
322
01.Multi_LAN_redmi_ac2100/firstboot.sh
Normal file
@@ -0,0 +1,322 @@
|
||||
# luci-i18n-base-zh-cn luci-i18n-upnp-zh-cn luci-i18n-uhttpd-zh-cn luci-i18n-firewall-zh-cn luci-i18n-package-manager-zh-cn
|
||||
|
||||
#!/bin/sh
|
||||
# 多 LAN 接口配置脚本
|
||||
# 配置 5 个独立的 LAN 接口(LAN0-LAN4)
|
||||
# LAN0: 192.168.0.1/24 (lan1)
|
||||
# LAN1: 192.168.1.1/24 (lan2)
|
||||
# LAN2: 192.168.2.1/24 (lan3)
|
||||
# LAN3: 192.168.3.1/24 (radio0.network1 - WiFi 2.4G)
|
||||
# LAN4: 192.168.5.1/24 (radio1.network1 - WiFi 5G)
|
||||
# 注意:删除旧的 lan 接口和 br-lan 桥接设备
|
||||
|
||||
# 日志配置
|
||||
LOG_FILE="/root/setup.log"
|
||||
|
||||
# 日志函数:写入日志文件
|
||||
log() {
|
||||
local timestamp=$(date '+%Y-%m-%d %H:%M:%S' 2>/dev/null || date)
|
||||
echo "[$timestamp] $1" >>"$LOG_FILE" 2>&1
|
||||
}
|
||||
|
||||
uci_cmd() {
|
||||
if ! command -v uci >/dev/null 2>&1; then
|
||||
log "uci command not found"
|
||||
return 1
|
||||
fi
|
||||
if ! uci "$@" 2>/dev/null; then
|
||||
log "uci command failed: uci $*"
|
||||
return 1
|
||||
fi
|
||||
return 0
|
||||
}
|
||||
|
||||
# 重定向所有输出到日志文件
|
||||
exec >>"$LOG_FILE" 2>&1
|
||||
|
||||
# WiFi 配置变量
|
||||
wlan_name0="WZWY_2.4G" # 2.4G WiFi SSID
|
||||
wlan_name1="WZWY_5G" # 5G WiFi SSID
|
||||
wlan_password="" # WiFi 密码(留空则不设置密码)
|
||||
wlan_encryption="sae-mixed" # WiFi 加密方式(sae-mixed, psk2, psk, none)
|
||||
|
||||
# PPPoE 配置变量
|
||||
pppoe_username="" # PPPoE 用户名(留空则不配置)
|
||||
pppoe_password="" # PPPoE 密码(留空则不配置)
|
||||
|
||||
# LAN 接口配置数组
|
||||
# 格式: "接口名称:IP地址:设备名称"
|
||||
LAN_CONFIGS="
|
||||
LAN0:192.168.0.1:lan1
|
||||
LAN1:192.168.1.1:lan2
|
||||
LAN2:192.168.2.1:lan3
|
||||
LAN3:192.168.3.1:radio0.network1
|
||||
LAN4:192.168.5.1:radio1.network1
|
||||
"
|
||||
|
||||
# 配置单个网络接口
|
||||
# 参数: 接口名称, IP地址, 设备名称
|
||||
configure_lan_interface() {
|
||||
local ifname="$1"
|
||||
local ipaddr="$2"
|
||||
local device="$3"
|
||||
|
||||
uci_cmd set "network.$ifname=interface"
|
||||
uci_cmd set "network.$ifname.proto=static"
|
||||
uci_cmd set "network.$ifname.device=$device"
|
||||
uci_cmd set "network.$ifname.ipaddr=$ipaddr"
|
||||
uci_cmd set "network.$ifname.netmask=255.255.255.0"
|
||||
uci_cmd set "network.$ifname.ip6assign=62"
|
||||
}
|
||||
|
||||
# 配置网络接口
|
||||
configure_network() {
|
||||
log "Configuring network interfaces..."
|
||||
|
||||
# 先创建物理接口 LAN0-LAN2(带 device)
|
||||
echo "$LAN_CONFIGS" | while IFS= read -r config; do
|
||||
[ -z "$config" ] && continue
|
||||
local ifname=$(echo "$config" | cut -d: -f1)
|
||||
local ipaddr=$(echo "$config" | cut -d: -f2)
|
||||
local device=$(echo "$config" | cut -d: -f3)
|
||||
# 物理接口(lan1/lan2/lan3)直接设置 device
|
||||
case "$device" in
|
||||
lan1|lan2|lan3)
|
||||
configure_lan_interface "$ifname" "$ipaddr" "$device"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# 然后删除旧的配置
|
||||
uci_cmd del network.lan
|
||||
uci_cmd delete network.@device[0]
|
||||
|
||||
# 创建 WiFi 接口 LAN3-LAN4(先不设置 device,按照 TEMP.SH 的顺序)
|
||||
echo "$LAN_CONFIGS" | while IFS= read -r config; do
|
||||
[ -z "$config" ] && continue
|
||||
local ifname=$(echo "$config" | cut -d: -f1)
|
||||
local ipaddr=$(echo "$config" | cut -d: -f2)
|
||||
local device=$(echo "$config" | cut -d: -f3)
|
||||
# WiFi 接口先创建,device 后设置
|
||||
case "$device" in
|
||||
radio0.network1|radio1.network1)
|
||||
uci_cmd set "network.$ifname=interface"
|
||||
uci_cmd set "network.$ifname.proto=static"
|
||||
uci_cmd set "network.$ifname.ipaddr=$ipaddr"
|
||||
uci_cmd set "network.$ifname.netmask=255.255.255.0"
|
||||
uci_cmd set "network.$ifname.ip6assign=62"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# 设置 WiFi 接口的 device(按照 TEMP.SH 的顺序:后设置)
|
||||
echo "$LAN_CONFIGS" | while IFS= read -r config; do
|
||||
[ -z "$config" ] && continue
|
||||
local ifname=$(echo "$config" | cut -d: -f1)
|
||||
local device=$(echo "$config" | cut -d: -f3)
|
||||
case "$device" in
|
||||
radio0.network1|radio1.network1)
|
||||
uci_cmd set "network.$ifname.device=$device"
|
||||
;;
|
||||
esac
|
||||
done
|
||||
|
||||
# 删除 ULA 前缀
|
||||
uci_cmd del network.globals.ula_prefix
|
||||
|
||||
# 配置 PPPoE(如果提供了用户名和密码)
|
||||
if [ -n "$pppoe_username" ] && [ -n "$pppoe_password" ]; then
|
||||
uci_cmd set network.wan.proto='pppoe'
|
||||
uci_cmd set network.wan.username="$pppoe_username"
|
||||
uci_cmd set network.wan.password="$pppoe_password"
|
||||
log "PPPoE configured: username=$pppoe_username"
|
||||
else
|
||||
log "PPPoE not configured (username or password not set)"
|
||||
fi
|
||||
|
||||
uci_cmd commit network
|
||||
log "Network interfaces configured"
|
||||
}
|
||||
|
||||
# 配置单个 DHCP 服务器
|
||||
# 参数: 接口名称
|
||||
configure_lan_dhcp() {
|
||||
local ifname="$1"
|
||||
|
||||
uci_cmd set "dhcp.$ifname=dhcp"
|
||||
uci_cmd set "dhcp.$ifname.interface=$ifname"
|
||||
uci_cmd set "dhcp.$ifname.start=100"
|
||||
uci_cmd set "dhcp.$ifname.limit=150"
|
||||
uci_cmd set "dhcp.$ifname.leasetime=12h"
|
||||
uci_cmd set "dhcp.$ifname.ra=server"
|
||||
}
|
||||
|
||||
# 配置 DHCP 服务器
|
||||
configure_dhcp() {
|
||||
log "Configuring DHCP servers..."
|
||||
|
||||
# 先创建新的 DHCP 配置(按照 TEMP.SH 的顺序:先创建后删除)
|
||||
echo "$LAN_CONFIGS" | while IFS= read -r config; do
|
||||
[ -z "$config" ] && continue
|
||||
local ifname=$(echo "$config" | cut -d: -f1)
|
||||
configure_lan_dhcp "$ifname"
|
||||
done
|
||||
|
||||
# 然后删除旧的 lan DHCP
|
||||
uci_cmd del dhcp.lan
|
||||
|
||||
uci_cmd commit dhcp
|
||||
log "DHCP servers configured"
|
||||
}
|
||||
|
||||
# 配置防火墙
|
||||
configure_firewall() {
|
||||
log "Configuring firewall..."
|
||||
|
||||
# 查找 LAN 区域配置
|
||||
local lan_zone=""
|
||||
|
||||
# 先尝试通过名称查找
|
||||
local idx=0
|
||||
while uci -q get firewall.@zone[$idx] >/dev/null 2>&1; do
|
||||
local zone_name=$(uci -q get firewall.@zone[$idx].name 2>/dev/null)
|
||||
if [ "$zone_name" = "lan" ]; then
|
||||
lan_zone="@zone[$idx]"
|
||||
break
|
||||
fi
|
||||
idx=$((idx + 1))
|
||||
done
|
||||
|
||||
# 配置 LAN 区域网络列表
|
||||
if [ -n "$lan_zone" ]; then
|
||||
uci_cmd del "firewall.$lan_zone.network"
|
||||
echo "$LAN_CONFIGS" | while IFS= read -r config; do
|
||||
[ -z "$config" ] && continue
|
||||
local ifname=$(echo "$config" | cut -d: -f1)
|
||||
uci_cmd add_list "firewall.$lan_zone.network=$ifname"
|
||||
done
|
||||
log "LAN zone configured: firewall.$lan_zone"
|
||||
else
|
||||
log "Warning: LAN zone not found, skipping firewall LAN configuration"
|
||||
fi
|
||||
|
||||
# 添加防火墙规则:允许 18080 和 18443 端口
|
||||
if uci_cmd add firewall rule >/dev/null 2>&1; then
|
||||
uci_cmd set firewall.@rule[-1].name='Allow_Ports_18080_18443'
|
||||
uci_cmd set firewall.@rule[-1].src='wan'
|
||||
uci_cmd set firewall.@rule[-1].proto='tcp'
|
||||
uci_cmd set firewall.@rule[-1].dest_port='18080 18443'
|
||||
uci_cmd set firewall.@rule[-1].target='ACCEPT'
|
||||
log "Firewall rule added for ports 18080, 18443"
|
||||
fi
|
||||
|
||||
uci_cmd commit firewall
|
||||
log "Firewall configured"
|
||||
}
|
||||
|
||||
# 配置无线网络
|
||||
configure_wireless() {
|
||||
log "Configuring wireless networks..."
|
||||
|
||||
# 从配置中获取 radio0 和 radio1 对应的接口名称
|
||||
local radio0_ifname=$(echo "$LAN_CONFIGS" | grep "radio0.network1" | cut -d: -f1)
|
||||
local radio1_ifname=$(echo "$LAN_CONFIGS" | grep "radio1.network1" | cut -d: -f1)
|
||||
|
||||
# 配置 radio0 (2.4G)
|
||||
if [ -n "$radio0_ifname" ]; then
|
||||
uci_cmd set wireless.@wifi-device[0].disabled='0'
|
||||
uci_cmd set wireless.@wifi-device[0].channel='auto'
|
||||
uci_cmd set wireless.@wifi-iface[0].disabled='0'
|
||||
uci_cmd del wireless.default_radio0.network
|
||||
uci_cmd set wireless.default_radio0.network="$radio0_ifname"
|
||||
|
||||
# 配置 SSID 和加密
|
||||
if [ -n "$wlan_name0" ]; then
|
||||
uci_cmd set wireless.@wifi-iface[0].ssid="$wlan_name0"
|
||||
fi
|
||||
if [ -n "$wlan_encryption" ]; then
|
||||
uci_cmd set wireless.@wifi-iface[0].encryption="$wlan_encryption"
|
||||
fi
|
||||
if [ -n "$wlan_password" ] && [ "$wlan_encryption" != "none" ]; then
|
||||
uci_cmd set wireless.@wifi-iface[0].key="$wlan_password"
|
||||
fi
|
||||
|
||||
log "radio0 configured: SSID=$wlan_name0, network=$radio0_ifname"
|
||||
fi
|
||||
|
||||
# 配置 radio1 (5G)
|
||||
if [ -n "$radio1_ifname" ]; then
|
||||
uci_cmd set wireless.@wifi-device[1].disabled='0'
|
||||
uci_cmd set wireless.@wifi-device[1].channel='auto'
|
||||
uci_cmd set wireless.@wifi-iface[1].disabled='0'
|
||||
uci_cmd del wireless.default_radio1.network
|
||||
uci_cmd set wireless.default_radio1.network="$radio1_ifname"
|
||||
|
||||
# 配置 SSID 和加密
|
||||
if [ -n "$wlan_name1" ]; then
|
||||
uci_cmd set wireless.@wifi-iface[1].ssid="$wlan_name1"
|
||||
fi
|
||||
if [ -n "$wlan_encryption" ]; then
|
||||
uci_cmd set wireless.@wifi-iface[1].encryption="$wlan_encryption"
|
||||
fi
|
||||
if [ -n "$wlan_password" ] && [ "$wlan_encryption" != "none" ]; then
|
||||
uci_cmd set wireless.@wifi-iface[1].key="$wlan_password"
|
||||
fi
|
||||
|
||||
log "radio1 configured: SSID=$wlan_name1, network=$radio1_ifname"
|
||||
fi
|
||||
|
||||
uci_cmd commit wireless
|
||||
log "Wireless networks configured"
|
||||
}
|
||||
|
||||
# 配置 UPnP
|
||||
configure_upnp() {
|
||||
log "Configuring UPnP..."
|
||||
|
||||
uci_cmd set upnpd.config.enabled='1'
|
||||
uci_cmd set upnpd.config.interface='lan'
|
||||
uci_cmd set upnpd.config.port='5000'
|
||||
uci_cmd set upnpd.config.secure_mode='1'
|
||||
uci_cmd set upnpd.config.enable_natpmp='1'
|
||||
uci_cmd set upnpd.config.log_output='1'
|
||||
uci_cmd set upnpd.config.enable_upnp='1'
|
||||
|
||||
uci_cmd commit upnpd
|
||||
log "UPnP configured and enabled"
|
||||
}
|
||||
|
||||
# 配置 uHTTPd 端口
|
||||
configure_uhttpd() {
|
||||
log "Configuring uHTTPd ports..."
|
||||
|
||||
# 添加 18080 和 18443 端口监听
|
||||
uci_cmd add_list uhttpd.main.listen_http='0.0.0.0:18080'
|
||||
uci_cmd add_list uhttpd.main.listen_http='[::]:18080'
|
||||
uci_cmd add_list uhttpd.main.listen_https='0.0.0.0:18443'
|
||||
uci_cmd add_list uhttpd.main.listen_https='[::]:18443'
|
||||
|
||||
uci_cmd commit uhttpd
|
||||
log "uHTTPd ports 18080 and 18443 configured"
|
||||
}
|
||||
|
||||
# 主函数
|
||||
main() {
|
||||
log "=== Script started ==="
|
||||
log "1/6: Configuring network interfaces..."
|
||||
configure_network
|
||||
log "2/6: Configuring DHCP servers..."
|
||||
configure_dhcp
|
||||
log "3/6: Configuring firewall..."
|
||||
configure_firewall
|
||||
log "4/6: Configuring wireless networks..."
|
||||
configure_wireless
|
||||
log "5/6: Configuring UPnP..."
|
||||
configure_upnp
|
||||
log "6/6: Configuring uHTTPd ports..."
|
||||
configure_uhttpd
|
||||
log "=== Script completed successfully ==="
|
||||
}
|
||||
|
||||
# 执行主函数
|
||||
main
|
||||
74
README.md
Normal file
74
README.md
Normal file
@@ -0,0 +1,74 @@
|
||||
# Build-OpenWrt
|
||||
|
||||
## 项目简介
|
||||
|
||||
本项目包含多个 OpenWrt 固件配置方案,适用于不同型号的路由器设备。每个配置方案都针对特定的硬件和网络需求进行了优化。
|
||||
|
||||
## 配置版本列表
|
||||
|
||||
### [01. 多 LAN 接口配置 - 红米 AC2100](./01.Multi_LAN_redmi_ac2100/README.md)
|
||||
|
||||
**设备型号**:红米 AC2100 (Redmi AC2100)
|
||||
**主要功能**:
|
||||
- 配置 5 个独立的 LAN 接口(LAN0-LAN4)
|
||||
- 支持多网段网络隔离
|
||||
- WiFi 接口独立绑定到不同 LAN
|
||||
- 支持 PPPoE 拨号
|
||||
- 自动配置 DHCP、防火墙、UPnP 等
|
||||
|
||||
**快速链接**:[查看详细说明](./01.Multi_LAN_redmi_ac2100/README.md)
|
||||
|
||||
---
|
||||
|
||||
## 项目结构
|
||||
|
||||
```
|
||||
Build-OpenWrt/
|
||||
├── README.md # 本文件(项目目录索引)
|
||||
├── 01.Multi_LAN_redmi_ac2100/ # 多 LAN 接口配置方案
|
||||
│ ├── README.md # 详细配置说明
|
||||
│ ├── firstboot.sh # 首次启动配置脚本
|
||||
│ └── TEMP.SH # 临时参考脚本
|
||||
└── [更多配置版本...] # 未来添加的配置方案
|
||||
```
|
||||
|
||||
## 使用指南
|
||||
|
||||
1. **选择配置版本**:根据您的路由器型号和需求,从上方列表中选择合适的配置版本
|
||||
2. **查看详细说明**:点击对应版本的链接,查看详细的使用说明和配置步骤
|
||||
3. **下载脚本文件**:从对应版本的目录中下载所需的脚本文件
|
||||
4. **按照说明操作**:按照详细说明文档中的步骤进行配置
|
||||
|
||||
## 通用要求
|
||||
|
||||
- **固件要求**:OpenWrt(建议版本 21.02 或更高)
|
||||
- **访问方式**:SSH 或串口访问路由器
|
||||
- **权限要求**:root 权限
|
||||
|
||||
## 注意事项
|
||||
|
||||
⚠️ **重要提示**:
|
||||
- 配置脚本会修改路由器的网络设置,请确保在测试环境中先行验证
|
||||
- 建议在执行配置前备份路由器的原始配置
|
||||
- 部分配置可能需要重启路由器才能生效
|
||||
- 请仔细阅读每个配置版本的详细说明文档
|
||||
|
||||
## 贡献
|
||||
|
||||
欢迎提交新的配置方案或改进现有配置。请按照以下结构组织新的配置版本:
|
||||
|
||||
```
|
||||
XX.配置名称_设备型号/
|
||||
├── README.md # 详细配置说明
|
||||
├── [脚本文件...] # 相关脚本文件
|
||||
└── [其他文件...] # 其他相关文件
|
||||
```
|
||||
|
||||
## 许可证
|
||||
|
||||
本项目仅供学习和研究使用。
|
||||
|
||||
## 更新日志
|
||||
|
||||
### 2024
|
||||
- 初始版本:添加多 LAN 接口配置方案(红米 AC2100)
|
||||
Reference in New Issue
Block a user