LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 03-31-2005, 07:43 PM   #1
houler
Member
 
Registered: Mar 2005
Distribution: Slackware 10.1, Kernel 2.6.14.4 (custom)
Posts: 166

Rep: Reputation: 30
Question about dhcp


Say I have a lan, and I want to run a DHCP server to give clients the ip info...What if,say like 5 people in my lan decided ro run a dhcp server, without me knowing?

so that's like 5 dhcp servers in my lan...

How would a client reach the correct dhcp server to get the correct ip info that it was intended to get?
 
Old 03-31-2005, 08:29 PM   #2
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
If you wanted, the computer addresses could be specifically assigned as per MAC Address.
 
Old 03-31-2005, 08:38 PM   #3
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 4
Posts: 4,296

Rep: Reputation: 205Reputation: 205Reputation: 205
Running a dhcp server is a root function so unless they all have root access/rights, they can't run any kind of dhcp server.
 
Old 04-01-2005, 03:10 AM   #4
fr_laz
Member
 
Registered: Jan 2005
Location: Cork Ireland
Distribution: Debian
Posts: 384

Rep: Reputation: 32
Hi

As a matter of fact, there's no way to specify which dhcp server a dhcp client should choose.
This issue can (and has) be used as a man in the middle attack technique.

I've recently heard that new cisco switches IOS included a feature that dropped dhcp responses coming from unconfigured dhcp servers (I mean, you configure the dhcp server(s) IP address(es) in the switches, and if some dhcp responses come from another IP they're dropped).
 
Old 04-01-2005, 08:36 AM   #5
daina-linux
LQ Newbie
 
Registered: Oct 2004
Posts: 3

Rep: Reputation: 0
DHCP query : not getting hostname from server

Hi
I am facing some problem with my dhcp client .
My machine is in a DHCP network.
In the DHCP server I have configured it to have an IP and hostname reserved for a specific mac address .

My machine is not updating the hostname from the DHCP server and also I am not able to resolved the name in the DNS server .

I have checked in the /etc/sysconfig/network :
NETWORKING=yes
HOSTNAME=localhost.localdomain

This is a snapshot of /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
ONBOOT="yes"
NEEDHOSTNAME="yes"
IPADDR="10.116.54.127"
NETMASK="255.255.255.0"
BROADCAST="10.116.54.255"
HOSTNAME=""
GATEWAY="10.116.54.254"
DNS_SERVER_1="10.116.54.2"


the need_hostname function is
need_hostname()
{
if [ "`hostname`" = "(none)" -o "`hostname`" = "localhost" -o \
"`hostname`" = "localhost.localdomain" ]; then
NEEDHOSTNAME=yes
else
unset NEEDHOSTNAME
fi
}


Please help me as to why my DHCP hostname is not getting set . I am getting the correct IP/ DNS serever / Gateway information .

Thanks Daina
 
Old 04-01-2005, 11:54 AM   #6
{BBI}Nexus{BBI}
Senior Member
 
Registered: Jan 2005
Location: Nottingham, UK
Distribution: Mageia 4
Posts: 4,296

Rep: Reputation: 205Reputation: 205Reputation: 205
Re: DHCP query : not getting hostname from server

Quote:
Originally posted by daina-linux
My machine is not updating the hostname from the DHCP server and also I am not able to resolved the name in the DNS server.

I have checked in the /etc/sysconfig/network :
NETWORKING=yes
HOSTNAME=localhost.localdomain

This is a snapshot of /etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE="eth0"
BOOTPROTO="dhcp"
ONBOOT="yes"
NEEDHOSTNAME="yes"
IPADDR="10.116.54.127"
NETMASK="255.255.255.0"
BROADCAST="10.116.54.255"
HOSTNAME=""
GATEWAY="10.116.54.254"
DNS_SERVER_1="10.116.54.2"
Try putting your HOSTNAME here as well.
 
Old 04-01-2005, 05:03 PM   #7
DoubleOTeC
Member
 
Registered: Aug 2003
Location: Dominica
Distribution: RedHat, FC1, FC3, FC4
Posts: 266

Rep: Reputation: 30
I'm just a bit confused...

Your interface uses DHCP....but you IP address seems to be statically set...
 
Old 04-04-2005, 01:35 AM   #8
daina-linux
LQ Newbie
 
Registered: Oct 2004
Posts: 3

Rep: Reputation: 0
I have tried by putting Hostname as blank in the ifcfg-eth0 file but it dosent help.

In the DHCP server I have reserved IP and hostname corrsponding to the MAC address .
Probably thats why you may be confused
 
Old 04-06-2005, 01:31 AM   #9
abhijeetudas
Member
 
Registered: Sep 2004
Distribution: Redhat / Fedora
Posts: 114

Rep: Reputation: 15
Hi there diana-linux,


Well can u post the contents of the
/etc/sysconfig/network
there is a very good chance that your hostname is set in that file



regards,
 
Old 04-06-2005, 01:45 AM   #10
daina-linux
LQ Newbie
 
Registered: Oct 2004
Posts: 3

Rep: Reputation: 0
the contents of /etc/sysconfig/network :
NETWORKING=yes
HOSTNAME=localhost.localdomain


if i manually do hostname "dummyname"
its is getting updated in /proc/sys/kernel/hostname and not in teh /etc/sysconfig/network

I have changed the settings in the ifcfg-eth0 file to update the DHCP/DNS with my hostname by putting
PEERDNS="yes"
DHCP_HOSTANME="dummyname"

but this is not updating teh name in DHCP

I had read somewhere that to register the name in the DNS we need to set PEERDNS to yes , still it is not happening .

Can somebody tell me when and how is the DNS server updates with the IP/hostname of client machine.

I checked in /etc/resolv.conf the nameserver name is of the correct DNS server IP.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
DHCP Server Question blood_omen *BSD 2 10-20-2005 02:48 PM
Exprt DHCP Question! ethrazahraza Linux - Networking 4 01-25-2005 04:27 PM
DHCP Question KenGr Linux - Networking 4 01-09-2005 02:44 PM
DHCP question slinkyredfoot Linux - Networking 4 09-08-2003 03:19 AM
Dhcp question mr_mandrill Slackware 2 04-01-2003 11:42 PM


All times are GMT -5. The time now is 06:24 AM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration