Ubuntu – Configuring Network without Default Gateway

network-manager

I'm trying to connect my desktop and laptop using an ethernet connection. I usually configure network from the command line but this time I decided to give Network Manager a try, so I went to Network Connections, and selected manual IP configuration.

At first I left the default gateway field blank, since I don't need a default gateway. Turned out network manager doesn't let me save the connection unless I enter that field, but entering a phony gateway messes up with my Internet connection. Anyway to do this setup?

Best Answer

I always enter 0.0.0.0 as default GW when I don't really need one.

Actually, if you enter IP and netmask, and never touch the GW field it will automatically fill in 0.0.0.0 as the default GW when you press Save.