LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How do I find out DHCP Client list and monitor traffic? (https://www.linuxquestions.org/questions/linux-networking-3/how-do-i-find-out-dhcp-client-list-and-monitor-traffic-447851/)

Unicron 05-23-2006 05:01 PM

How do I find out DHCP Client list and monitor traffic?
 
Im fairly new to linux in general and recently set up a ubuntu server for my house network as our Router was playing up. Everything is working perfectly but I want to add some extra monitoring, nothing intrusive, just some stats basically.

The server machiine has just the basic server install on it, so theres no GUI and so I will need a command line solution (I think, Im still a bit hazy in this area).

On the ubuntu server I have set up a dhcp server and IP masquerading and basically what I want to do is be able to see who is connected to the server, Im not sure if I will only be able to see only the clients that have been assigned via the dhcp server or all connected clients.

Also I would like to be able to see how much traffic is being directed to each client. Similar to the bandwidth monitor but I want it to show the destination of the traffic, not just the traffic on the interfaces on the server.

Thanks in advance, sorry if any of it it unclear just reply and I'll try and clear it up :)


Uni

pljvaldez 05-23-2006 05:10 PM

I can't help too much, but you should be able to see the leases in the dhcpd.leases file (don't remember where it resides off the top of my head, but I'd assume in /etc/dhcpd directory)...

Unicron 05-23-2006 05:18 PM

Thanks yeah I found it in the /var/lib/dhcp3/ directory. Its not the best format but its a great deal better than running round the house and seeing which lights are lit up on the switches :)

pljvaldez 05-23-2006 05:26 PM

I don't think that will give you static clients (unless they're static DHCP clients) though. Maybe something with nmap?

Unicron 05-23-2006 05:35 PM

YAY!! nmap shows both DHCP and static client addresses :D
Thankyou very much thats very helpful :D

Now does anyone know of a good (preferably simple) traffic monitor?

Uni

pljvaldez 05-23-2006 05:47 PM

After a little google and apt-cache searching, I think you're probably looking for ethereal, etherape, or jnettop.

Note I've never used any of these, but the screenshots all seem to show origination and destination IP's.

I also saw something called mrtg, but having not done this type of work, I'm shooting in the dark here...

Unicron 05-23-2006 06:21 PM

jnettop using the right flags (jnettop -i eth2) gives me the data I need. Can be a little hard to follow at times but I can definately follow it and monitor what I wanted.

I saw ettercap and ethereal in a google too but when I tried to install the packages it mentioned dependancies that had Gnome and X in too and so I wasnt sure if it would try to install X and Gnome on the server which I really didnt want it to do as I thought it might compromise the performance of the server as its my old machine (I could be totally wrong here though).

Thanks for your quick and informative replies pljvaldez they are most appreciated!!! I owe you a beer :)

Uni


All times are GMT -5. The time now is 08:26 AM.