Vyos and Thunderbolt Networking

Hi, I am trying to build a router using vyos that would have thunderbolt support. The thunderbolt port is embedded into motherboard(it’s not an external card).

First of all, before anything, I have installed ubuntu on the machine and managed to set up thunderbolt0 ethernet interface using network-manager, using iperf my on my PC I verified the connection via tcp/upd, everything worked well.

Now I am trying to add thunderbolt networking to vyos, but I can’t figure it out and there is barely any info online on thunderbolt itself leave alone vyos.

So what I did:

  1. Compiled 5.10.141 Kernel, with thunderbolt modules
  2. Made installation ISO with vyos 1.4 and custom module
  3. Installed vyos
  4. Activated the modules thunderbolt and thunderbolt-net with modprobe

vyos@vyos:\~$ lsmod | grep thunder

thunderbolt\_net        24576  0
thunderbolt           290816  1 thunderbolt\_net
  1. Installed Bolt and Thunderbolt-tools packages

    vyos@vyos:~$ apt search bolt
    Sorting… Done
    Full Text Search… Done
    bolt/now 0.9.1-1 amd64 [installed,local]
    system daemon to manage thunderbolt 3 devices

    thunderbolt-tools/now 0.9.3-5+b1 amd64 [installed,local]
    Intel Thunderbolt userspace components

Here is the thunderbolt device and version

vyos@vyos:~$ lspci
...
04:00.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 2C 2018] (rev 06)
05:00.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 2C 2018] (rev 06)
05:01.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 2C 2018] (rev 06)
05:02.0 PCI bridge: Intel Corporation JHL7540 Thunderbolt 3 Bridge [Titan Ridge 2C 2018] (rev 06)
06:00.0 System peripheral: Intel Corporation JHL7540 Thunderbolt 3 NHI [Titan Ridge 2C 2018] (rev 06)
3c:00.0 USB controller: Intel Corporation JHL7540 Thunderbolt 3 USB Controller [Titan Ridge 2C 2018] (rev 06)

I checked the device folder, and there is one device(0-0 and domain0 are local, 0-1 must be my PC), i also found some net folder with address that looks like hardware address.

vyos@vyos:/sys/bus/thunderbolt$ ls devices/
0-0  0-1  0-1.0  domain0
vyos@vyos:/sys/bus/thunderbolt$ cat devices/0-1.0/net/thunderbolt0/address
02:c7:e2:a6:61:37
vyos@vyos:/sys/bus/thunderbolt$

So I tried to create a new interface, but that is not allowed vyos@vyos# set interfaces ethernet eth4 hw-id 02:c7:e2:a6:61:37

I can’t install network-manager as it would break ppp package.

So I am stuck and don’t know what to do at this point. Yet I found this commit, so it should be possible, right? Any help is appreciated.

UPDATE
So I installed network-manager to get thunderbolt networking going. During the installation the ppp package got broken(as expected), which corrupted the vyos systems. At least my thunderbolt works now:

vyos@vyos:~$ nmcli
thunderbolt0: connected to Wired connection 4
        "Intel JHL7540 Thunderbolt 3 NHI"
        ethernet (thunderbolt-net), 02:C7:E2:A6:61:37, hw, mtu 1500
        inet4 169.254.160.41/16
        route4 224.0.0.0/4
        route4 169.254.0.0/16
        inet6 fe80::c20c:37b4:6963:4e63/64
        route6 fe80::/64

e2: unavailable
        "Realtek RTL8125 2.5GbE"
        ethernet (r8169), 2C:F0:5D:76:50:0E, hw, mtu 1500

e3: unavailable
        "Intel X540-AT2"
        ethernet (ixgbe), A0:36:9F:B2:4A:50, hw, mtu 1500

e5: unavailable
        "Intel X540-AT2"
        ethernet (ixgbe), A0:36:9F:B2:4A:52, hw, mtu 1500

lo: unmanaged
        "lo"
        loopback (unknown), 00:00:00:00:00:00, sw, mtu 65536

And here is iperf run, All of that is done with disconnected Ethernet cable(only thunderbolt connected) just to be sure. It ain’t 10Gbps, but not bad for now, I think I need to enable larger MTU.

vyos@vyos:~$ iperf3 -s
-----------------------------------------------------------
Server listening on 5201
-----------------------------------------------------------
Accepted connection from 169.254.152.57, port 56214
[  5] local 169.254.160.41 port 5201 connected to 169.254.152.57 port 56216
[ ID] Interval           Transfer     Bitrate
[  5]   0.00-1.00   sec   721 MBytes  6.05 Gbits/sec
[  5]   1.00-2.00   sec   726 MBytes  6.09 Gbits/sec
...

The problem now is broken vyos. I still can access config manager, I thing it’s called FRR console, but I can’t see any interfaces except loop back.

vyos@vyos:~$ show interfaces
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
lo               127.0.0.1/8                       u/u
                 ::1/128

I can see interfaces using ifconfig or nmcli.

So the questions are:

  • how can I rebuild ppp package?
  • how can I manualy add interface( i.e. does vyos have some sort of /etc/network/interfaces config file)?