network doesn't work after adding second interface to netplan

Solution 1:

The problem is because both your networks have gateways defined, and as such the netplan configuration is a little 'confusing' and will break your default routes to the Internet.

In netplan configurations, doing this will have conflicting 'default' route rules for your Internet traffic.

For network traffic headed out for a specific interface (to/from the Internet, in this case eno1), set the gateway4 field. For all other network adapters, do not define gateway4 (in this case, enp4s0). Then, either sudo netplan apply or reboot the system.

This will solve the routing headaches that you've observed.