Bananian

Simple configuration of BPI-R1 does not work

8 2541
I want to use BPI-R1 as a simple home server with an integrated switch. I need no vlans. I just want the switch behave like a dumb 10Euro box.

So I started with .../if-pre-up.d/swconfig:
  1. #!/bin/sh

  2. #---------------------------#
  3. # BPI-R1 VLAN configuration #
  4. #---------------------------#
  5. #
  6. # This will create the following ethernet ports:
  7. # - eth0.101 = WAN (single port)
  8. # - eth0.102 = LAN (4 port switch)
  9. #
  10. # You have to adjust your /etc/network/interfaces
  11. #
  12. # Comment out the next line to enable the VLAN configuration:
  13. #exit 0

  14. ifconfig eth0 up

  15. # The swconfig port number are:
  16. # |2|1|0|4|  |3|
  17. # (looking at front of ports)

  18. swconfig dev eth0 set reset 1
  19. swconfig dev eth0 set enable_vlan 0
  20. #swconfig dev eth0 vlan 101 set ports '3 8t'
  21. #swconfig dev eth0 vlan 102 set ports '0 1 2 4 8t'
  22. swconfig dev eth0 set apply 1
Copy the Code


Next I defined the interface:

  1. # interfaces(5) file used by ifup(8) and ifdown(8)
  2. auto lo
  3. iface lo inet loopback

  4. auto eth0

  5. auto br0
  6. iface br0 inet static
  7.   bridge_ports eth0
  8.   address 192.168.2.19
  9.   broadcast 192.169.2.255
  10.   netmask 255.255.255.0
Copy the Code


Output of ifconfig:
  1. br0       Link encap:Ethernet  Hardware Adresse 02:05:07:02:13:9c  
  2.           inet Adresse:192.168.2.19  Bcast:192.169.2.255  Maske:255.255.255.0
  3.           inet6-Adresse: fe80::5:7ff:fe02:139c/64 Gültigkeitsbereich:Verbindung
  4.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
  5.           RX packets:1985 errors:0 dropped:2 overruns:0 frame:0
  6.           TX packets:1414 errors:0 dropped:0 overruns:0 carrier:0
  7.           Kollisionen:0 Sendewarteschlangenlänge:0
  8.           RX bytes:156501 (152.8 KiB)  TX bytes:198952 (194.2 KiB)

  9. eth0      Link encap:Ethernet  Hardware Adresse 02:05:07:02:13:9c  
  10.           UP BROADCAST RUNNING MULTICAST  MTU:1500  Metrik:1
  11.           RX packets:2126 errors:0 dropped:0 overruns:0 frame:0
  12.           TX packets:1418 errors:0 dropped:0 overruns:0 carrier:0
  13.           Kollisionen:0 Sendewarteschlangenlänge:1000
  14.           RX bytes:213826 (208.8 KiB)  TX bytes:219008 (213.8 KiB)
  15.           Interrupt:117 Basisadresse:0xc000
Copy the Code


Os:
  1. Linux bananapi 3.4.104-bananian #1 SMP PREEMPT Mon Apr 6 18:25:40 UTC 2015 armv7l GNU/Linux
Copy the Code



Now I can connect to the BPI-R1 from my notebook via ssh. From the BPI-R1 I can ping my receiver but I can't ping the receiver directly from my notebook. I tried a lot of things, but I can't ping or connect across the switch.

Is there anybody explain this behaviour to me?

Regards,
Bernhard


Galil  
Edited by Galil at Tue Jul 14, 2015 17:47

I noticed for the br0:
  • auto br0
  • iface br0 inet static
  •   bridge_ports eth0
  •   address 192.168.2.19
  •   broadcast 192.169.2.255
  •   netmask 255.255.255.0

Shouldn't the "broadcast" be 168?

tkaiser  
Galil replied at Tue Jul 14, 2015 16:40Shouldn't the "broadcast" be 168?

Of course but that's not the point. The switch config should better look like https://github.com/igorpecovnik/ ... interfaces.r1switch since with his config all switch ports are solely connected to the SoC but not to each other.

And if there's no need to bridge the crappy Wi-Fi with eth0.101 then disable the definition of br0 and use eth0.101 instead.

RE: Simple configuration of BPI-R1 does not work

Galil replied at Tue Jul 14, 2015 16:40
I noticed for the br0:
  • auto br0

  • Yes that's true.  "168" is correct.

    Of course but that's not the point. The switch config should better look like https://github.com/igorpecovnik/ ... interfaces.r1switch since with his config all switch ports are solely connected to the SoC but not to each other.


    This is an interesting information. Unfortunately I have no experience with this kind of switches.  So I must configure a VLAN although I don't need it, to get the ports interconnected. I will try it this evening.

    And if there's no need to bridge the crappy Wi-Fi with eth0.101 then disable the definition of br0 and use eth0.101 instead.


    WIFI is the next step, if the switch works.

    tkaiser  
    dumischbaenger replied at Wed Jul 15, 2015 04:37
    This is an interesting information. Unfortunately I have no experience with this kind of switches. ...

    Then http://wiki.openwrt.org/doc/techref/swconfig is the place to start.

    Thank you tkaiser!

    This /etc/network/interfaces file worked here (/etc/network/if-pre-up.d/swconfig is empty):
    1. # interfaces(5) file used by ifup(8) and ifdown(8)
    2. auto lo
    3. iface lo inet loopback

    4. auto eth0.101
    5. iface eth0.101 inet manual
    6.      pre-up swconfig dev eth0 set reset 1
    7.      pre-up swconfig dev eth0 set enable_vlan 1
    8.      pre-up swconfig dev eth0 vlan 101 set ports '0 1 2 3 4 8t'
    9.      pre-up swconfig dev eth0 set apply 1

    10. allow-hotplug wlan0
    11. iface wlan0 inet manual

    12. auto br0
    13. #iface br0 inet dhcp
    14. #bridge_ports eth0.101 wlan0
    15. iface br0 inet static
    16.   bridge_ports eth0.101 wlan0
    17.   address 192.168.2.19
    18.   netmask 255.255.255.0
    19.   gateway 192.168.2.1
    20.   dns-nameservers 192.168.2.1
    Copy the Code


    Here is a second version that worked:

    /etc/network/interfaces:
    1. # interfaces(5) file used by ifup(8) and ifdown(8)
    2. auto lo
    3. iface lo inet loopback

    4. auto eth0.101
    5. iface eth0.101 inet manual

    6. allow-hotplug wlan0
    7. iface wlan0 inet manual

    8. auto br0
    9. iface br0 inet static
    10.   bridge_ports eth0.101 wlan0
    11.   address 192.168.2.19
    12.   netmask 255.255.255.0
    13.   gateway 192.168.2.1
    14.   dns-nameservers 192.168.2.1
    Copy the Code


    /etc/network/if-pre-up.d/swconfig:
    1. swconfig dev eth0 set reset 1
    2. swconfig dev eth0 set enable_vlan 1
    3. swconfig dev eth0 vlan 101 set ports '0 1 2 3 4 8t'
    4. swconfig dev eth0 set apply 1
    Copy the Code

    Tido  
    Hi

    Just 5 posts below yours it says: Manual for Bpi-R1

    http://www.lemaker.org/forum.php?mod=viewthread&tid=13877&fromuid=72927

    Why didn't you just search for manual, tutorial or such instead of asking simple questions which everyone has to
    go through?

    take the one for armBIAN - come back when done, it is step by step

    pari123  
    Love this text twist free online game.

    You have to log in before you can reply Login | Sign Up

    Points Rules