Latest LQ Deal: Complete CCNA, CCNP & Red Hat Certification Training Bundle
Go Back > Forums > Linux Forums > Linux - Networking
User Name
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.


  Search this Thread
Old 12-01-2005, 09:39 PM   #1
LQ Newbie
Registered: May 2004
Posts: 16

Rep: Reputation: 0
gateway setting ./network-scripts/ifcfg-eth1 and ./network

What is the deal with having multiple places to change the gateway?

Please explain the difference in putting Gateway in the interface scripts and in the network file!

What happens if the network file GATEWAY is different than the scripts GATEWAY???



Old 04-29-2012, 04:27 AM   #2
Soji Antony
Registered: Jul 2010
Posts: 54

Rep: Reputation: 1
'/etc/sysconfig/network' file contains general information for all interfaces on your system. Like


However this file can be also used as a configuration file for eth0 [instead of ifcfg-eth0 when there is only one interface [NIC] on your system. For example you can remove the 'IPADDR' , 'NETMASK' & 'GATEWAY' entries from ifcfg-eth0 and add it to 'network' file

# cat /etc/sysconfig/network


After restarting the network, the above IP, netmask & gateway will be assigned to eth0.

But when you have more than one interface card, the individual interface card information's will be recorded in the file ifcfg-ethX in directory '/etc/sysconfig/network-scripts' instead. So if you have more than one NIC, then information for each NIC's will appear in separate files in the directory '/etc/sysconfig/network-scripts' with names of the form 'ifcfg-eth0' for eth0 'ifcfg-eth1' for eth1... etc


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
fedora/redhat: ifcfg-eth0 and ifcfg-eth1 Shaun2222 Linux - Networking 9 01-23-2008 03:25 PM
what is "/etc/sysconfig/network-scripts/ifcfg-eth0" its counterpart in slackware b0nd Slackware 2 10-06-2005 12:50 AM
How to change /etc/sysconfig/network-scripts/ifcfg-eth0 ariana Linux - Networking 1 05-01-2005 01:37 PM
can anyone post their /etc/sysconfig/network-scripts/ifcfg-wlan0? Dooberdoink Linux - Wireless Networking 1 03-27-2005 09:49 AM
/etc/sysconfig/network-scripts/ifcfg-ra0 Not working anymore NssOne Linux - Wireless Networking 1 02-13-2004 09:13 PM

All times are GMT -5. The time now is 05:58 PM.

Main Menu
Write for LQ is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration