I have struggled in an enterprise environment with IP changes (moving VLANS) of servers. Temporary dual homing would be an ideal solution, but after trying on and off for a year, I have always had routing issues from systems within the same VLAN.
We use Ubuntu with Netplan, below is an example Netplan configuration. Everything works as expected, except traffic within the local VLAN for the new VLAN (20 in this example).
Routing between the VLANs happens on a core switch, both server interfaces are on a Cisco switch. Traffic between VLANs also is routed through a firewall but the rules between these two are any:any.
Additional Testing:
Using tcpdump and ping, it appears inbound traffic from VLAN 10 (using the interface IP of VLAN 20) exits on VLAN 20 and is lost. Basically it is not routing traffic back on the source interface when it is coming from VLAN 20 into VLAN 10s interface from the enterprise network side.
I am not sure how to fix that. How does one ensure a true source-based routing in this case is it even possible?
Netplan configuration:
# VLAN 10 (eno2np1) (10.86.152.0/22) # VLAN 20 (eno4) (10.126.110.1/26) # Traffic is lost within VLAN 20. tcpdump sees packets on local and remote systems, unclear exactly what is causing lack of communication. network: ethernets: # Primary Server Address / Adapter. # VLAN 10 eno2np1: dhcp4: false addresses: [10.86.152.220/22] routes: - to: default via: 10.86.152.1 routing-policy: - from: 10.86.152.220 nameservers: addresses: [10.56.56.56,10.56.56.156] # New VLAN we are moving to. # VLAN 20 eno4: dhcp4: false addresses: [10.126.110.20/26] nameservers: addresses: [10.56.56.56,10.56.56.156] routes: - to: default via: 10.126.110.1 table: 100 routing-policy: - from: 10.126.110.20 table: 100 version: 2
/etc/iproute2/rt_tables:
# # reserved values # 255 local 254 main 253 default 0 unspec # # local # #1 inr.ruhep # 100 ipten