|
Personal tools |
|
|
/User Guide/Networking
From AnnvixConfiguring Networking The initial network configuration in Annvix is done via the installer and is quite simple. However, if you need to make changes to the network post-install, or if you wish to configure an additional network adapter, there are no tools to ease the configuration. However, there are only a few configuration files that need to be modified or created and the process is quite simple. Site-wide configuration that impacts all interfaces is done via the /etc/sysconfig/env/network environment directory. This directory contains exactly two files: HOSTNAME and GATEWAY. Per-device configuration uses traditional configuration files, similar to Mandriva and other Linux distributions. The configuration files that manage network configuration for specific devices (such as eth0) are located in /etc/sysconfig/network-scripts. Each device and IP alias has it's own configuration file, such as ifcfg-eth0 for configuration of eth0, and ifcfg-eth0:0 for the first IP alias of eth0 (or eth0:0).
Dynamic IP ConfigurationDynamic IP-assigned devices are those that use protocols like DHCP. An example ifcfg-eth0 file for a dynamically-assigned IP on eth0 would be: DEVICE=eth0 BOOTPROTO=dhcp ONBOOT=yes MII_NOT_SUPPORTED=yes This indicates that the device is eth0, the boot protocol is DHCP, that the interface is to start at boot, and does not try to use ifstatus to see if the network link is up. Static IP ConfigurationA static IP-assigned device is one that will retain it's IP address constantly. With a static IP, unlike a dynamic one, you need to provide more information, such as the netmask, broadcast address, etc. An example ifcfg-eth1 file for a statically-assigned IP on eth1 would be: DEVICE=eth1 BOOTPROTO=static IPADDR=10.0.10.100 NETMASK=255.0.0.0 NETWORK=10.0.0.0 BROADCAST=10.255.255.255 ONBOOT=yes MII_NOT_SUPPORTED=yes This indicates that the device is eth1, the boot protocol is static, the IP address is 10.0.10.100, the netmask is 255.0.0.0, the network address is 10.0.0.0, the broadcast address is 10.255.255.255, the device is to start at boot, and does not try to use ifstatus to see if the network link is up. IP AliasesIP aliases piggy-back a lot of information from the "parent" device. For instance, if you wished to have eth1:0 assigned a static IP address of 10.0.10.101 with ifcfg-eth1 configured as above, the ifcfg-eth1:0 file would contain: DEVICE=eth1:0 IPADDR=10.0.10.101 No other information is required as it will be taken from the "parent" device (in this case, eth1). If, on the other hand, you wished to have eth0:1 have a static IP address, and eth0 is dynamic (as shown above), you would need to indicate the appropriate information. If the netmask, network address, etc. settings are the same they can be omitted, however you will need to indicate that eth0:1 is static, as opposed to eth0 (which is dynamic). This can be done thus: DEVICE=eth0:1 BOOTPROTO=static IPADDR=192.168.4.100 This would statically-assign the IP address 192.168.4.100 to eth0:1, while eth0 itself remains dynamic. Also keep in mind that network configuration also uses some envdir settings from /etc/sysconfig/env/network/ that will need to be aware of, such as setting the default gateway address, gateway device, hostname, and whether or not networking is to be enabled automatically. Network Options for ifcfg FilesThe following keyword options are available for use in ifcfg-ethX files:
The following keyword options are only valid for IP aliases:
|
![]() |
|
|
| |||