User avatar
JonnyAlpha
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 570
Joined: Sat Nov 02, 2013 2:06 pm

RPI Acting as unwanted DHPC Server

Sun Nov 02, 2014 12:13 pm

Hi, I switched on my Pi this morning and then went into my garage only to find that my garage PC can't get into the internet.
After some pinging and running ipconfig I found that the IP address for DHPC server for my garage PC was the IP address of the RPI and not my BT Home Hub. I didn't know the RPI was a DHPC server how do I stop this?
RPI is connected via Ethernet to my Home Hub, the garage is connected via a Power line plug.
Raspberry Pi Certified Educator. Main Hardware - Raspberry Pi 1 model B revision 2, Raspberry Pi 2 model B, Pi Camera

User avatar
Richard-TX
Posts: 1549
Joined: Tue May 28, 2013 3:24 pm
Location: North Texas

Re: RPI Acting as unwanted DHPC Server

Sun Nov 02, 2014 12:29 pm

run this as root

apt-get remove dhcpd
Richard
Doing Unix since 1985.
The 9-25-2013 image of Wheezy can be found at:
http://downloads.raspberrypi.org/raspbian/images/raspbian-2013-09-27/2013-09-25-wheezy-raspbian.zip

drgeoff
Posts: 10676
Joined: Wed Jan 25, 2012 6:39 pm

Re: RPI Acting as unwanted DHPC Server

Sun Nov 02, 2014 12:37 pm

1. Are you confusing DHCP server and Domain Name Server (DNS)?

2. Would help if you hadn't kept the RPi's OS a secret but AFAIK none of the common ones have a DHCP or DNS server running by default. In which case either you have manually enabled, installed something which has enable dit it or something is awry with the RPi.

Humour us by powering down the RPi and rebooting the garage PC. Can it access the internet? Power up the RPi, wait a bit then reboot the garage PC again. Can it no longer access the internet?

asandford
Posts: 1998
Joined: Mon Dec 31, 2012 12:54 pm
Location: Waterlooville

Re: RPI Acting as unwanted DHPC Server

Sun Nov 02, 2014 2:26 pm

The BT HH should be the (only) DHCP server on your network.

It sounds like the leases on both you Pi and PC had expired and the PI got the address the PC had before.
3 of my 4 Pis regularly change addresses as they assigned by DHCP, the other has a fixed address (outside the DHCP range).

Raspbian doesn't have the dhpc server installed by default.

User avatar
DougieLawson
Posts: 38883
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: RPI Acting as unwanted DHPC Server

Sun Nov 02, 2014 2:32 pm

Richard-TX wrote:apt-get remove dhcpd
The server may be isc-dhcp-server so apt-get purge isc-dhcp-server.

Also he may have tried to install dhcpcd as a replacement for isc-dhcp-client and missed by one char. That's a move I do because the stock Raspbian version of isc-dhcp-client has a memory leak.
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

User avatar
JonnyAlpha
Raspberry Pi Certified Educator
Raspberry Pi Certified Educator
Posts: 570
Joined: Sat Nov 02, 2013 2:06 pm

Re: RPI Acting as unwanted DHPC Server

Sun Nov 02, 2014 9:52 pm

The Pi was running a Jasper image which I think is Raspian.
I havent installed anything and I'll check again tommorow.

But thanks for the replies.
Raspberry Pi Certified Educator. Main Hardware - Raspberry Pi 1 model B revision 2, Raspberry Pi 2 model B, Pi Camera

lewis-mj
Posts: 4
Joined: Mon Nov 03, 2014 4:34 pm

Re: RPI Acting as unwanted DHPC Server

Wed Nov 05, 2014 11:44 am

Hi,

It is worth familiarising yourself with DHCP, DNS and BIND at least the high level ideas. I found package 'dnsmasq' to be ideal as its an easy to configure setup that will allow you to
i) run dhcp server
ii) forward and provide nameserver to Pi's on the network.

In my setup, I had one Pi as the master running dhcp on eth0 the ethernet port and wlan0 with wireless lan connection. The documentation on 'dnsmasq' is very straightforward and if you google 'debian internet gateway' there is a tutorial where you can modify a very simple ipTables shell script that would allow your Pi to act as internet gateway for the others on the network. (I did this setting up a simple Hadoop cluster.)

Return to “Advanced users”