nixCraft Linux Forum

nixCraft

Linux Tech Support Forum

How do I configure the network card from the command line?

This is a discussion on How do I configure the network card from the command line? within the Linux software forums, part of the Linux Getting Started category; Hi, How do I configure a network card from CentOS Linux command line? TIA...


Go Back   nixCraft Linux Forum > Linux Getting Started > Linux software

Register FAQ Members List Calendar Forgotten your password? Mark Forums Read
  #1 (permalink)  
Old 06-15-2007, 11:53 PM
Member
User
 
Join Date: Jun 2005
Posts: 78
Rep Power: 0
jerry
Red face How do I configure the network card from the command line?

Hi,
How do I configure a network card from CentOS Linux command line?

TIA
Reply With Quote
Sponsored Links
  #2 (permalink)  
Old 06-29-2007, 12:00 AM
Junior Member
User
 
Join Date: Apr 2007
Posts: 4
Rep Power: 0
codekiller
Default

I do not know in CentOS, but it should still be there, you can use 'ethtool'

'man ethtool'

You can use the -s swith to set options for your nic.

Hope that helps.
Reply With Quote
  #3 (permalink)  
Old 07-02-2007, 02:55 AM
Junior Member
User
 
Join Date: Jun 2007
My distro: OpenSuSE
Posts: 5
Rep Power: 0
Feeyo is on a distinguished road
Default

hi there,

To configure your network card on centos via command line you enter the commando: "setup"
Or you can edit the file: /etc/sysconfig/network-scripts/ifcfg-eth0

Regards,
Reply With Quote
  #4 (permalink)  
Old 07-05-2007, 01:53 AM
rockdalinux's Avatar
Contributors
User
 
Join Date: May 2005
Location: Bangalore
My distro: RHEL, HP-UX, Solaris, FreeBSD, Ubuntu
Posts: 581
Rep Power: 7
rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough rockdalinux is a jewel in the rough
Default

yup, setup is great tool.

Try FAQ: Howto Red hat enterprise Linux 5 configure the network card | Frequently Asked Questions
__________________
Rocky Jr.
You may have my body & soul, but you will never touch my pride!

If you have knowledge, let others light their candles at it.

Certified to work on HP-UX / Sun Solaris / RedHat
Reply With Quote
  #5 (permalink)  
Old 09-17-2007, 04:52 PM
Junior Member
User
 
Join Date: Sep 2007
Location: Mumbai
My distro: Fedora,CentOS,Redhat,FreeBSD
Posts: 15
Rep Power: 0
aaru is on a distinguished road
Send a message via Yahoo to aaru Send a message via Skype™ to aaru
Cool

Hi All,

if you want to configure ur network card in a single command line,

do the follow,

#ifconfig eth0 192.168.0.1 netmask 255.255.255.0 (For 1st card)
#ifconfig eth1 192.168.0.2 netmask 255.255.255.0 (For 2nd card)

[OR]

#ip addr add 192.168.0.1 dev eth0
#ip addr add 192.168.0.1 dev eth1

Note:

keep in mind that, if u r using the above command it ll take immediate effect on kernel.

if u r using netconfig (or) setup utility it ll only overwrite the /etc/sysconfig/network-scripts/ifcfg-eth0 file.Then , after that u have to restart the network service like follow,

#/etc/init.d/network restart

But in ip & ifconfig command not like that.please go through the manual page of ip & ifconfig command.Most of Distro doesn't have netconfig (or) setup tool, which one presantly Redhat Have.

thanks,

aaru
Reply With Quote
Reply

Bookmarks


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 
Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On

Similar Threads

Thread Thread Starter Forum Replies Last Post
Suse Enterprise Linux server Set Network card (NIC) to Full duplex setting raj Networking, Firewalls and Security 1 03-20-2008 04:33 PM
Command line remote access angelus_kit Networking, Firewalls and Security 7 09-05-2007 07:30 PM
OpenBSD get or display network card IP address Subnet mask information rockdalinux Getting started tutorials 0 06-15-2007 11:06 PM
HP UX create or add users from command line using useradd rockdalinux HP-UX 0 12-20-2006 03:13 PM
network card not being recognized Linux software 1 01-28-2006 12:25 PM


All times are GMT +5.5. The time now is 05:01 AM.


Powered by vBulletin® Version 3.7.4 - Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.2.0

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36