We have a problem with ubuntu system with two NICs
In AWS, when we attach an elastic IP to the secondary NIC, we don’t get connectivity while it works out of the box for Amazon Linux and for RedHat 8
Redhat 8 is relying on Network manager while amazon Linux is not
This a workaround provided by Amazon to use source addressing but it is not suitable for our use case as we want to rely on destination-based routing
https://aws.amazon.com/premiumsupport/knowledge-center/ec2-ubuntu-secondary-network-interface/
Procedure:
Initialize an AWS ec2 instance using ami-09e67e426f25ce0d7 , add 2 network card and associate the security group
One Launched add an EIP for each interface
Connectivity ok for the main interface, while for the second it doesn’t work unless we enable the source based routing as indicated in the following link
https://aws.amazon.com/premiumsupport/knowledge-center/ec2-ubuntu-secondary-network-interface/
What would you advise us as configurations to get the destination based routing functioning for the secondary interfaces ?
I have tried to install network manager in ubuntu, but this wasn’t sufficient to change the behaviour
System information :
uname -a
Linux ip-10-1-10-173 5.4.0-1045-aws #47-Ubuntu SMP Tue Apr 13 07:02:25 UTC 2021 x86_64 x86_64 x86_64 GNU/Linux
ubuntu@ip-10-1-10-173:~$ cat /etc/netplan/50-cloud-init.yaml
# This file is generated from information provided by the datasource. Changes
# to it will not persist across an instance reboot. To disable cloud-init's
# network configuration capabilities, write a file
# /etc/cloud/cloud.cfg.d/99-disable-network-config.cfg with the following:
# network: {config: disabled}
network:
ethernets:
eth0:
dhcp4: true
dhcp4-overrides:
route-metric: 100
dhcp6: false
match:
macaddress: 0a:da:13:97:96:6f
set-name: eth0
eth1:
dhcp4: true
dhcp4-overrides:
route-metric: 200
dhcp6: false
match:
macaddress: 0a:34:10:48:b7:fd
set-name: eth1
version: 2
Thanks a lot
Best Regards