1

Basically I have linux with 2 NICs on the same network. The second NIC cannot see anything except for 192.168.3.1

eno1 192.168.3.25
eno2 192.168.3.26

The following scenarios fail:
1. ping -I eno2 8.8.8.8 (or any outside IP)
2. ping -I eno1 192.168.3.26
3. ping -I eno2 192.168.3.25

# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

source /etc/network/interfaces.d/*

# The loopback network interface
auto lo
iface lo inet loopback

# The primary network interface
auto eno1
iface eno1 inet static
  address 192.168.3.25
  netmask 255.255.255.0
  gateway 192.168.3.1
  hwaddress ether 18:03:73:ec:81:c1

#eno2 is used for VM addresses. It should be assigned 192.168.3.26 automatically by dhcp
auto eno2
iface eno2 inet static
  address 192.168.3.26
  netmask 255.255.255.0
  hwaddress ether 18:03:73:ec:81:c3


auto eno4
  iface eno4 inet static
  address 192.168.10.25
  netmask 255.255.255.0
  hwaddress ether 18:03:73:ec:81:c7
  post-up ip route add default via 192.168.10.1 dev eno4 table dmz
  post-up ip rule add from 192.168.10.0/24 table dmz

route -n shows

Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
0.0.0.0         192.168.3.1     0.0.0.0         UG    0      0        0 eno1
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 eno2
192.168.3.0     0.0.0.0         255.255.255.0   U     0      0        0 eno1
192.168.10.0    0.0.0.0         255.255.255.0   U     0      0        0 eno4
192.168.122.0   0.0.0.0         255.255.255.0   U     0      0        0 virbr0

Thanks in advance.

Aaron
  • 11
  • 1
  • I am getting closer to fixing this... route del -net 192.168.3.0 netmask 255.255.255.0 dev eno2 seems to let me now ping -I eno1 192.168.3.26 however now ping -I eno2 doesn't ping anything. Fortunately it doesn't seem I need this to work since I'm just using eno2 to bridge to macvtap for VMs. It would be nice to figure this out completely, though. – Aaron Feb 27 '20 at 16:22

0 Answers0