what is the default gateway for ipv6 , used ::1 but its not working [ubuntu 22.04], it worked for ipv4
I used this netplan:
network: version: 2 renderer: networkd ethernets: ens4: addresses: - 2600:1f13:65f:fabf:a051:32d:525e:8cb0/128 dhcp4: no routes: - to: ::/0 via: 2600:1f13:65f:fabf::1 table: 1000 - to: 2600:1f13:65f:fabf:a051:32d:525e:8cb0 via: ::/0 scope: link table: 1000 routing-policy: - from: 2600:1f13:65f:fabf:a051:32d:525e:8cb0 table: 1000
I have 2 subnets (different) on each ec2 instance. Ipv4 connection is working well but ipv6 does not. I am unable to ping the gateway 2600:1f13:65f:fabf::1 too.
Ping is working among the subnets without netplan but when trying to connect to a server running on 80 it does not so I tried to create a netplan above or add a static route using ::1. I have my ports open in the security group and the connection to server works with in same subnet.
Thank you for your comment. We'll review and update the Knowledge Center article as needed.
Hi, I try to configure two ENIs on an Ubuntu 20.04.6 LTS instance, the primary ENI and a second one with an Elastic IP.
Ip a displays the two ip addresses correctly so I do not understand why I should modify the netplan file even if the IPs are not defined in it.
Could you explain why it is needed to modify the netplan file ?
My point is that if i try to reach a tomcat server using the Elastic IP, the request does not reach tomcat. I check the security group which allows all traffic, the route table forward all requests for the outside world to the internet gateway and the NACL allows all traffic (in and out). The tomcat is not configured with a bind address so it listens on all server IPs.
So I do not understand why the tomcat server is not reachable.
Note : if i attach the elastic ip to the primary ENI, I can reach the tomcat server
Thank you for your comment. We'll review and update the Knowledge Center article as needed.
Thanks for your answer "moderator", how can i know if the knowledge center will be updated and if it is updated, how can i know when it is updated ?
Sincerly,
Bernard
I describe my configuration here
The answer didn't help at all with IPv6 setup
Thank you for your comment. We'll review and update the Knowledge Center article as needed.
Thank you for the answer. I followed the instruction, it seems not working:
-
Create a file for ens4: sudo vi /etc/network/interfaces.d/51-ens4.cfg Contents:
auto ens4
Enter one or more IP settings
iface ens4 inet static address 10.1.75.211 netmask 255.255.0.0
iface ens4 inet static address 10.1.115.59 netmask 255.255.0.0
Default gateway for ens4
up ip route add default via 10.1.0.1 dev ens4 table 1000
A route for every IP
up ip route add 10.1.75.211 dev ens4 table 1000 up ip route add 10.1.115.59 dev ens4 table 1000
A policy rule for every IP
up ip rule add from 10.1.75.211 lookup 1000 up ip rule add from 10.1.115.59 lookup 1000
-
Create another file for ens4: sudo vi /etc/dhcp/dhclient-enter-hooks.d/restrict-default-gw Contents:
case ${interface} in ens3) ;; *) unset new_routers ;; esac
- sudo systemctl restart networking systemctl status networking.service
May 29 04:24:14 localhost.localdomain systemd[1]: Starting Raise network interfaces... May 29 04:24:14 localhost.localdomain ifup[6727]: Cannot find device "ens4" May 29 04:24:14 localhost.localdomain ifup[6727]: Failed to bring up ens4. May 29 04:24:14 localhost.localdomain systemd[1]: networking.service: Main process exited, code=exited, status=1/FAILURE
Any ideas? Thank you, -Jeff
Thank you for your comment. We'll review and update the Knowledge Center article as needed.
Hi @instaview,
By looking into your conf, I think you are using an ubuntu 16 OS, hence I replicated the configuration that has been mentioned in the rePost and was getting the same error as below:
Aug 28 15:17:03 ip-172-31-16-157 systemd[1]: Failed to start Raise network interfaces.
-- Subject: Unit networking.service has failed
-- Defined-By: systemd
-- Support: http://lists.freedesktop.org/mailman/listinfo/systemd-devel
--
-- Unit networking.service has failed.
I noticed that the code snippet for /etc/network/interfaces.d/51-eth1.cfg has a another arguments after auto eth1
which led to the above error when restarting the network service, After putting the comment on the next new line, I was able to restart the service without errors and can connect to the instance using the secondary interface's IPs.
Could you please check your Secondary interface configuration and make sure the first line only contains:
auto ens4
my conf for the file: /etc/network/interfaces.d/51-ens6.cfg
where the errors disappears and the configuration went with success:
auto ens6
# Enter one or more IP settings
iface ens6 inet static
address 172.31.29.122
netmask 255.255.240.0
iface ens6 inet static
address 172.31.25.217
netmask 255.255.240.0
# Default gateway for ens6
up ip route add default via 172.31.16.1 dev ens6 table 1000
# A route for every IP
up ip route add 172.31.29.122 dev ens6 table 1000
up ip route add 172.31.25.217 dev ens6 table 1000
# A policy rule for every IP
up ip rule add from 172.31.29.122 lookup 1000
up ip rule add from 172.31.25.217 lookup 1000
Relevant content
- asked 3 years ago
- asked 6 months ago
- AWS OFFICIALUpdated 3 months ago
- AWS OFFICIALUpdated a year ago
- AWS OFFICIALUpdated a year ago