LinuxQuestions.org
Visit Jeremy's Blog.
Home Forums Tutorials Articles Register
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 06-17-2007, 02:31 AM   #1
zomane
Member
 
Registered: Sep 2005
Location: Austria
Distribution: Debian, CentOS, OpenBSD, FreeBSD
Posts: 52

Rep: Reputation: 16
dhclient, defaul gw, interface


Hello.
I trying to wrote my own dhclient.conf, because I dont want dhcp to write default gw in my routing table(I already have default gw from my pppoe connection) and I want from dhclient to send request only to one of my intefaces(eth2) because I have my own dhcp server(listen on eth0) .
In man dhclient.conf I find option "interface "string";" is this is the place that I can tell to dhclient " send requests only trough eth2 ", but this not serious problem because as I already say my dhcp server listens only on eth0 and maybe in its options is possible to tell him rejecting requests from dhclient that running on the same machine.

Thanks.
P.S.
I fix mi interface problem ( maybe)
# If you want dnsmasq to listen for DHCP and DNS requests only on
# specified interfaces (and the loopback) give the name of the
# interface (eg eth0) here.
# Repeat the line for more than one interface.
interface=eth0
# Or you can specify which interface _not_ to listen on
except-interface=lo
But default gw problem stays.

Gahhh, rpoblem with interface stays
dhclient
Internet Systems Consortium DHCP Client V3.0.4
Copyright 2004-2006 Internet Systems Consortium.
All rights reserved.
For info, please visit http://www.isc.org/sw/dhcp/

Listening on Socket/eth0
Sending on Socket/eth0
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 13
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 7
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 19
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 10
DHCPDISCOVER on eth0 to 255.255.255.255 port 67 interval 6
No DHCPOFFERS received.
No working leases in persistent database - sleeping.

Last edited by zomane; 06-17-2007 at 02:59 AM.
 
Old 06-17-2007, 03:13 AM   #2
rossonieri#1
Member
 
Registered: Jun 2007
Posts: 359

Rep: Reputation: 34
hi zomane,

in dhcpd.conf sample - you'll find how to write it.
for simplicity -- just dont add a option-router (default-gateway) line.

HTH.
 
Old 06-17-2007, 03:39 AM   #3
zomane
Member
 
Registered: Sep 2005
Location: Austria
Distribution: Debian, CentOS, OpenBSD, FreeBSD
Posts: 52

Original Poster
Rep: Reputation: 16
Thanks but... "The dhcpd.conf file contains configuration information for dhcpd, the
Internet Systems Consortium DHCP Server." This is from man dhcpd.conf

I have my own dhcp server (dnsmasq), but I want to modify dhclient.conf this is the config of the ISC dhcp client .
I want to tell to dhclient : dont write to routing table default gw and use eth2 for discovery and requests .
I see in some samples of dhclient.conf like this http://www.bind9.net/dhclient.conf option router but this is in lease section.
 
Old 06-17-2007, 08:30 AM   #4
rossonieri#1
Member
 
Registered: Jun 2007
Posts: 359

Rep: Reputation: 34
hi,

OK - from this you seem to be able to do that.

just try to insert # on the option router,
and change the interface on eth2.

since i havent try this - will it be overwritten by dhcpd.conf?
post me the news

HTH.
 
Old 06-19-2007, 01:36 AM   #5
zomane
Member
 
Registered: Sep 2005
Location: Austria
Distribution: Debian, CentOS, OpenBSD, FreeBSD
Posts: 52

Original Poster
Rep: Reputation: 16
Because my problems with dhclient are part of something bigger . I abandoned experiments (for now) with dhclient and using "dhcpcd -d -o -R -Y -N -G eth2"(works great).
Thanks for ideas.
 
  


Reply



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
Dhclient - Second interface? kellinjar Linux - Networking 4 09-26-2006 07:08 PM
my defaul virtual host doesnt work laeeq38 Linux - Newbie 1 07-21-2006 06:50 PM
How to declare a defaul argument in my function? bigapple Programming 3 08-11-2005 10:27 PM
How to set defaul UMASK 037 sbrewer Linux - Software 2 09-15-2004 12:26 PM
Reverting back the defaul Ownerships anand Linux - Security 1 05-04-2001 04:47 AM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 12:52 PM.

Main Menu
Advertisement
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
Open Source Consulting | Domain Registration