0

Our DHCP server (Ubuntu 18.04) is giving out IP addresses. But the clients do not get a network connection. We can ping inside and boarder but nothing more. What are we doing wrong. Also we are new to 18.04 and coming from 16.

network:
    renderer: networkd
    ethernets:
          enp4s0:
             addresses: [x.x.x.x(external ip)/24]
             dhcp4: no
             gateway4: x.x.x.x
             nameservers:
                     addresses: [8.8.8.8,1.1.1.1]
             optional: true
          enp5s0:
             addresses: [172.16.5.1/20]
             dhcp4: no
             gateway4: 172.16.5.1
             nameservers:
                     addresses: [8.8.8.8,1.1.1.1]
             optional: true
    version: 2

DHCP

   subnet 172.16.0.0 netmask 255.255.240.0 {
      range 172.16.5.5 172.16.5.254;
      option routers 172.16.5.1;
}

Can any one explain what is wrong? Can provide more info if needed.

  • You have the same IP for enp5s0 and gateway4. Can't do that. And what does "ping inside and boarder" mean? And... your dhcp server isn't being used at all. – heynnema Jun 20 at 17:47
  • Our dhcp is giving out ip addresses. Our client is getting the ip address of 172.16.5.5, I can ping both nics on the border with said client(172.16.5.1, and our external IP address.) However; it will not ping any other address outside our network. Our border system, one with two nics. can ping anywhere inside and outside. Sorry if this is really confusing netplan is a lot different compared to the old interface. (still trying to learn netplan more) – tremors Jun 20 at 18:09
  • Is the .yaml you're showing for the dhcp server, or one of the client machines? How can the static IP and the gateway4 have the same 172.16.5.1 IP? You may have to make a quick drawing of your network, showing the minimum client/servers/"boarder" and edit that image into your question for me to understand how it's all connected. Is "border" a firewall, or something else? – heynnema Jun 20 at 19:07
  • So we figured it out by adding /sbin/iptables --table nat --append POSTROUTING --out-interface enp6s0 --jump MASQUERADE. Thought IPtables was being replaced by UFW not too sure. Guess I'll read more on the difference of 16 and 18. Thanks for trying to help. And again sorry for an insanely confusing question. – tremors Jun 20 at 19:20
  • Thanks for the update. When you have time, put together your own answer to your question, and then come back in two days to accept your answer. – heynnema Jun 20 at 19:22

Your Answer

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

Browse other questions tagged or ask your own question.