Network configurations with minimal installation of Linux
Network Configuration for Minimal Linux Installation
A minimal installation of a Linux distribution, such as CentOS, RHEL, or Scientific Linux, is often the best approach. Fewer packages mean reduced vulnerability to attacks and lower resource overhead. However, you will need to adjust the network settings after the installation is complete.
For DHCP Configuration
- Open the network configuration file:
- Add or modify the following lines according to your network configuration:
sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0
BOOTPROTO="dhcp"
ONBOOT="yes"
After making these changes, the ifcfg-eth0
file should look like this:
DEVICE="eth0"
HWADDR="08:00:27:DB:77:F4"
NM_CONTROLLED="yes"
ONBOOT="yes"
BOOTPROTO="dhcp"
For Static IP Configuration
- Open the network configuration file:
- Add or modify the following lines to match your network settings:
sudo nano /etc/sysconfig/network-scripts/ifcfg-eth0
IPADDR=10.11.16.101
BOOTPROTO=none
NETMASK=255.255.255.0
GATEWAY=10.11.16.1
DNS1=10.11.16.2
DNS2=10.11.16.3
USERCTL=yes
After making these changes, the ifcfg-eth0
file should look like this:
DEVICE="eth0"
HWADDR="08:00:27:DB:77:F4"
NM_CONTROLLED="yes"
ONBOOT="yes"
IPADDR=10.11.16.101
BOOTPROTO=none
NETMASK=255.255.255.0
GATEWAY=10.11.16.1
DNS1=10.11.16.2
DNS2=10.11.16.3
USERCTL=yes
Comments
Post a Comment