Okay, more results. I'm not sure I'm doing the VRF correctly, so I may need help getting this tested.
Thanks for trying this and the arp_ignore=1! Manually setting up the VRF like you did may be a bit tricky, it's probably easier to let ifupdown2 handle this. My previous answer [1] on this was a bit brief, so here are some more details:
If I understand correctly, your /etc/network/interfaces, after following the guide by the original poster, defines two IP addresses in the same subnet on two different physical interfaces. Similarly, I have these two stanzas for ens19/ens20 on my test system:
Code:
auto ens19
iface ens19 inet static
address 172.16.0.200/24
auto ens20
iface ens20 inet static
address 172.16.0.201/24
It should be enough to add two VRF stanzas (the names don't really matter too much) ...
Code:
auto path1
iface path1
vrf-table auto
auto path2
iface path2
vrf-table auto
... and modify the ens19/ens20 stanzas to attach to these VRF by adding two
vrf
options:
Code:
auto ens19
iface ens19 inet static
address 172.16.0.200/24
vrf path1
auto ens20
iface ens20 inet static
address 172.16.0.201/24
vrf path2
Then reload the network config with
ifreload -a
. Then, ens19/ens20 should be attached to their respective VRF, and the VRFs should have one route defined (to the subnet where the iSCSI portals are located), e.g.:
Code:
# ip link | egrep 'ens(19|20)'
3: ens19: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master path1 state UP mode DEFAULT group default qlen 1000
4: ens20: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast master path2 state UP mode DEFAULT group default qlen 1000
# ip route show vrf path1
172.16.0.0/24 dev ens19 proto kernel scope link src 172.16.0.200
# ip route show vrf path2
172.16.0.0/24 dev ens20 proto kernel scope link src 172.16.0.201
I assume you have also set up Open-iSCSI to bind directly to the ens19/ens20 interfaces using
iscsiadm -m iface
, as described in the guide by the original poster.
On my test setup, this setup makes the host respond to ARP requests for 172.16.0.200/172.16.0.201 only on one interface, and with the correct MAC address -- no further tweaks are necessary (in particular, no need to set the
tcp_l3mdev_accept
/
udp_l3mdev_accept
sysctls).
[1]
https://forum.proxmox.com/threads/quick-howto-on-setting-up-iscsi-multipath.157532/post-750326