LinuxQuestions.org
Help answer threads with 0 replies.
Home Forums Tutorials Articles Register
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 09-01-2009, 05:59 AM   #1
tonypap1
LQ Newbie
 
Registered: Sep 2009
Posts: 6

Rep: Reputation: 0
ifconfig


Hello. Is it possible to check which network interface cards are DHCP enabled by using the 'ifconfig' command ??

Are there differences in ifconfig's output depending on which flavour/os level of Linux ?

Thanks
 
Old 09-01-2009, 07:46 AM   #2
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
Is it possible to check which network interface cards are DHCP enabled by using the 'ifconfig' command ??
No.
You need to look at how your networking is started, and that varies between distros, and you haven't told us what yours is, so we can't tell you where to look.
Quote:
Are there differences in ifconfig's output depending on which flavour/os level of Linux ?
No. But I'm not checking 800+ distros to check for you!

Welcome to LQ!
 
Old 09-01-2009, 08:55 AM   #3
tonypap1
LQ Newbie
 
Registered: Sep 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tredegar View Post
No.
You need to look at how your networking is started, and that varies between distros, and you haven't told us what yours is, so we can't tell you where to look.

No. But I'm not checking 800+ distros to check for you!

Welcome to LQ!
I'm on Red Hat Enterprise 4. Any ideas ??

Thanks
 
Old 09-01-2009, 09:10 AM   #4
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
RHEL 4 ? That's old I think.

Anyway, see here: http://www.redhat.com/docs/manuals/e...rk-config.html

If you don't want to use the GUI then the main network configuration files seem to be:
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth*
/etc/hosts


If you make changes to these files (as root) you'll need to restart networking for the changes to be recognised. RH does that like this (as root):
service network restart

What are you trying to do?
 
Old 09-01-2009, 10:01 AM   #5
tonypap1
LQ Newbie
 
Registered: Sep 2009
Posts: 6

Original Poster
Rep: Reputation: 0
Quote:
Originally Posted by tredegar View Post
RHEL 4 ? That's old I think.

Anyway, see here: http://www.redhat.com/docs/manuals/e...rk-config.html

If you don't want to use the GUI then the main network configuration files seem to be:
/etc/sysconfig/network
/etc/sysconfig/network-scripts/ifcfg-eth*
/etc/hosts


If you make changes to these files (as root) you'll need to restart networking for the changes to be recognised. RH does that like this (as root):
service network restart

What are you trying to do?
Write a script that logs onto a large number of Linux servers (varying releases/versions) and detects each NIC's configuration (ie DHCP/Static).

The logging on and running command part is easy. Just need to know any commands, files or processes that I can analyse to tell me each NIC's setting.
 
Old 09-01-2009, 12:33 PM   #6
tredegar
LQ 5k Club
 
Registered: May 2003
Location: London, UK
Distribution: Fedora38
Posts: 6,147

Rep: Reputation: 435Reputation: 435Reputation: 435Reputation: 435Reputation: 435
Quote:
Write a script that logs onto a large number of Linux servers (varying releases/versions) and detects each NIC's configuration (ie DHCP/Static).
OK.
Now I begin to understand your Q.

But "writing a script" is going to be difficult if you have different distros and different releases. "How things are done" in linux is changing all the time, and networking with RH (and derivatives) is very different from networking with Debian (and derivatives).

Why don't you just ask your DHCP server which NICs are asking it for a lease? Those will be the ones configured to use dhcp.
Edit - there's no need to quote all my previous post, it's right there.
/Edit

Last edited by tredegar; 09-01-2009 at 12:34 PM.
 
  


Reply



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
Why "-bash: ifconfig : command not found" when typing "$ifconfig" dangdtvn Linux - Server 9 09-20-2013 06:01 AM
connecting /sbin/ifconfig to bash command ifconfig flammable2 Fedora 4 11-12-2005 07:58 AM
Ifconfig Eugney Slackware 6 07-07-2005 02:08 PM
Where has ifconfig gone? Wynand1 Mandriva 4 04-15-2005 02:58 AM
Ifconfig mrodriguez Linux - Newbie 2 02-16-2005 12:17 PM

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

All times are GMT -5. The time now is 12:29 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
Open Source Consulting | Domain Registration