I have followed a youtube video on creating an ec2 and then adding two elastic ip addresses to the instance. However when I ssh into the ubuntu server to add the new secondary ip I get an error that says
cannot find device "eth0"
when I run the below command
sudo ip addr add 172.31.32.210/20 dev eth0
Note I released that ip so its not my ip address anymore but you can see the command I am using. What would cause this error and how to resolve?
If I run a ip link command I get the below:
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN mode DEFAULT group default qlen 1000
link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
2: ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP mode DEFAULT group default qlen 1000
link/ether 0e:e4:6d:b4:d6:93 brd ff:ff:ff:ff:ff:ff