Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] manual DHCP request
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
doublehp
Guru
Guru


Joined: 11 Apr 2005
Posts: 473
Location: FRANCE

PostPosted: Mon Dec 24, 2012 3:31 am    Post subject: [SOLVED] manual DHCP request Reply with quote

Hello.

I want to perform a DHCP querry manually. I want to simulate a DHCP request to a specific DHCP server, but not use any of the returned values.

dhclient -n should theoretically do it using the ISC client, but in practice, the command does not work for me. So I need any alternative to do it. Netcat scripts are welcome. Never used it, no clue where to start. Other approches accepted.

I want to check the DNS. But not use them at once. The IP of DHCP server is fixed and known.

Thanks.
_________________
DEMAINE Benoît-Pierre (aka DoubleHP ) http://www.demaine.info/
>o_/ Coin coin coin \_o<
to contact me (MSN,ICQ, JABBER, Skype ... ) http://benoit.demaine.info/contact.png


Last edited by doublehp on Thu Jan 03, 2013 5:17 pm; edited 1 time in total
Back to top
View user's profile Send private message
Ant P.
Watchman
Watchman


Joined: 18 Apr 2009
Posts: 6920

PostPosted: Mon Dec 24, 2012 3:43 am    Post subject: Reply with quote

dhcpcd has a "--test" option, which should do what you want.
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Thu Jan 03, 2013 12:43 pm    Post subject: Reply with quote

You don't generally do a full DHCP transaction to a specific server - the only time DHCP unicasts is during the RENEW phase.
Otherwise, as said above, dhcpcd --test should fill your needs.
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
doublehp
Guru
Guru


Joined: 11 Apr 2005
Posts: 473
Location: FRANCE

PostPosted: Thu Jan 03, 2013 5:17 pm    Post subject: Reply with quote

Yes, dhcpcd --test could do it, but on the machine where I need it, i can't install dhcpcd. I have found an other way to do it, via heavily altering the conf files /etc/dhcpcd.conf and friends.
_________________
DEMAINE Benoît-Pierre (aka DoubleHP ) http://www.demaine.info/
>o_/ Coin coin coin \_o<
to contact me (MSN,ICQ, JABBER, Skype ... ) http://benoit.demaine.info/contact.png
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum