How do vlans work on the clearfog pro?

This forum is for discussion about general software issues.

How do vlans work on the clearfog pro?

Postby djsumdog » Sat Oct 15, 2016 3:33 pm

I've been doing a lot of searching and the only thing remotely useful I've found is this post:

http://superuser.com/questions/1120714/ ... h-in-linux

..and it just left me more confused. I'm just trying to use my Clearfog as a simple router. I've attempted the following. In my $this->bbcode_second_pass_code('', '/etc/systemd/network') I have the following:

$this->bbcode_second_pass_code('', '
# eth0.network (WAN)
[Match]
Name=eth0

[Network]
DHCP=yes
')

$this->bbcode_second_pass_code('', '
# br.netdev
[NetDev]
Name=br0
Kind=bridge
')

$this->bbcode_second_pass_code('', '
# br.network
[Match]
Name=br0

[Network]
Address=10.10.8.1/24
')

$this->bbcode_second_pass_code('', '
# lan.network
[Match]
Name=lan*

[Network]
Bridge=br0
')

If I run a DHCP server for the 10.10.8.0 subnet and attempt to get an address from another device, I get nothing; nothing in the ClearFog's logs. I realize eth1 and lan[1-6] have the same MAC address and I'm confused how the interaction between these devices work.

If I don't create the bridge and set eth1 to 10.10.8.1, I still can't ping/dhcp. If I try to create a bridge and add eth1 to it, I get an invalid argument. Also, what is eth2? Is that the SFP port?

What is the correct way to get all my lan ports to work together as a switch and assign that switch an IP address?

I'm on kernel 4.4.22-1 (4.4.24-1 won't boot).
djsumdog
 
Posts: 9
Joined: Tue Oct 04, 2016 8:22 pm

Re: How do vlans work on the clearfog pro?

Postby djsumdog » Sun Oct 16, 2016 5:23 am

I updated to 4.4.24-2-ARCH on the Clearfog which does boot :)

I've also installed swconfig out of the AUR. However $this->bbcode_second_pass_code('', 'swconfig list') returns nothing and if I try $this->bbcode_second_pass_code('', ' swconfig dev ethx show'), I get "Failed to connect to the switch" for eth0, eth1 and eth2. :(
djsumdog
 
Posts: 9
Joined: Tue Oct 04, 2016 8:22 pm

Re: How do vlans work on the clearfog pro?

Postby djsumdog » Tue Oct 18, 2016 7:08 am

So I attempted Armbian again and get the following in my klog in a loop:

$this->bbcode_second_pass_code('', '
...
[ 4316.648605] mvneta f1030000.ethernet eth1: [0]: couldn't create dsa switch instance (error -22)
[ 4317.921164] mvneta f1030000.ethernet eth1: [0]: could not detect attached switch
[ 4317.928608] mvneta f1030000.ethernet eth1: [0]: couldn't create dsa switch instance (error -22)
[ 4319.171106] mvneta f1030000.ethernet eth1: [0]: could not detect attached switch
[ 4319.178548] mvneta f1030000.ethernet eth1: [0]: couldn't create dsa switch instance (error -22)
[ 4320.441153] mvneta f1030000.ethernet eth1: [0]: could not detect attached switch
[ 4320.448598] mvneta f1030000.ethernet eth1: [0]: couldn't create dsa switch instance (error -22)
[ 4321.713187] mvneta f1030000.ethernet eth1: [0]: could not detect attached switch
[ 4321.720647] mvneta f1030000.ethernet eth1: [0]: couldn't create dsa switch instance (error -22)
[ 4322.991131] mvneta f1030000.ethernet eth1: [0]: could not detect attached switch
[ 4322.998574] mvneta f1030000.ethernet eth1: [0]: couldn't create dsa switch instance (error -22)
...
')

I think my board is defective. :(
djsumdog
 
Posts: 9
Joined: Tue Oct 04, 2016 8:22 pm

Re: How do vlans work on the clearfog pro?

Postby moonman » Wed Oct 19, 2016 5:53 am

But you don't get this on ArchLinux ARM? swconfig is for different switch implementation AFAIK. All switch ports on the clearfog are exposed as lanX devices.

This is how you would do it by hand:

$this->bbcode_second_pass_code('', '[root@clearfog ~]# brctl
Usage: brctl [commands]
commands:
addbr <bridge> add bridge
delbr <bridge> delete bridge
addif <bridge> <device> add interface to bridge
delif <bridge> <device> delete interface from bridge
hairpin <bridge> <port> {on|off} turn hairpin on/off
setageing <bridge> <time> set ageing time
setbridgeprio <bridge> <prio> set bridge priority
setfd <bridge> <time> set bridge forward delay
sethello <bridge> <time> set hello time
setmaxage <bridge> <time> set max message age
setpathcost <bridge> <port> <cost> set path cost
setportprio <bridge> <port> <prio> set port priority
show [ <bridge> ] show a list of bridges
showmacs <bridge> show a list of mac addrs
showstp <bridge> show bridge stp info
stp <bridge> {on|off} turn stp on/off
[root@clearfog ~]# brctl addbr br0
[root@clearfog ~]# brctl addif br0 lan1
[root@clearfog ~]# brctl addif br0 lan2
[root@clearfog ~]# brctl addif br0 lan3
[root@clearfog ~]# brctl addif br0 lan4
[root@clearfog ~]# brctl addif br0 lan5
[root@clearfog ~]# brctl addif br0 lan6
[root@clearfog ~]# brctl addif br0 lan7
interface lan7 does not exist!
[root@clearfog ~]# brctl show br0
bridge name bridge id STP enabled interfaces
br0 8000.005043fc5c03 no lan1
lan2
lan3
lan4
lan5
lan6
')
Pogoplug V4 | GoFlex Home | Raspberry Pi 4 4GB | CuBox-i4 Pro | ClearFog | BeagleBone Black | Odroid U2 | Odroid C1 | Odroid XU4
-----------------------------------------------------------------------------------------------------------------------
[armv5] Updated U-Boot | [armv5] NAND Rescue System
moonman
Developer
 
Posts: 3387
Joined: Sat Jan 15, 2011 3:36 am

Re: How do vlans work on the clearfog pro?

Postby djsumdog » Sun Oct 23, 2016 2:34 pm

$this->bbcode_second_pass_quote('', 'T')his is how you would do it by hand:


I did try it directly with brctl instead of systemd as well. I made the bridge and added the adapters like you show, and also assigned an ip address to the bridge (10.10.8.1/24), however I was still unable to ping other devices connected to the switch ports. In the kernel logs, when I plug in an ethernet cable, it does show the link becoming active.
djsumdog
 
Posts: 9
Joined: Tue Oct 04, 2016 8:22 pm

Re: How do vlans work on the clearfog pro?

Postby gewoonmaarten » Sun Oct 30, 2016 2:16 pm

hey,
I also have these problems not being able to use the switched ports on the clearfog pro. I posted a multiple questions on superuser and the armbian forum. I also saw your post on the official forum. I recently got this answer on one of my questions:http://forum.armbian.com/index.php/topic/2027-clearfog-pro-how-to-use-switched-6-port-ethernet/?p=17480
Since i have no idea how to use archlinux is was not able to try it yet. Maybe you can get some usefull information from it. let me know if you have some success.
gewoonmaarten
 
Posts: 2
Joined: Sun Oct 30, 2016 2:10 pm


Return to General

Who is online

Users browsing this forum: No registered users and 2 guests