LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   configuring a nic from the command line (https://www.linuxquestions.org/questions/linux-networking-3/configuring-a-nic-from-the-command-line-336783/)

barleykorn 06-24-2005 10:52 AM

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.

tangle 06-24-2005 11:32 AM

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

tangle 06-24-2005 11:35 AM

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.

barleykorn 06-24-2005 12:43 PM

FC4


All times are GMT -5. The time now is 01:02 AM.