I am trying to setup a NUC computer (using ubuntu 18.04) such that:

  • ethernet port is connected to a port of a switch set in mirroring mode: The mirroring port only sends mirrored packets, and can't not be used to send from the computer to the network.
  • wifi interface is used for access to the network and internet.

When I set the port in mirroring mode, the computer looses access to the internet as it prioritize the ethernet interface and can't reach the network from that mirrored port.

I tried to use the metrics in the /etc/network/interfaces file to deprioritize the ethernet interface as below:

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

auto eno1
iface eno1 inet static
    metric 700

The wifi interface is managed by NetworkManager. My resulting route is:

user@host: route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface         UG    600    0        0 wlp58s0         UG    700    0        0 eno1     U     1000   0        0 eno1   U     0      0        0 eno1   U     600    0        0 wlp58s0

But when I set the port in mirroring mode, the computer looses connectivity, which I assume is because the destination still has the eno1 interface with highest metric of 0? And I am not sure how to change that.

What I am doing wrong? Is it possible to achieve what I am trying to do? Is the metrics approach the wrong way?

Thanks for any pointers

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Browse other questions tagged or ask your own question.