LinuxQuestions.org
Latest LQ Deal: Latest LQ Deals
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, 07:38 AM   #1
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware, CentOS, Ubuntu
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, 08: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, 09: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, 12:51 PM   #4
NetAX
Member
 
Registered: Mar 2004
Location: Boston, MA
Distribution: SuSE Linux Open/Enterprise, Red Hat, Ubuntu
Posts: 147

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

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

Rep: Reputation: 36
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 09:18 PM.
 
Old 05-10-2006, 09:43 PM   #7
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware, CentOS, Ubuntu
Posts: 325

Original Poster
Rep: Reputation: 30
kewl! thanks so much wooohooooo
 
Old 05-10-2006, 11:43 PM   #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-10-2006, 11:59 PM   #9
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware, CentOS, Ubuntu
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, 02: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, 08:33 AM   #11
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware, CentOS, Ubuntu
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, 08: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, 08:54 AM   #13
//////
Member
 
Registered: Nov 2005
Location: Land of Linux :: Finland
Distribution: Arch Linux && OpenBSD 7.4 && Pop!_OS && Kali && Qubes-Os
Posts: 824

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

and:

cat /proc/net/arp

That works for me.
 
Old 05-11-2006, 08:56 AM   #14
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora40
Posts: 6,152

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
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, 06:33 AM   #15
kublador
Member
 
Registered: Aug 2002
Location: Philippines
Distribution: Slackware, CentOS, Ubuntu
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 04:22 PM
eth0 not getting IP address from DHCP server Venefyxatu Linux - Networking 4 05-04-2005 06:45 PM
DHCP Server MAC Address found, IP address not assigned wmburke Linux - Wireless Networking 17 11-17-2004 10:33 AM
dhcp assigned address nilbog Linux - Networking 4 04-02-2003 11:17 AM
How to find out my IP address on a DHCP IP Assigned machine? simonh Linux - Networking 2 12-10-2002 05:49 AM

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

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

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