home   |   about us   |   our network   |   services   |   affiliates   |   contact
 
Services
» Web Hosting
» Reseller Hosting
» Dedicated Servers
» Windows/ASP.net Hosting
» Managed Web Hosting
» Server Security / Auditing
» Remote Backup / Storage
» Linux VDS
» Windows VDS
 
Support
» Support Desk
» Client Login
» Forums
» FAQs
» Help Files
» Acceptable Use Policy
» Client Testimonials
» Blog
 
Tutorials
» Dedicated Server Tutorial
» Website Optimization
» Search Engine Optimization
» Web Hosting Tutorials
» Web Programming Tutorials
» Networking Tutorials
» Virtual Server Tutorials
» Resources

The Crucial Blog

February 25, 2008

Configuring Network Interfaces on CentOS, Redhat, Fedora Core, and Debian

/Red Hat/:

The network configuration files are in the folder:
‘/etc/sysconfig/network-scripts’

The files for the interfaces will be ifcfg-eth0, ifcfg-eth1, ifcfg-eth0:0 (if there are sub-interfaces)

Static IP address configuration:
——————–
[root@sXXX network-scripts]# cat ifcfg-eth0
# Intel Corporation 82573L Gigabit Ethernet Controller
DEVICE=eth0
BOOTPROTO=static
HWADDR=YY:YY:YY:YY:YY
BROADCAST=XXX.XXX.XXX.XXX – specify the broadcast address here
IPADDR=xx.xx.xx.xx – specify the IP address here
NETMASK=255.255.255.0 – specify the netmask here
ONBOOT=yes
TYPE=Ethernet
———————-

Please specify ‘ONBOOT=yes’ which will activate the interface upon system boot

Dynamic IP address configuration: Change BOOTPROTO value to dhcp
——————–
[root@sXXX network-scripts]# cat ifcfg-eth0
# Intel Corporation 82573L Gigabit Ethernet Controller
DEVICE=eth0
BOOTPROTO=dhcp
ONBOOT=yes
TYPE=Ethernet
———————-

To bind a range of IP address, create a file called ifcfg-eth0-range0 (for example eth0:0, eth0:1, etc)

The entries should be:

——————————-
IPADDR_START=192.168.0.10
IPADDR_END=192.168.0.20
CLONENUM_START=0
NETMASK=xxx.xxx.xxx.xxx
——————————–

IPADDR_START: This is the first IP from the address range you want to bind to your ethernet device.
IPADDR_END: This is the last IP from that address range.
CLONENUM_START: This is the number that will be assigned to the first IP alias interface. For instance, if your Internet interface is eth0 and CLONENUM_START is 0, then this config file will create 10 interfaces starting with eth0:0 (eth0:0, eth0:1, eth0:2 etc) and ending with eth0:10.

The gateway for the network can be specified in the file ‘/etc/sysconfig/network’
——————————-
=yes
HOSTNAME=hostname
GATEWAY=”XXX.XXX.XXX.YYY”
———————————
Once you assign the IP addresses and configure the gateway please restart the service network ‘/etc/init.d/network restart’

You may also use ‘/usr/sbin/system-config-network-tui’ to configure the network interfaces

:
In Debian the interface configuration file is ‘/etc/network/interfaces’

The entires are:
———————————
auto lo
iface lo inet loopback

auto eth0
iface eth0 inet static
address xxx.xxx.xxx.xxx
netmask yyy.yyy.yyy.yyy
broadcast xxx.xxx.xxx.xxy
network xxx.xxx.xxx.xxz
gateway xxx.xxx.xxx.xxw
———————————

After you configure the network interfaces restart the network service using ‘/etc/init.d/networking restart’

Tags: , , , ,

Filed under: Uncategorized by — aaron @ 12:01 am


Leave a Reply



     

Quick Links: Debian Dedicated Servers, Direct Deposit Hosting, Unmetered Dedicated Servers, Virtual Dedicated Servers, Windows Server Management, High Traffic Web Hosting - Load Balanced Clusters, Windows 2008 Server Virtual Dedicated Servers