I've been trying to create a bridge on my EC2 instance (Ubuntu 20.04) with netplan but I keep losing access to my machine. Currently attempting to disable ENA, but not sure if I'm simply missing something obvious. This seems similar to this issue.
My "stock" configuration is as follows:
network: ethernets: ens5: dhcp4: true dhcp6: false match: macaddress: **:**:**:**:**:** set-name: ens5 version: 2
ip a returning:
ubuntu@ip-172-31-45-47:~$ ifconfig ens5: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 9001 inet 172.31.45.47 netmask 255.255.240.0 broadcast 172.31.47.255 inet6 fe80::860:82ff:fef8:c11c prefixlen 64 scopeid 0x20<link> ether <same as macaddress> txqueuelen 1000 (Ethernet) RX packets 48418 bytes 64806497 (64.8 MB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 9470 bytes 989568 (989.5 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536 inet 127.0.0.1 netmask 255.0.0.0 inet6 ::1 prefixlen 128 scopeid 0x10<host> loop txqueuelen 1000 (Local Loopback) RX packets 360 bytes 32234 (32.2 KB) RX errors 0 dropped 0 overruns 0 frame 0 TX packets 360 bytes 32234 (32.2 KB) TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0 ubuntu@ip-172-31-45-47:~$ ip a 1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000 link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00 inet 127.0.0.1/8 scope host lo valid_lft forever preferred_lft forever inet6 ::1/128 scope host valid_lft forever preferred_lft forever 2: ens5: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 9001 qdisc mq state UP group default qlen 1000 link/ether 0a:60:82:f8:c1:1c brd ff:ff:ff:ff:ff:ff inet 172.31.45.47/20 brd 172.31.47.255 scope global dynamic ens5 valid_lft 3104sec preferred_lft 3104sec inet6 fe80::860:82ff:fef8:c11c/64 scope link valid_lft forever preferred_lft forever
I tried bridging just by adding
br0 and copying the macaddress over like they did here, but wasn't able to reconnect to the EC2 instance afterwards.
I tried both
network: ethernets: ens5: dhcp4: false dhcp6: false match: macaddress: **:**:**:**:**:** set-name: ens5 version: 2 bridges: br0: dhcp4: true macaddress: **:**:**:**:**:** interfaces: [ens5]
like in netplan.io/examples for bridging and this for working around the AWS dhcp servers, and also removing the
dhcp lines entirely, since clearly I have no idea what I'm doing.
Would really appreciate any advice, since I don't have much experience configuring networks at all. Thanks!