If you want help with netplan, you'll need to post your netplan yaml file wrapped in forum code-tags to maintain spacing and columns. YAML is extremely column dependent. It is very easy to screw that up and end with a non-working configuration.
For examples, see netplan.io.
Generally, there are 5 settings needed for a proper, simple, static IP configuration.
- IP address
- netmask
- default gateway
- 2 nameservers - primary and backup
That's it. Of course, you'll need to correctly specify the interface device name. 20 yrs ago, that was almost always eth0. These days, it can be based on the MAC or based on the driver/slot. The
ip a command should show all available ethernet adapters with working drivers in a computer. If DHCP is working, the netplan yaml file already has the correct device name. Use that following the examples.
Not all routers are created equal. Home/consumer routers don't have the the same capabilities that enterprise routers have - but we don't know what sort of router you have. Should we guess? In general, ports in a consumer router won't impact DHCP or static IP assignments. There can be exceptions, but normally, that isn't the situation.
There are other methods to accomplish static IPs, but they are outside Ubuntu, bring some issues, and if the router config isn't working, will end up causing any devices expecting to get their static IP assignment (also called DHCP reservation), to fail and not be provided any networking. That is bad.
Bookmarks