Debian 9 and lan


(andarius40) #1

Good afternoon,

I have a BPI R2 with Debian 9.4, kernel 4.14.36-bpi-r2-main

But When I try to configure network interface with static IP, on reboot, no interface have an IP:

auto eth0 iface eth0 inet manual pre-up ip link set $IFACE up post-down ip link set $IFACE down

auto lan0 iface lan0 inet static address 192.168.83.10 netmask 255.255.255.0 gateway 192.168.83.254 pre-up ip link set $IFACE up post-down ip link set $IFACE down

And on my system i don’t have : /etc/init.d/networking restart || systemctl restart networking || service networking restart.

Thank you for your help


(Frank W.) #2

Is package ifupdown installed? Maybe also debian is moved to netplan or similar…


(andarius40) #3

No is not installed I get this package and install it


(Frank W.) #4

He is described what i have done in ubuntu 18.4 which uses netplan:

https://www.fw-web.de/dokuwiki/doku.php?id=en:bpi-r2:ubuntu#install_system_to_sd-card

Debian uses also systemd so please try

systemctl restart systemd-networkd.service

(Leonardo Meneses) #5

hey there, this is because of bpi-r2 mac address settings.

in order to achieve a static ip, you need to configure the connection.

in the network icon, go to edit connections, delete (if any) excessive wired connections(new connections created on every boot), edit the one you need, and in mac address select from the dropdown eth1 (or eth0) and in mac clone select “permanent”. Then you can configure your settings however you want and they will survive reboots and disconnections.

My current setup is wired connection 1: eth0 (i believe this is lan): dhcp wired connection 2: eth1 (is where you connect your wan): static IP.

BTW, this setting works also in ubuntu mate 17.10. On ubuntu 16.04 the “permanent” option is not available and I couldn’t get a static ip.


(Frank W.) #6

In my debian image i have realited static ip with /etc/network/interfaces how did you test if no interface has an ip? Please show /etc/network/interfaces and output of “ip a” with code-indentation,so it is readable


(andarius40) #7

Hello,

Sorry for this later answer.

After install ifupdown.

I do configure static ip for all network interface and define a static mac address for each interfaces.

Now I do configure my R2 with same services that R1.

Thank you for your help


(Frank W.) #8

Does it work now?

If not please provide your /etc/network/interfaces as file-upload and output of “ip a” as code-block


(andarius40) #9

Sorry,

It’s work.

Actually I check for configure Proxy, DNS, DHCP, VPN


(Frank W.) #10

for Dhcp and dns i use dnsmasq (see wiki),for vpn i have openvpn (server) running


(andarius40) #11

Hello,

I configure static ip on all interface, but not possible to use wan interface.

For wan connexion, I must use a lan port.

When I configure and plug wan interface, no internet connexion (no led work on wan interface)

Do you have an idea for solved this issue ?

How is possible to disable WLAN interface

Thank you for your help


(Frank W.) #12

Can you plwase make

ip a

?


(andarius40) #13

Blockquote

ip a

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group defaul t 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

2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP gr oup default qlen 1000

link/ether a2:e3:2f:53:70:f0 brd ff:ff:ff:ff:ff:ff

3: wan@eth0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qlen 1000

link/ether a2:e3:2f:53:70:f0 brd ff:ff:ff:ff:ff:ff

4: lan0@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000

link/ether 08:02:f3:45:63:4e brd ff:ff:ff:ff:ff:ff
inet 192.168.101.254/24 brd 192.168.101.255 scope global lan0
   valid_lft forever preferred_lft forever

5: lan1@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000

link/ether 08:02:f3:45:34:69 brd ff:ff:ff:ff:ff:ff
inet 192.168.97.254/24 brd 192.168.97.255 scope global lan1
   valid_lft forever preferred_lft forever

6: lan2@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000

link/ether 08:02:f3:45:2e:90 brd ff:ff:ff:ff:ff:ff
inet 192.168.19.254/24 brd 192.168.19.255 scope global lan2
   valid_lft forever preferred_lft forever

7: lan3@eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP group default qlen 1000

link/ether 08:02:f3:76:f3:35 brd ff:ff:ff:ff:ff:ff
inet 192.168.57.1/24 brd 192.168.57.255 scope global lan3
   valid_lft forever preferred_lft forever

8: wlan0: <BROADCAST,MULTICAST> mtu 1500 qdisc noop state DOWN group default qle n 1000 link/ether 00:08:22:00:b9:fb brd ff:ff:ff:ff:ff:ff

When a connect an equipment on same switch that lan0. I have some issue for resolve dns and access to bpi-R2 or internet.

With same configuration on a BPI-R1 i don’ have issue

Thank you for your help


(Frank W.) #14

are all ports connected to switch with/without vlan?


(andarius40) #15

All lan port are connected to switch vlan are enable on switch


(Frank W.) #16

Each port has separate vlan? Have you tried connecting only 1/2 ports to the switch?


(andarius40) #17

each port has separate vlan.

I make a test with only 2 ports connected to switch but I have same issue


(andarius40) #18

I used kernel 4.14.36-bpi-r2-main


(Frank W.) #19

Do you used tagged frames between switch and r2 (set ip to this vlan) or vlans only inside switch (port vlan-id)?


(andarius40) #20

vlan are only inside switch