0

I'm new to Linux but a veteran with Windows, to start i'm working with Ubuntu-Desktop 20.04LTS - new install.

When connected to the network via DHCP everything just works, however I need to set a static IP.

There is no difference if I configure the static IP through the GUI or edit the /etc/netplan/01-Network-Manager-All.yaml file I cannot ping the gateway or any other inside or outside addresses with the exception of the two internal DNS servers. I can still however browse webpages and download packages.

Please see my configuration file below.

network:
  version: 2
  renderer: NetworkManager   
  ethernets:
    enp5s0:
      dhcp4: no
      addresses: [10.0.2.3/21]
      gateway4: 10.0.1.1
      nameservers:
        addresses: [10.0.8.10,10.0.8.12]

When I run "ip route," on the static IP config I get these results

default via 10.0.1.1 dev enp5s0 proto static metric 100 
10.0.0.0/21 dev enp5s0 proto kernel scope link src 10.0.2.3 metric 100 
169.254.0.0/16 dev enp5s0 scope link metric 1000

If I connect via DHCP, "ip route" it yields the same results except with the dynamic IP. I can then ping everywhere again.

1 Answer 1

-1

If ping works when you have the address assigned by DHCP, but not when you assign an address statically, this sounds like your DHCP server is coordinating with your switches to filter traffic and only machines that have been granted DHCP leases are allowed to send certain traffic.

There's nothing fundamentally wrong with your netplan config, it looks like it just isn't compatible with your network.

1
  • I looked through the switches, and could not find any instance of filtering. However, you pointed me in the right direction it was a Firewall rule preventing outbound ICMP, outside of the DHCP scope. Dec 21, 2020 at 19:36

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .