You are not logged in.

#1 2015-09-16 00:00:55

Nobabs27
Member
Registered: 2014-01-25
Posts: 38

DHCPD & No internet access for client

Hi,
I followed this wiki page:
https://wiki.archlinux.org/index.php/Dhcpd
And for the most part it seems to work (the client recieves an IP address using DHCPCD).
Except the client has no internet access.
Here is my /etc/dhcpd.conf:

option domain-name-servers 8.8.8.8, 8.8.4.4;
option subnet-mask 255.255.255.0;
option routers 139.96.30.100;
subnet 139.96.30.0 netmask 255.255.255.0 {
  interface enp3s0;
  range 139.96.30.150 139.96.30.250;
}

What I am hoping to achiev, is basically a daisy-chain.
The first computer has two interfaces, designated enp3s0 and enp5s0 according to 'ip a'.
Interface enp5s0 is hooked up to the router, while enp3s0 is hooked up to the client computer (both via ethernet).
On the client computer a 'ping -c 1 google.com' takes a good few seconds to say "ping: unknown host google.com".
Any ideas, help or suggestions appreciated!


Facepalm.

Offline

#2 2015-09-16 04:11:00

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: DHCPD & No internet access for client

Post the output of the following commands on the client:

ip a s
ip r s
cat /etc/resolv.conf

Also, are you sure that address range (139.96.30.0/24) in your dhcpd.conf is correct? That would usually be a private address range (eg, 192.168.1.0/24) and the router would Source NAT the traffic. Don't take this the wrong way, but if you're in a position to have a public /24 allocation, then I would expect you would know how to setup and troubleshoot basic connectivity.

Offline

#3 2015-09-16 17:36:49

Nobabs27
Member
Registered: 2014-01-25
Posts: 38

Re: DHCPD & No internet access for client

fukawi2 wrote:

Also, are you sure that address range (139.96.30.0/24) in your dhcpd.conf is correct?

I am not sure what correct (or incorrect) would be, so no?

fukawi2 wrote:

That would usually be a private address range (eg, 192.168.1.0/24) and the router would Source NAT the traffic.

Are you saying that one of the IPs in the dhcpd.conf should point to the host's router?

fukawi2 wrote:

Don't take this the wrong way, but if you're in a position to have a public /24 allocation, then I would expect you would know how to setup and troubleshoot basic connectivity.

By public and /24, do you mean 24 WAN IPs?
If so, then no, I do not have 24 WAN IPs allocated to me.
I am a noob is this department, hence I am trying to learn by doing.

One thing I forgot to mention was that on the client, I had to edit the dhcpcd.conf and comment out "require dhcp_server_identifier", to get it to receive an IP.

ip a s:

1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default 
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host 
       valid_lft forever preferred_lft forever
2: enp3s1f0: <NO-CARRIER,BROADCAST,MULTICAST,UP> mtu 1500 qdisc mq state DOWN group default qlen 1000
    link/ether 00:14:c2:64:df:47 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::2d77:3d84:dce4:bf71/64 scope link tentative 
       valid_lft forever preferred_lft forever
3: enp3s1f1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether 00:14:c2:64:df:46 brd ff:ff:ff:ff:ff:ff
    inet 139.96.30.156/24 brd 139.96.30.255 scope global enp3s1f1
       valid_lft forever preferred_lft forever
    inet6 fe80::9640:f066:e0de:1948/64 scope link 
       valid_lft forever preferred_lft forever

ip r s:

default via 139.96.30.100 dev enp3s1f1  metric 203 
139.96.30.0/24 dev enp3s1f1  proto kernel  scope link  src 139.96.30.156  metric 203 

/etc/resolv.conf:

# Generated by resolvconf
nameserver 8.8.8.8
nameserver 8.8.4.4

Facepalm.

Offline

#4 2015-09-16 17:55:05

alphaniner
Member
From: Ancapistan
Registered: 2010-07-12
Posts: 2,810

Re: DHCPD & No internet access for client

Have you seen this?


But whether the Constitution really be one thing, or another, this much is certain - that it has either authorized such a government as we have had, or has been powerless to prevent it. In either case, it is unfit to exist.
-Lysander Spooner

Offline

#5 2015-09-16 22:54:49

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: DHCPD & No internet access for client

Nobabs27 wrote:

By public and /24, do you mean 24 WAN IPs?
If so, then no, I do not have 24 WAN IPs allocated to me.
I am a noob is this department, hence I am trying to learn by doing.

OK, I understand. The article alphaniner linked to will probably be beneficial to you.

Everything you've posted suggests that your DHCP is working fine, however you need to readdress the "internal" side of the router to use an RFC1918 private address range (such as 192.168.1.0/24). The address range you're using now (139.96.30.0/24) is allocated to "National Electric Vehicle Sweden" aka SAAB Motor vehicles.

I would hazard a guess that your router is not Source NAT'ing the outbound traffic (which is explained in that wiki article).

Offline

#6 2015-09-18 18:11:54

Nobabs27
Member
Registered: 2014-01-25
Posts: 38

Re: DHCPD & No internet access for client

alphaniner wrote:

Have you seen this?

fukawi2 wrote:

OK, I understand. The article alphaniner linked to will probably be beneficial to you.

I have now, however it has not changed anything after adding the IPtables rules and setting the fwd thing to 1.

fukawi2 wrote:

Everything you've posted suggests that your DHCP is working fine, however you need to readdress the "internal" side of the router to use an RFC1918 private address range (such as 192.168.1.0/24). The address range you're using now (139.96.30.0/24) is allocated to "National Electric Vehicle Sweden" aka SAAB Motor vehicles.

Well, I changed everything in the config related to 139.X.X.X.X to 192.X.X.X.X, however this does not seem to do anything other than change the address that gets assigned?

fukawi2 wrote:

I would hazard a guess that your router is not Source NAT'ing the outbound traffic (which is explained in that wiki article).

How do I fix this?


Facepalm.

Offline

#7 2015-09-18 19:49:33

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: DHCPD & No internet access for client

What's your router and how is it configured?
Fixed IP or DHCP, if DHCP what IP range does it offer, the gateway, DNS servers, NAT settings ... everything.


1000

Offline

#8 2015-09-19 22:36:31

Nobabs27
Member
Registered: 2014-01-25
Posts: 38

Re: DHCPD & No internet access for client

byte wrote:

What's your router and how is it configured?
Fixed IP or DHCP, if DHCP what IP range does it offer, the gateway, DNS servers, NAT settings ... everything.

Here is my /etc/dhcpd.conf file:

option domain-name-servers 8.8.8.8, 8.8.4.4;
option subnet-mask 255.255.255.0;
option routers 192.168.1.100;
subnet 192.168.1.0 netmask 255.255.255.0 {
  interface enp3s0;
  range 192.168.1.150 192.168.1.250;
}

Or do you mean the info from the router that is providing internet access to the host?
Or do you mean something else?


Facepalm.

Offline

#9 2015-09-20 14:46:14

byte
Member
From: Düsseldorf (DE)
Registered: 2006-05-01
Posts: 2,046

Re: DHCPD & No internet access for client

> Or do you mean the info from the router that is providing internet access to the host?
Yes, from the device that's actually connected to the internet.


1000

Offline

#10 2015-09-20 22:57:33

fukawi2
Ex-Administratorino
From: .vic.au
Registered: 2007-09-28
Posts: 6,231
Website

Re: DHCPD & No internet access for client

Nobabs27 wrote:

How do I fix this?

All the information you need is contained in the wiki article previously linked.

Offline

Board footer

Powered by FluxBB