nixCraft Linux Forum

nixCraft

Linux / UNIX 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

Linux answers from nixCraft.


Linux software General questions and discussion about Redhat/Fedora Core/Cent OS, Debian and Ubuntu Linux related to softwares should go here.

Reply

 

LinkBack Thread Tools Display Modes
  #1 (permalink)  
Old 15-06-2007, 10:53 PM
Senior Member
User
 
Join Date: Jun 2005
Posts: 137
Thanks: 21
Thanked 4 Times in 3 Posts
Rep Power: 5
jerry is on a distinguished road
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
  #2 (permalink)  
Old 28-06-2007, 11:00 PM
Junior Member
User
 
Join Date: Apr 2007
Posts: 4
Thanks: 0
Thanked 0 Times in 0 Posts
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 02-07-2007, 01:55 AM
Junior Member
User
 
Join Date: Jun 2007
OS: OpenSuSE
Posts: 5
Thanks: 0
Thanked 0 Times in 0 Posts
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 05-07-2007, 12:53 AM
rockdalinux's Avatar
Is that all you got?
User
 
Join Date: May 2005
Location: Planet Vegeta
OS: Redhat
Posts: 708
Thanks: 15
Thanked 19 Times in 18 Posts
Rep Power: 10
rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light rockdalinux is a glorious beacon of light
Default

yup, setup is great tool.

Try FAQ: Howto Red hat enterprise Linux 5 configure the network card | Frequently Asked Questions
__________________
Rocky Jr.
What's wrong? I hope I am not making you uncomfortable...

Never send a boy to do a mans job.
Reply With Quote
  #5 (permalink)  
Old 17-09-2007, 03:52 PM
Junior Member
User
 
Join Date: Sep 2007
Location: Mumbai
OS: Fedora,CentOS,Redhat,FreeBSD
Posts: 15
Thanks: 0
Thanked 0 Times in 0 Posts
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


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 Off


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 20-03-2008 03:33 PM
Command line remote access angelus_kit Networking, Firewalls and Security 7 05-09-2007 06:30 PM
OpenBSD get or display network card IP address Subnet mask information rockdalinux Getting started tutorials 0 15-06-2007 10:06 PM
HP UX create or add users from command line using useradd rockdalinux HP-UX 0 20-12-2006 02:13 PM
network card not being recognized Linux software 1 28-01-2006 11:25 AM


All times are GMT +5.5. The time now is 08:33 AM.


Powered by vBulletin® Version 3.8.5 - Copyright ©2000 - 2010, Jelsoft Enterprises Ltd.
Search Engine Optimization by vBSEO 3.3.2
©2005-2010 nixCraft. All rights reserved

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 37 38