LinuxQuestions.org
Review your favorite Linux distribution.
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 05-10-2006, 08:38 AM   #1
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware 10
Posts: 325

Rep: Reputation: 30
eth0 ip assigned by dhcp , how would i know the ip address of the dhcp server where..


eth0 ip assigned by dhcp , how would i know the ip address of the dhcp server where eth0 is connected?

thanks in advance
 
Old 05-10-2006, 09:26 AM   #2
Artanicus
Member
 
Registered: Jan 2005
Location: Finland
Distribution: Ubuntu, Debian, Gentoo, Slackware
Posts: 827

Rep: Reputation: 31
perhaps capture it with tcpdump? I can't think of any other way off the top of my head.
 
Old 05-10-2006, 10:09 AM   #3
gbell72
Member
 
Registered: Sep 2003
Location: Toronto, Canada
Distribution: FreeBSD
Posts: 78

Rep: Reputation: 15
You should be able to find the dhcp servers ip in /var/dhcpd/dhcpd.leases file.
 
Old 05-10-2006, 01:51 PM   #4
NetAX
Member
 
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 146

Rep: Reputation: 16
type "ifconfig eth0" on the command line and look at the broadcast address.
 
Old 05-10-2006, 05:52 PM   #5
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware 10
Posts: 325

Original Poster
Rep: Reputation: 30
thanks .. ill try all of em
 
Old 05-10-2006, 09:38 PM   #6
vimal
Red Hat India
 
Registered: Nov 2004
Location: Kerala/Pune,india
Distribution: RedHat, Fedora
Posts: 260

Rep: Reputation: 34
Hello kublador,

Check the /var/log/messages file. You will find the request for Ip from DHCP with the directive 'DHCP REQUEST', 'DHCP ACK'.. etc.. The 'DHCP REQUEST' is sent to the DHCP server. You can find the Ip from that particular line.
--------------
Sep 15 08:55:07 b5c1m4p204 dhclient: DHCPREQUEST on eth0 to \ 255.255.255.255 port 67

Sep 15 08:55:07 b5c1m4p204 dhclient: DHCPACK from 192.168.0.209
----------------

Here 192.168.0.20 is the DHCP server.


Thanks,,

Last edited by vimal; 05-10-2006 at 10:18 PM.
 
Old 05-10-2006, 10:43 PM   #7
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware 10
Posts: 325

Original Poster
Rep: Reputation: 30
kewl! thanks so much wooohooooo
 
Old 05-11-2006, 12:43 AM   #8
Amuro-Ray2020
Member
 
Registered: Aug 2004
Location: Arizona
Distribution: Linux Mint
Posts: 81

Rep: Reputation: 15
Generically speaking, you could assume that your default gateway is your DHCP server as well. That's usually (especially on cheap home use routers) where your DHCP is unless you have a dedicated computer doing it.
 
Old 05-11-2006, 12:59 AM   #9
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware 10
Posts: 325

Original Poster
Rep: Reputation: 30
yup im aware of that one but i cant seem to find a way to get the ip of the gateway or the dhcp server
 
Old 05-11-2006, 03:05 AM   #10
Amuro-Ray2020
Member
 
Registered: Aug 2004
Location: Arizona
Distribution: Linux Mint
Posts: 81

Rep: Reputation: 15
Sometimes you'll see it if you type route. If not, you can do traceroute, generally your gateway should be one of the first hops.
 
Old 05-11-2006, 09:33 AM   #11
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware 10
Posts: 325

Original Poster
Rep: Reputation: 30
yup, but im using pppoe , still no good.. please help hehe
im running slackware 10



# traceroute www.yahoo.com
traceroute: Warning: www.yahoo.com has multiple addresses; using 66.94.230.44
traceroute to www.yahoo.akadns.net (66.94.230.44), 30 hops max, 38 byte packets
1 210.x.x.x (210.x.x.x) 5.266 ms 5.863 ms 5.037 ms
2 210.y.y.y (210.y.y.y) 5.614 ms 5.570 ms 5.440 ms



# cat /var/state/dhcp/dhcpd.leases
#




# ifconfig
eth0 Link encap:Ethernet HWaddr 00:01:02:75:FE:0C
UP BROADCAST NOTRAILERS RUNNING MULTICAST MTU:1500 Metric:1
RX packets:588 errors:0 dropped:0 overruns:0 frame:0
TX packets:601 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:449566 (439.0 Kb) TX bytes:132539 (129.4 Kb)
Interrupt:3 Base address:0xb800

ppp0 Link encap:Point-to-Point Protocol
inet addr:124.x.x.x P-t-P:210.x.x.x Mask:255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:557 errors:0 dropped:0 overruns:0 frame:0
TX packets:562 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:435243 (425.0 Kb) TX bytes:113535 (110.8 Kb)




# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
210.x.x.x 0.0.0.0 255.255.255.255 UH 0 0 0 ppp0
192.168.0.0 0.0.0.0 255.255.255.0 U 0 0 0 eth1
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 210.x.x.x 0.0.0.0 UG 0 0 0 ppp0



# cat /var/log/messages | grep "DHCP"
# cat /var/log/messages | grep "dhcp"

still nothing.. please help
 
Old 05-11-2006, 09:50 AM   #12
gbell72
Member
 
Registered: Sep 2003
Location: Toronto, Canada
Distribution: FreeBSD
Posts: 78

Rep: Reputation: 15
Try, tcpdump -n -i eth0 broadcast or host your ip and not arp
 
Old 05-11-2006, 09:54 AM   #13
//////
Member
 
Registered: Nov 2005
Location: Land of Linux :: Finland
Distribution: Dual boot :: Slackware 14.1 64bit multilib | Kali linux 64bit multi lib
Posts: 192

Rep: Reputation: 42
root@debian:~#arp

and:

cat /proc/net/arp

That works for me.
 
Old 05-11-2006, 09:56 AM   #14
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Debian "Jessie"
Posts: 6,034

Rep: Reputation: 371Reputation: 371Reputation: 371Reputation: 371
Can you use www.whatismyip.com? Is this what you want to know?
Otherwise, if your dhcp server is in your modem/router, you can usually telnet, to your modem/router/dhcp server or even connect to its LAN address with your browser (eg, for mine, I do http://10.0.0.1) to find out this information.

HTH
 
Old 05-16-2006, 07:33 AM   #15
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware 10
Posts: 325

Original Poster
Rep: Reputation: 30
thanks all for the replies..
i got it now..

i viewed the files in /etc/dhclient
im using slackware 10
 
  


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 says eth0 hw address is ff:ff:ff:ff:ff:ff jameson Linux - Newbie 2 06-26-2013 05:22 PM
eth0 not getting IP address from DHCP server Venefyxatu Linux - Networking 4 05-04-2005 07:45 PM
DHCP Server MAC Address found, IP address not assigned wmburke Linux - Wireless Networking 17 11-17-2004 11:33 AM
dhcp assigned address nilbog Linux - Networking 4 04-02-2003 12:17 PM
How to find out my IP address on a DHCP IP Assigned machine? simonh Linux - Networking 2 12-10-2002 06:49 AM


All times are GMT -5. The time now is 02:11 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