DHCP on RED or GREEN!

NethServer Version: NethServer release 7.2.1511 (rc2
Module: DHCP

Having some trouble on how to config this.

My ISP is using DHCP to handout IP.
on my first install.i’m receiving 192.168.0.163

I would like to use my local network with 10.10.0.1 starting.

Nethserver says you can 't use DHCP on to NIC ???
How to make this work ?

Where is written this?

For RED you can acquire IP from your ISP if you set this interface as DHCP.
You can do this during installation (NethServer interactive installation or NethServer unattended installation) or after (Configuration → Network).

For GREEN you can provide IP for your LAN clients if you set this in DHCP Server section (Configuration → DHCP → DHCP Server).

http://docs.nethserver.org/en/v7rc/dhcp.html
http://docs.nethserver.org/en/v7rc/installation.html#install-modes

If you use virtualization, check how your NS VM is connected to the host.

ThX

I will try it again this weekend or so.

1 Like

Can you explain a bit more how your situation exactly is? Do you have a router in front of your NethServer?
You can check what your exernal ip address is by opening your browser and go to http://whatismyip.com

in other words:
Is you situation like this:

Internet - (external IP address) Modem/Router (Internal address)- (RED interface) NethServer (Green interface)

or

Internet - Modem - (External IP address on RED) NethServer (Internal IP address on Green)

rom your story I think it is the first one and in that case you don’t get the IP address 192.168.0.163 not from your ISP but from your modem/router. You are doing ‘double NAT’ (and that is not bad)

In that case, your RED interface is like @GG_jr correctly mentioned a DHCP client and your Green interface needs to be configured as DHCP server.

You want NethServer to distribute IP addresses to other divices on your network. Be aware that your Green interface must be in a different subnet than your RED interface:
Your RED interface has an IP address of 192.168.0.163. So it is in the subnet 192.168.0.0 with a subnetmask of 255.255.255.0 (or /24, which is the same)
You must choose a different subnet for GREEN. For instance, 192.168.1.0 /24. The IP address for your GREEN interface can be any IP between 192.168.1.0 and 192.168.1.254. Let’s go for the first available IP address: 192.168.1.0
Your GREEN interface is the Default Gateway for all your devices on your network.
Now configure DHCP on your Green interface. Add a DHCP scope. It is a good habit to leave some room for devices with a fixed IP. See picture how a scope could be created in your situation:

Don’t forget to hit the HELP button. It explains in detail what every option is for:

2 Likes

Have DHCP on red (because ISP uses it.
Now on green Static starting 10,10,0,1

What to use in GW IP and DNS ?

You would normally pick a static address for the Green interface, say 10.10.0.254. Your DHCP range would then be in the same subnet as that, but NOT include that IP.

By default, if you then leave the remainder of the parameters blank, when NS hands out an IP, it will use the IP of the Green interface for all those parameters.

Cheers.

No you don’t have DHCP (server) on RED. Your NethServer might be a DHCP CLIENT on RED, but not DHCP Server. You only have DHCP (Server) on Green.

When you want NethServer to be the Gateway of your network, the IP address of your Green interface is the GW of your Local Network
For your Local Network, your NethServer can be a DNS server (using the DNS service of Samba or the DNS module, IF you have them installed. If you don’t have any services on your network like a webserver, you don’t need an authoritive DNS server on your network(I know this might be too high level, so don’t feel embarrassed if you don’t understand this) ). For resolving addresses on the internet, you can use any DNS server. Be it the DNS server(s) of your ISP, the Google public DNS servers or OpenDNS. For a list of options see http://www.online-tech-tips.com/cool-websites/free-dns-server/

Let me first ask: how many network cards does your NethServer have?

If you want to use NethServer as a Firewall and Gateway on your network, you need at least 2 Network interfaces.

1 External interface (RED) which connects to your Modem/Router
and 1 Green interface wich connects to the rest of your network.

Most of the time your Green interface connects to a switch so you can connect other devices and create your local network.

I made a small network design that reflects (or better should reflect) your situation. If your situation is different, please say so, because I have the feeling you do have a different setup.

One more thing: Do you use WiFi on your network? And what devices give you WiFi?
Can you give the brand and type of the device your ISP provided you with? (yeah I know, that’s 2 more things :wink: )

1 Like

I have 2 NIC in the nethserver

Like you state i use The RED with DHCP Client. And in the green the DHCP Server

The Hardware from my ISP is a modem/router
The further plan for my network is to attach a Linksys managed switch …

Just to be absolutely clear:
In your case you get an external IP ddress from your ISP. That is an IP address that is connecting your home network to the internet, and if needed is the IP address you need to get to services hosted on your local network.

Then you have the internal IP address. This is the gateway for your NethServer RED interface. You have configured RED as DHCP client, so this will be assigned automatically. Personally I would go with a fixed IP address for RED if you have services running on NethServer that must be accessible from outside your Local network.

Finally the Green interface. This must be a fixed IP address and must be on another subnet than your RED interface.
You have 192.168.0.0/24 as subnet for your RED interface. You mentioned 10.10.0.0/24 as subnet for your Local network. This is completely fine since this is a private network range.

Now the IP address for your Green interface. You can choose any IP address in the chosen subnet. So, any IP address between 10.10.0.1 and 10.10.0.254 is good. I would go with the first available: 10.10.0.1. The IP address of the Green interface will be the Default gateway for your local network.

2nd Step to configure is DHCP on your NethServer, so NethServer can have the role as DHCP server.
It is a good habit to leave the lower IP addresses reserved for fixed IP addresses on your network. Think of a printer, an accesspoint for WIFi, a managed switch etc…
Go in server manager to DHCP and set DHCP active on you Green interface. The scope of your DHCP range (the first to the last ip address that DHCP may give to clients) can be as you showed in your picture, but then you use up all the IP addresses in your subnet for DHCP. For a home situation there is absolutely no need for so many IP addresses, and as I said before, you might want to reserve some addresses for fixed IP addresses.
So my suggestion would be to choose as start address: 10.10.0.50 and as end address 10.10.0.200
The idea is to have all your fixed IP addresses in the first 50 and if you ever want to play with Virtualbox or another virtualization solution, you have the addresses 201 - 254 to use for virtual machines. This is A option, you can choose any option you want as long you keep your fixed IP addresses separated from the DHCP scope.

I tried to explain as simple as possible. If you have any questions just ask.

4 Likes

This i a really good answer.
Thanx 4 the the extented explanation.
WIl try this setup this weekend.

1 Like

Ok, got it running like it should now i guess.
When i check in console, there are some messages which i don 't get

Probing or server down: NAS.hopto.org > gateway [TCP 10.10.0.71:9006 > 192.168.0.1:50677 [proto: 0/Unknown][1/0 pkts][97/0 bytes][ACK FIN PUSH]]
Dec 10 04:14:17 nethserver ntopng: 1481339657|1|3|10|Probing or server down: NAS.hopto.org > gateway [TCP 10.10.0.71:9006 > 192.168.0.1:50678 [proto: 0/Unknown][1/0 pkts][97/0 bytes][ACK FIN PUSH]]
Dec 10 04:14:18 nethserver ntopng: 1481339658|1|3|10|Probing or server down: NAS.hopto.org > gateway [TCP 10.10.0.71:9006 > 192.168.0.1:50677 [proto: 0/Unknown][1/0 pkts][97/0 bytes][ACK FIN PUSH]]
Dec 10 04:14:18 nethserver ntopng: 1481339658|1|3|10|Probing or server down: NAS.hopto.org > gateway [TCP 10.10.0.71:9006 > 192.168.0.1:50678 [proto: 0/Unknown][1/0 pkts][97/0 bytes][ACK FIN PUSH]]
Dec 10 04:14:24 nethserver ntopng: 1481339664|1|3|10|Probing or server down: NAS.hopto.org > gateway [TCP 10.10.0.71:9006 > 192.168.0.1:50705 [proto: 0/Unknown][1/0 pkts][97/0 bytes][ACK FIN PUSH]]
Dec 10 04:14:25 nethserver ntopng: 1481339665|1|3|10|Probing or server down: NAS.hopto.org > gateway [TCP 10.10.0.71:9006 > 192.168.0.1:50705 [proto: 0/Unknown][1/0 pkts][97/0 bytes][ACK FIN PUSH]]
Dec 10 04:14:25 nethserver ntopng: 1481339665|1|3|10|Probing or server down: NAS.hopto.org > gateway [TCP 10.10.0.71:9006 > 192.168.0.1:50709 [proto: 0/Unknown][1/0 pkts][97/0 bytes][ACK FIN PUSH]]
Dec 10 04:14:25 nethserver ntopng: 1481339665|1|3|10|Probing or server down: 139.162.58.106 > nethserver.hopto.org [TCP 139.162.58.106:38814 > 192.168.0.219:6379 [proto: 0/Unknown][1/0 pkts][60/0 bytes][SYN

IS this normal ??

Please share how you exactly configured your networking. (screenshots of networking and dhcp config would do it)

I 've got this 4 now

almost perfect. since your green interfacehas an ip address of 10.10.0.254 you should end your dhcp scope at 253. yes it is a small chance that dhcp gives out that last ip address, but better safe than sorry.

OK, so changed this on the DHCP server.

ThQ