Fedora 13 base install – network configuration on startup

I’m using an HP mini 110-1013TU(1GB RAM) netbook installed with Windows XP SP3. I want to try Fedora 13, so I decided to install VirtualBox since I don’t want to dual boot or re-partition my hard drive. I have created an 8GB virtual hard drive for the Fedora 13 installation. I also set the RAM to 256MB, because I just wanted the base/core installation.

After a couple of minutes, the installation went successful and I have to set the settings for my Fedora 13 virtual machine. I have reverted the RAM from 256MB to 128MB. I have also selected the NAT option from the Network Adapter lists. Next thing to do is boot up the virtual machine.

After logging in as root, the first thing I checked was the network connection. I executed ifconfig command to see if the network interface was detected. So by default only the loopback was “up”.

Here are two (2) possible ways to fire up and enable your network interface at startup.

Option 1. With root privilege, edit /etc/rc.d/rc.local and add the following lines:

ifconfig eth0 up

dhclient eth0

According to the rc.local file, you can put your own initialization stuff here if you don;t want to do the full Sys V style init stuff. This script is executed after all the other init scripts.

Option 2. With root privilege, edit /etc/sysconfig/network-scripts/ifcfg-eth0 add the line

BOOTPROTO=dhcp

and change the line

ONBOOT=no

to

ONBOOT=yes

Then you should enable the network service in runlevel 3 (since you only have a base/core install).

chkconfig network on –level 3

If you want to reboot then execute shutdown -r or if you want to restart later, just execute the /etc/init.d/network [start | stop | restart] command(s) to test your connectivity.

You may want a static IP configuration instead of using a DHCP. Here is a sample /etc/sysconfig/network-scripts/ifcfg-eth0 using static IP configuration and disabling IPv6.

DEVICE=eth0

HWADDR=00:08:27:4D:F3:C5

IPV6INIT=no

BOOTPROTO=static

ONBOOT=yes

USERCTL=yes

TYPE=Ethernet

IPADDR=192.168.0.3

NETWORK=192.168.0.0

GATEWAY=192.168.0.1

BROADCAST=192.168.0.255

NETMASK=255.255.255.0