找回密码
 立即注册

QQ登录

只需一步,快速开始

搜索
广告投放联系QQ68610888
查看: 1853|回复: 4

[N1盒子] N1盒子docker版openwrt,宿主机无法上网,求一个完整的可上网的interfaces文件

[复制链接]
发表于 2020-8-5 15:23 | 显示全部楼层 |阅读模式
照着这个改了半天,还是无法上网:

永久方案,修改interfaces文件:(谨慎操作,可能导致armbian永远无网络)
auto eth0
iface eth0 inet manual

auto macvlan
iface macvlan inet static
  address 192.168.123.2
  netmask 255.255.255.0
  gateway 192.168.123.6
  dns-nameservers 192.168.123.6
  pre-up ip link add macvlan link eth0 type macvlan mode bridge
  post-down ip link del macvlan link eth0 type macvlan mode bridge

其中192.168.123.0为网段,192.168.123.2为armbian地址,192.168.123.6为docker op地址

这是我修改后的,无法上网的 ,各位大佬来指点一下,是哪里不对,先谢谢了
  1. source /etc/network/interfaces.d/*

  2. # Wired adapter #1
  3. allow-hotplug eth0
  4. no-auto-down eth0
  5. #iface eth0 inet dhcp
  6. iface eth0 inet static
  7. #address 192.168.1.100
  8. #netmask 255.255.255.0
  9. #gateway 192.168.1.1
  10. #dns-nameservers 192.168.1.1
  11. #        hwaddress ether # if you want to set MAC manually
  12. #        pre-up /sbin/ifconfig eth0 mtu 3838 # setting MTU for DHCP, static just: mtu 3838


  13. # Wireless adapter #1
  14. # Armbian ships with network-manager installed by default. To save you time
  15. # and hassles consider using 'sudo nmtui' instead of configuring Wi-Fi settings
  16. # manually. The below lines are only meant as an example how configuration could
  17. # be done in an anachronistic way:
  18. #
  19. #allow-hotplug wlan0
  20. #iface wlan0 inet dhcp
  21. #address 192.168.0.100
  22. #netmask 255.255.255.0
  23. #gateway 192.168.0.1
  24. #dns-nameservers 8.8.8.8 8.8.4.4
  25. #   wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
  26. # Disable power saving on compatible chipsets (prevents SSH/connection dropouts over WiFi)
  27. #wireless-mode Managed
  28. #wireless-power off

  29. # Local loopback
  30. auto lo
  31. iface lo inet loopback

  32. auto eth0
  33. iface eth0 inet manual

  34. auto macvlan
  35. iface macvlan inet static
  36.   address 10.0.0.116 # armbian ip
  37.   netmask 255.0.0.0
  38.   gateway 10.0.0.2 # openwrt ip
  39.   dns-nameservers 10.0.0.2 # openwrt ip
  40.   pre-up ip link add macvlan link eth0 type macvlan mode bridge
  41.   post-down ip link del macvlan link eth0 type macvlan mode bridge
复制代码



我的恩山、我的无线 The best wifi forum is right here.
发表于 2020-8-6 00:29 | 显示全部楼层
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-8-6 06:43 | 显示全部楼层
从第二行开始全部删掉,再把那个复制去改成自己的ip

点评

重启了几次后可以宿主机可以联网了,再重启一下,又不能联网了。。好迷阿  详情 回复 发表于 2020-8-6 16:12
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

 楼主| 发表于 2020-8-6 16:12 | 显示全部楼层
blue爱搞机 发表于 2020-8-6 06:43
从第二行开始全部删掉,再把那个复制去改成自己的ip

重启了几次后可以宿主机可以联网了,再重启一下,又不能联网了。。好迷阿
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

发表于 2020-8-6 23:17 | 显示全部楼层
丰花 发表于 2020-8-6 16:12
重启了几次后可以宿主机可以联网了,再重启一下,又不能联网了。。好迷阿

网口桥接关了看看
我的恩山、我的无线 The best wifi forum is right here.
回复

使用道具 举报

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

本版积分规则

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

GMT+8, 2024-4-16 19:54

Powered by Discuz! X3.5

© 2001-2024 Discuz! Team.

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

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