找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 1585|回复: 0

各位大神,openwrt如何修改eth1为lan口?

[复制链接]
发表于 2020-7-5 09:27 | 显示全部楼层 |阅读模式
openwrt默认配置方案是eth0 为lan口,我想修改eth0为wan口,eth1为lan口,方便使用。

各位大神,openwrt如何修改eth1为lan口?
或者说,eth0 eth1都改成lan口
以下为源代码


  1. #!/bin/sh
  2. #
  3. # Copyright © 2017 OpenWrt.org
  4. #

  5. . /lib/functions/system.sh
  6. . /lib/functions/uci-defaults.sh

  7. board_config_update

  8. case "$(board_name)" in
  9. pc-engines-apu|pc-engines-apu2|pc-engines-apu3)
  10.         ucidef_set_interfaces_lan_wan "eth1 eth2" "eth0"
  11.         ;;
  12. traverse-technologies-geos)
  13.         ucidef_set_interface_lan "eth0 eth1"
  14.         ucidef_add_atm_bridge "0" "35" "llc" "bridged"
  15.         ucidef_set_interface_wan "nas0" "dhcp"
  16.         macaddr="$(cat /sys/class/net/eth0/address)" 2>/dev/null
  17.         [ -n "$macaddr" ] && ucidef_set_interface_macaddr "wan" "$macaddr"
  18.         ;;
  19. esac
  20. board_config_flush

  21. exit 0
复制代码



您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

关闭

欢迎大家光临恩山无线论坛上一条 /1 下一条

有疑问请添加管理员QQ86788181|手机版|小黑屋|Archiver|恩山无线论坛(常州市恩山计算机开发有限公司版权所有) ( 苏ICP备05084872号 )

GMT+8, 2024-6-1 13:06

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

| 江苏省互联网有害信息举报中心 举报信箱:js12377 | @jischina.com.cn 举报电话:025-88802724 本站不良内容举报信箱:68610888@qq.com 举报电话:0519-86695797

快速回复 返回顶部 返回列表