HOWTO Setup a Static IP: Difference between revisions

From Research
Jump to navigation Jump to search
Mmmark (talk | contribs)
No edit summary
 
Mmmark (talk | contribs)
 
(3 intermediate revisions by the same user not shown)
Line 1: Line 1:
=== Gentoo ===
All our servers have static IP addresses because it's more fail reliable as does not depend on a DHCP server.


file: /etc/conf.d/net.eth0 (or /etc/conf.d/net if the first does not exist)
== Gentoo ==
modules=( "iproute2" )
If you want to use the iproute2 module, make sure you emerge this package or networking will fail!!
config_eth0=( "209.87.56.xxx/24" )
 
routes_eth0=( "default via 209.87.56.254" )
 
File: /etc/conf.d/net.eth0 (or /etc/conf.d/net if the first does not exist)
config_eth0=( "209.87.56.xx/24" )
routes_eth0=( "default via 209.87.56.254" )
 
If you want to set a static IP to 2 or more bonded network cards, your config would look like this:
modules=( "iproute2" )
iproute_eth0=( "null" )
iproute_eth1=( "null" )
slaves_bond0="eth0 eth1"
ipaddr_bond0=( "209.87.56.16/24 brd 209.87.56.255" )
iproute_bond0=( "default via 209.87.56.254" )
 
== SUSE Linux ==
 
Use yast.
 
== Fedora Core ==
The networking file depends which version of Fedora Core you are using.
 
Fedora Core 1:
'''/etc/sysconfig/networking/devices/ifcfg-eth0'''
 
Fedora Core 2+:
'''/etc/sysconfig/network-scripts/ifcfg-eth0'''
 
Add these values to the file and remove all dhcp settings.
IPADDR=209.87.56.xx
NETWORK=209.87.56.0
NETMASK=255.255.255.0
GATEWAY=209.87.56.254

Latest revision as of 20:46, 5 September 2006

All our servers have static IP addresses because it's more fail reliable as does not depend on a DHCP server.

Gentoo

If you want to use the iproute2 module, make sure you emerge this package or networking will fail!!


File: /etc/conf.d/net.eth0 (or /etc/conf.d/net if the first does not exist)

config_eth0=( "209.87.56.xx/24" )
routes_eth0=( "default via 209.87.56.254" )

If you want to set a static IP to 2 or more bonded network cards, your config would look like this:

modules=( "iproute2" )
iproute_eth0=( "null" )
iproute_eth1=( "null" )
slaves_bond0="eth0 eth1"
ipaddr_bond0=( "209.87.56.16/24 brd 209.87.56.255" )
iproute_bond0=( "default via 209.87.56.254" )

SUSE Linux

Use yast.

Fedora Core

The networking file depends which version of Fedora Core you are using.

Fedora Core 1: /etc/sysconfig/networking/devices/ifcfg-eth0

Fedora Core 2+: /etc/sysconfig/network-scripts/ifcfg-eth0

Add these values to the file and remove all dhcp settings.

IPADDR=209.87.56.xx
NETWORK=209.87.56.0
NETMASK=255.255.255.0
GATEWAY=209.87.56.254