Interface redirect to dum0

Here’s what is happening:
set interfaces dummy dum0 address ‘192.168.201.1/24’

Then this command is added:
vyos@vyos# set interfaces ethernet eth5 vif 1002 redirect ‘dum0’

Then the commit:
vyos@vyos# commit
[ interfaces ethernet eth5 vif 1002 redirect dum0 ]
Cannot find device “eth5.1002”
tc qdisc ingress failed at /opt/vyatta/sbin/vyatta-qos.pl line 334.

[[interfaces ethernet eth5]] failed
Commit failed
[edit]
vyos@vyos#

Try it again:

vyos@vyos# set interfaces ethernet eth5 vif 1002 redirect ‘dum0’
vyos@vyos# commit
[ interfaces ethernet eth5 vif 1002 redirect dum0 ]
Error: Parent Qdisc doesn’t exists.
We have an error talking to the kernel
tc action redirect command failed at /opt/vyatta/sbin/vyatta-qos.pl line 343.

[[interfaces ethernet eth5]] failed
Commit failed
[edit]
vyos@vyos#

And just in case, try it again:

vyos@vyos# set interfaces ethernet eth5 vif 1002 redirect ‘dum0’
vyos@vyos# commit
[ interfaces ethernet eth5 vif 1002 redirect dum0 ]
Error: Exclusivity flag on, cannot modify.
tc qdisc ingress failed at /opt/vyatta/sbin/vyatta-qos.pl line 334.

[[interfaces ethernet eth5]] failed
Commit failed
[edit]
vyos@vyos#

Here’s the version:

vyos@vyos:~$ show version

Version: VyOS 1.4-rolling-202101171022
Release Train: sagitta

Built by: autobuild@vyos.net
Built on: Sun 17 Jan 2021 10:22 UTC
Build UUID: e658dfe0-d21b-4e94-9a42-d232c1256e6b
Build Commit ID: dc1526e8b26b8e

Architecture: x86_64
Boot via: installed image
System type: KVM guest

Hardware vendor: QEMU
Hardware model: Standard PC (i440FX + PIIX, 1996)
Hardware S/N:
Hardware UUID: 6697630b-6b05-4553-84b0-6a085ca64253

Copyright: VyOS maintainers and contributors

And this works in version:

Version: VyOS 1.1.8
Description: VyOS 1.1.8 (helium)
Copyright: 2017 VyOS maintainers and contributors
Built by: maintainers@vyos.net
Built on: Sat Nov 11 13:44:36 UTC 2017
Build ID: 1711111344-b483efc
System type: x86 64-bit
Boot via: image
Hypervisor: KVM
HW model: Standard PC (i440FX + PIIX, 1996)
HW S/N: Not Specified
HW UUID: 5BD2C4AC-B105-A347-9DB0-15061856207E
Uptime: 08:08:45 up 4 days, 18:14, 1 user, load average: 0.00, 0.01, 0.05

The configuration:
set interfaces dummy dum0 address ‘192.168.201.1/24’
set interfaces ethernet eth5 vif 1002 description ‘Subscriber-1’
set interfaces ethernet eth5 vif 1002 redirect ‘dum0’
set protocols static interface-route 192.168.201.2/32 next-hop-interface ‘eth5.1002’

Any help would be greatly appreciated.

Robert Peterson

I don’t confirm whether the redirect function works normally, and I don’t know the difference between this function and span. It seems that bidirectional span mirror function has been supported at present

I’m trying to create a configuration that can replicate what I’m current doing on cisco and juniper routers. Here’s an example of what I’m doing on a cisco:

interface GigabitEthernet0/2/0.1002
description Subscriber 1
encapsulation dot1Q 1002
ip dhcp relay information option subscriber-id 1002
ip unnumbered Loopback1
ip helper-address 192.168.200.3
ipv6 enable
arp timeout 300
!

With the exception of this command

ip dhcp relay information option subscriber-id 1002

and this command

ip helper-address 192.168.200.3

I can come very close to replicating it on vyos. The redirect command works on version 1.1.8 (helium)

Thanks

Robert

BTW: I’m new to vyos.

If you want to analyze the switch port, you can activate the span network port mirror function, which will copy the data of the monitored interface to the monitoring port

This is not a mirror function. I’m using the redirect in vyos like an ip unnumbered loopback interface in cisco. Here’s the configuration from a cisco:

interface Loopback1
ip address 192.168.201.1 255.255.255.0
!
interface GigabitEthernet0/2/0.1002
description Subscriber 1
encapsulation dot1Q 1002
ip dhcp relay information option subscriber-id 1002
ip unnumbered Loopback1
ip helper-address 192.168.200.3
ipv6 enable
arp timeout 300
!
ip route 192.168.201.2 255.255.255.255 GigabitEthernet0/2/0.1002

And what I though would be the same in vyos:
set interfaces dummy dum0 address ‘192.168.201.1/24’

set interfaces ethernet eth5 vif 1002 description ‘Subscriber-1’
set interfaces ethernet eth5 vif 1002 redirect ‘dum0’

set protocols static interface-route 192.168.201.2/32 next-hop-interface ‘eth5.1002’

So the mirror function isn’t what I need in this application.

Well, I’m not very clear about the difference between them, and I haven’t used this function before https://phabricator.vyos.net/ Submit a bug report? If you find the cause of the problem, you can also consider fixing it

I haven’t heard of or used this kind of functional requirement, and I haven’t tested it. I don’t know the difference between this function and span. Maybe people who clearly know the behavior of this function are more suitable for repairing or migrating the realization of this function

During the migration and full implementation of span, I retained this function because I was not sure of the purpose of the function. Due to the conflict of the handler, I only modified the handler