0

I just setup a new 18.04 server install with one nic as DHCP from the gateway using netplan which appears as follows:

network:
    version: 2
    renderer: networkd
    ethernets:
        enp1s0:
            dhcp: true

I don't want to use NetworkManager as I will be assigning other statics, but this one is just trying to get access to the machine on the network. Problem is, when the machine boots, it seems to hang on:

"Starting Initial cloud-init job (pre-networking)..."

At this point, both lights on the NIC are inactive and I hit enter go continue. I did set "network: {config: disabled}" in /etc/cloud/cloud.cfg.d/... file, but that didn't seem to do anything.

After it boots, enp1s0 is UP and it does have an IP assigned, but I can only ping the gateway 192.168.10.1, but cannot ping any of the other computers on the network, and the gateway cannot ping back to this machine.

Firewalls are disabled.

Thoughts?

Update:

$ sudo journalctl /usr/sbin/dnsmasq
-- No entries ---
$ ip route
192.168.10.0/24 dev enp1s0 proto dhcp src 192.168.10.206 metric 100
192.168.10.0/24 dev enp0s31f6 proto kernel scope link src 192.168.10.199
192.168.10.0/24/dev enp1s0 proto kernel scope link src 192.168.10.206
192.168.10.1 dev enp1s0 proto dhcp scope link src 192168.10.206 metric 100
  • It sounds like a packet routing problem. Research: ip route, sudo journalctl /usr/sbin/dnsmasq (run these commands in a terminal window). – waltinator Dec 13 '19 at 17:29
  • @waltinator - added the updates. Since then i've added another nic, enp0s31f6 (not connected to anything atm). It's enp1s0 that doesn't work. – Ender Dec 13 '19 at 17:44
  • Edit your question and show me sudo lshw -C network. Are you using cat 5e or 6 cables? Does the cable go into any hubs/switches/etc? – heynnema Dec 13 '19 at 21:34
1

You have routes for the 192.168.10.0/24 subnet going out THREE interfaces (enp1s0, enp0s31f6 and enp1s0 again), plus a route for 192.168.10.1 to enp1s0. You have THREE IP addresses on enp1s0, and NO default route.

What are you trying to do?

I don't understand what "I don't want to use NetworkManager as I will be assigning other statics, but this one is just trying to get access to the machine on the network" means, or why you don't want to use NetworkManager, or why a "static" (whatever that is) is trying to get access.

Pretend you are a TCP/IP packet with a destination in the 192.168.10.0/24 subnet. Which interface do you use?

Pretend you are a TCP/IP packet with a destination NOT in the 192.168.10.0/24 subnet (e.g. 8.8.8.8). Which interface do you use?

I'm sorry this didn't resolve your problem, but you really need to suck back, reload and start again. Read man ip;man ip-route to start.

| improve this answer | |

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.