|
照着这个改了半天,还是无法上网:
永久方案,修改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地址
这是我修改后的,无法上网的 ,各位大佬来指点一下,是哪里不对,先谢谢了
- source /etc/network/interfaces.d/*
- # Wired adapter #1
- allow-hotplug eth0
- no-auto-down eth0
- #iface eth0 inet dhcp
- iface eth0 inet static
- #address 192.168.1.100
- #netmask 255.255.255.0
- #gateway 192.168.1.1
- #dns-nameservers 192.168.1.1
- # hwaddress ether # if you want to set MAC manually
- # pre-up /sbin/ifconfig eth0 mtu 3838 # setting MTU for DHCP, static just: mtu 3838
- # Wireless adapter #1
- # Armbian ships with network-manager installed by default. To save you time
- # and hassles consider using 'sudo nmtui' instead of configuring Wi-Fi settings
- # manually. The below lines are only meant as an example how configuration could
- # be done in an anachronistic way:
- #
- #allow-hotplug wlan0
- #iface wlan0 inet dhcp
- #address 192.168.0.100
- #netmask 255.255.255.0
- #gateway 192.168.0.1
- #dns-nameservers 8.8.8.8 8.8.4.4
- # wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
- # Disable power saving on compatible chipsets (prevents SSH/connection dropouts over WiFi)
- #wireless-mode Managed
- #wireless-power off
- # Local loopback
- auto lo
- iface lo inet loopback
- auto eth0
- iface eth0 inet manual
- auto macvlan
- iface macvlan inet static
- address 10.0.0.116 # armbian ip
- netmask 255.0.0.0
- gateway 10.0.0.2 # openwrt ip
- dns-nameservers 10.0.0.2 # openwrt ip
- pre-up ip link add macvlan link eth0 type macvlan mode bridge
- post-down ip link del macvlan link eth0 type macvlan mode bridge
复制代码
|
|