I managed to install Debian on my Banana Pi R2.
This device has two physical NICs: one for WAN (1 port), one for LAN (4 ports).
- eth0
- eth1
if I run ip address
, I can see, that there are multiple interfaces "on" the "native" interfaces, which I can identify as the individual LAN-ports on the Board:
root@bpi-r2:~# ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
inet6 ::1/128 scope host
valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 02:02:02:02:02:02 brd ff:ff:ff:ff:ff:ff
inet6 fe80::2:2ff:fe02:202/64 scope link
valid_lft forever preferred_lft forever
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 36:d1:02:41:61:c9 brd ff:ff:ff:ff:ff:ff
inet6 fe80::34d1:2ff:fe41:61c9/64 scope link
valid_lft forever preferred_lft forever
4: wan@eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000
link/ether 36:d1:02:41:61:c9 brd ff:ff:ff:ff:ff:ff
inet 10.20.0.88/24 brd 10.20.0.255 scope global wan
valid_lft forever preferred_lft forever
inet6 fe80::34d1:2ff:fe41:61c9/64 scope link
valid_lft forever preferred_lft forever
5: lan0@eth0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc noqueue state LOWERLAYERDOWN group default qlen 1000
link/ether 02:02:02:02:02:02 brd ff:ff:ff:ff:ff:ff
inet 192.168.0.1/24 brd 192.168.0.255 scope global lan0
valid_lft forever preferred_lft forever
6: lan1@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 02:02:02:02:02:02 brd ff:ff:ff:ff:ff:ff
7: lan2@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 02:02:02:02:02:02 brd ff:ff:ff:ff:ff:ff
8: lan3@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000
link/ether 02:02:02:02:02:02 brd ff:ff:ff:ff:ff:ff
root@bpi-r2:~#
I cannot find any hints for these "lan*" and "wan" interfaces in /etc/network/interfaces
... I know how to create and manage virtual interfaces, but I only know them as eth0:2
for example...
When I try to assign a static IP by writing the following to /etc/network/interfaces
, the networking service fails to bring up the interface:
iface lan0 inet dhcp
iface wan inet static
...
So where do these interfaces come from and how do I manage them (addign static IP or DHCP etc.)
EDIT 1:
Output of ls /sys/class/net
:
root@bpi-r2:~# ls /sys/class/net
eth0 eth1 lan0 lan1 lan2 lan3 lo wan
root@bpi-r2:~#
Found a working configuration:
auto lan0 wan
iface wan inet static
address 137.226.214.58
netmask 255.255.254.0
pre-up ip link set $IFACE up
post-down ip link set $IFACE down
gateway 137.226.214.1
iface lan0 inet static
address 10.20.0.88
netmask 255.255.255.0
pre-up ip link set $IFACE up
post-down ip link set $IFACE down