LinuxQuestions.org
LinuxAnswers - the LQ Linux tutorial section.
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 06-24-2005, 10:52 AM   #1
barleykorn
Member
 
Registered: Sep 2004
Distribution: lfs
Posts: 32

Rep: Reputation: 16
configuring a nic from the command line


how do I configure the nic from the command line? Will need to set a static ip, mask, gateway, and dns servers.
 
Old 06-24-2005, 11:32 AM   #2
tangle
Senior Member
 
Registered: Apr 2002
Location: Smithville, TN
Distribution: Slackware
Posts: 1,744

Rep: Reputation: 70
What distro are you using? This matters when editing the config files.

To set up the DNS severs, edit the /etc/resolv.conf file.

You can change the setting til the next reboot buy issuing the command:
ifconfig eth0 10.10.10.1 netmask 255.255.255.0
and
route add default gw 10.10.10.254
 
Old 06-24-2005, 11:35 AM   #3
tangle
Senior Member
 
Registered: Apr 2002
Location: Smithville, TN
Distribution: Slackware
Posts: 1,744

Rep: Reputation: 70
I believe in Red Hat and other distros based on it, edit the config file /ect/sysconfig/network-scripts/eth0 (or something like that). There should be lines in that file that let you set the IP, netmask and default gateway.
 
Old 06-24-2005, 12:43 PM   #4
barleykorn
Member
 
Registered: Sep 2004
Distribution: lfs
Posts: 32

Original Poster
Rep: Reputation: 16
FC4
 
  


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
configuring video settings from command line stannnn Linux - Newbie 1 06-19-2005 04:33 PM
NIC driver help command line nutthick Linux - Newbie 13 11-06-2004 06:05 PM
Command to output file content line by line aznluvsmc Programming 2 09-12-2004 07:45 PM
configuring video hardware from command line redbeansnrice Linux - Hardware 1 09-02-2004 05:51 PM
Configuring peripherals from command line DoubleLetter Linux - General 1 04-20-2003 07:37 AM


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

Main Menu
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
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration