Page MenuHomeVyOS Platform

Allow bonding interfaces to have pseudo-ethernet interfaces
Closed, ResolvedPublicFEATURE REQUEST

Description

I have a connection bundle on bond0 to my switch. And bond0.2 is my connection to the ISP that requires me to use DHCP.

But my ISP allows me to get up to 3 IPs, but I have to request them using DHCP, with different mac address for each address.

Feature request: Allow me to do something like this:

+pseudo-ethernet peth0 {
+    link bond0
+    vif 2 {
+        address dhcp
+        address dhcpv6
+        mac 00:20:91:aa:aa:aa
+    }
+}
+pseudo-ethernet peth1 {
+    link bond0
+    vif 2 {
+        address dhcp
+        address dhcpv6
+        mac 00:20:91:bb:bb:bb
+    }
+}
+pseudo-ethernet peth2 {
+    link bond0
+    vif 2 {
+        address dhcp
+        address dhcpv6
+        mac 00:20:91:cc:cc:cc
+    }
+}

Currently fails with:

[ interfaces pseudo-ethernet peth2 link bond0 ]
bond0 is a bonding interface not an ethernet interface

[[interfaces pseudo-ethernet peth2]] failed
[ interfaces pseudo-ethernet peth0 link bond0 ]
bond0 is a bonding interface not an ethernet interface

[[interfaces pseudo-ethernet peth0]] failed
[ interfaces pseudo-ethernet peth1 link bond0 ]
bond0 is a bonding interface not an ethernet interface

[[interfaces pseudo-ethernet peth1]] failed
[[interfaces pseudo-ethernet peth0 vif 2]] failed
[[interfaces pseudo-ethernet peth2 vif 2]] failed
[[interfaces pseudo-ethernet peth1 vif 2]] failed
Commit failed

System information:

Version:          VyOS 1.2.0-rolling+201905031607
Built by:         autobuild@vyos.net
Built on:         Fri 03 May 2019 16:07 UTC
Build ID:         87a851ea-33c5-4e14-9484-303787870de7

Architecture:     x86_64
Boot via:         installed image
System type:      bare metal

Hardware vendor:  Dell Inc.
Hardware model:   PowerEdge R410

Details

Difficulty level
Unknown (require assessment)
Version
-
Why the issue appeared?
Will be filled on close

Event Timeline

I commented out lines 389 and 390 in https://github.com/vyos/vyatta-cfg-system/blob/67b10e6ff5f33d73c128508f00198cc3c04c13fc/scripts/vyatta-interfaces.pl#L377.

By doing that i was able to create a peth0 with bond0 as link.

I then created vif 2 under peth0, it was created successfully but no traffic arrived on it.

Only once i deleted bond0.2 did I receive traffic, so a check should be in place for that. Probably also for ethX.N interfaces.

I am now using the peth0.2 as my internet interface and it works fine.

syncer triaged this task as Normal priority.
syncer edited projects, added VyOS 1.3 Equuleus; removed VyOS 1.2 Crux.
Viacheslav added a subscriber: Viacheslav.

@Gunni can you check the latest rolling?

It works

vyos@r4-roll:~$ show version 

Version:          VyOS 1.3-rolling-202010190146
Release Train:    equuleus
set interfaces bonding bond0 member interface 'eth1'
set interfaces bonding bond0 vif 20
set interfaces ethernet eth1
set interfaces pseudo-ethernet peth0 address 'dhcp'
set interfaces pseudo-ethernet peth0 source-interface 'bond0.20'
set interfaces pseudo-ethernet peth1 address 'dhcp'
set interfaces pseudo-ethernet peth1 source-interface 'bond0.20'
set interfaces pseudo-ethernet peth2 address 'dhcp'
set interfaces pseudo-ethernet peth2 source-interface 'bond0.20'

And check dhcp, I get address on each "peth" interface.

vyos@r4-roll:~$ show int
Codes: S - State, L - Link, u - Up, D - Down, A - Admin Down
Interface        IP Address                        S/L  Description
---------        ----------                        ---  -----------
bond0            -                                 u/u  
bond0.20         -                                 u/u  
eth0             192.168.122.14/24                 u/u  
eth1             -                                 u/u  
lo               127.0.0.1/8                       u/u  
                 ::1/128                                
peth0            100.64.0.100/24                   u/u  
peth1            100.64.0.101/24                   u/u  
peth2            100.64.0.102/24                   u/u

Each interface with uniq mac

vyos@r4-roll:~$ sudo ip link show dev peth0
18: peth0@bond0.20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 42:52:e3:59:dc:6d brd ff:ff:ff:ff:ff:ff
vyos@r4-roll:~$ 
vyos@r4-roll:~$ sudo ip link show dev peth1
19: peth1@bond0.20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 6e:ed:26:1e:ae:1f brd ff:ff:ff:ff:ff:ff
vyos@r4-roll:~$ 
vyos@r4-roll:~$ sudo ip link show dev peth2
20: peth2@bond0.20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc noqueue state UP mode DEFAULT group default qlen 1000
    link/ether 7e:3f:38:71:08:aa brd ff:ff:ff:ff:ff:ff
vyos@r4-roll:~$