您的位置:首页 > 运维架构

FriendlyARM NanoPi-NEO 有线网卡双IP配置

2016-08-21 00:00 447 查看

配置:

root@FriendlyARM:~# cat /etc/network/interfaces
# interfaces(5) file used by ifup(8) and ifdown(8)
# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

allow-hotplug eth0
auto eth0
# iface eth0 inet dhcp
iface eth0 inet static
address 172.16.82.15
netmask 255.255.0.0
gateway 172.16.85.1

auto eth0:1
iface eth0:1 inet static
address 10.82.10.15
netmask 255.0.0.0
# gateway 10.0.0.1

allow-hotplug wlan0
iface wlan0 inet dhcp
wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
root@FriendlyARM:~#

配置结果:

root@FriendlyARM:~# ifconfig
eth0 Link encap:Ethernet HWaddr b6:67:06:2f:d9:68
inet addr:172.16.82.15 Bcast:172.16.255.255 Mask:255.255.0.0
inet6 addr: fe80::b467:6ff:fe2f:d968/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:30 errors:0 dropped:11 overruns:0 frame:0
TX packets:15 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:2224 (2.2 KB) TX bytes:1006 (1.0 KB)
Interrupt:114

eth0:1 Link encap:Ethernet HWaddr b6:67:06:2f:d9:68
inet addr:10.82.10.15 Bcast:10.255.255.255 Mask:255.0.0.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
Interrupt:114

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:16436 Metric:1
RX packets:2 errors:0 dropped:0 overruns:0 frame:0
TX packets:2 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:176 (176.0 B) TX bytes:176 (176.0 B)

root@FriendlyARM:~# ping 172.16.82.15
PING 172.16.82.15 (172.16.82.15) 56(84) bytes of data.
64 bytes from 172.16.82.15: icmp_seq=1 ttl=64 time=0.345 ms
64 bytes from 172.16.82.15: icmp_seq=2 ttl=64 time=0.183 ms
64 bytes from 172.16.82.15: icmp_seq=3 ttl=64 time=0.136 ms
^C
--- 172.16.82.15 ping statistics ---
3 packets transmitted, 3 received, 0% packet loss, time 1998ms
rtt min/avg/max/mdev = 0.136/0.221/0.345/0.090 ms
root@FriendlyARM:~#
root@FriendlyARM:~#
root@FriendlyARM:~#
root@FriendlyARM:~# ping 10.82.10.15
PING 10.82.10.15 (10.82.10.15) 56(84) bytes of data.
64 bytes from 10.82.10.15: icmp_seq=1 ttl=64 time=0.327 ms
64 bytes from 10.82.10.15: icmp_seq=2 ttl=64 time=0.149 ms
64 bytes from 10.82.10.15: icmp_seq=3 ttl=64 time=0.255 ms

环境信息:

root@FriendlyARM:~#
root@FriendlyARM:~# cat /proc/version
Linux version 3.4.39-h3 (root@wwd-ubuntu) (gcc version 4.6.3 20120201 (prerelease) (crosstool-NG linaro-1.13.1-2012.02-20120222 - Linaro GCC 2012.02) ) #14 SMP PREEMPT Mon Jul 4 10:10:33 CST 2016
root@FriendlyARM:~#
root@FriendlyARM:~#
root@FriendlyARM:~#
root@FriendlyARM:~# cat /proc/cpuinfo
Processor : ARMv7 Processor rev 5 (v7l)
processor : 0
BogoMIPS : 5257.13

processor : 1
BogoMIPS : 5257.13

processor : 2
BogoMIPS : 5257.13

processor : 3
BogoMIPS : 5257.13

Features : swp half thumb fastmult vfp edsp thumbee neon vfpv3 tls vfpv4 idiva idivt
CPU implementer : 0x41
CPU architecture: 7
CPU variant : 0x0
CPU part : 0xc07
CPU revision : 5

Hardware : sun8i
Revision : 0000
Serial : 2400503588102c250c8e
root@FriendlyARM:~#

硬件:

FriendlyARM NanoPi NEO
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息