LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-01-2011, 08:13 AM   #1
YD_87
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Rep: Reputation: Disabled
how to know the Gateway address of DHCP client.


Hi Friends,

I am new to linux. is any way to know the gateway ip from DHCP assigned cent os machine? i knew one way i.e. from resolve.conf. but this is not useful in my case becoz am changing that ip with DNS ip.




YD.
 
Old 11-01-2011, 08:17 AM   #2
Bfresh
LQ Newbie
 
Registered: Feb 2011
Posts: 5

Rep: Reputation: 1
Hi,

You can run the 'route' command to print the current default gateway.
 
Old 11-02-2011, 04:39 AM   #3
YD_87
LQ Newbie
 
Registered: Nov 2011
Posts: 2

Original Poster
Rep: Reputation: Disabled
Hi Bfresh

Thanxs for your reply. but i am using two interface machine. suppose eth0 have static ip with default route and eth1 have DHCP ip. so how to know the gateway ip of eth1 which having DHCP ip and not a default gateway?



YD.
 
Old 11-02-2011, 08:09 AM   #4
Bfresh
LQ Newbie
 
Registered: Feb 2011
Posts: 5

Rep: Reputation: 1
The route command should show output for all interfaces, including those which are DHCP enabled. DHCP enabled interfaces also get assigned a default gateway.

You could post the output of your route command, if you require assistance reading it.
 
  


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
[SOLVED] dhcp-client get assigned a network address instead of a regular IP address kenneho Linux - Networking 3 11-27-2009 03:43 AM
Force DHCP To Refuse Clients A DHCP Lease Depending On Client MAC Address blackfish Linux - Server 3 08-17-2007 12:54 AM
How do I get the gateway IP from a DHCP client machine? aquadrop Linux - Networking 1 05-18-2007 03:56 AM
DHCP client not assigning gateway address zegenie Linux - Networking 3 11-30-2006 04:32 PM
DHCP client not assigning gateway address zegenie SUSE / openSUSE 1 11-29-2006 06:45 AM


All times are GMT -5. The time now is 06:08 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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration