I have an Amazon EC2 Instance running Ubuntu server 16.04
I want the EC2 to have two network interfaces. After configuring the secondary interface. I cannot ping my primary interface from my other instances. This is my configuration of the /etc/network/interfaces.d/51-secondary.cfg . I have enable to allow all traffic on the ec2 as well. My interfaces are ens5 the primary and ens6 the secondary. my primary IP is 172.31.0.67 and the secondary is 172.31.6.43. I want my other ec2s to communicate with both my ip address. Is it possible what did i do wrong here.
auto ens6
iface ens6 inet static
address 172.31.6.43
netmask 255.255.240.0
# Gateway configuration
up ip route add default via 172.31.0.1 dev ens6 table 1000
# Routes and rules
up ip route add 172.31.6.43 dev ens6 table 1000
up ip rule add from 172.31.26.168 lookup 1000