Setup network for CentOS 6.6 64bit.

My advisor bought a storage server for our data. The process of setting up IP got trouble. But She would not believe me to do this. Anyhow, I installed CentOS 6.6 on my VirtualBOX to learn how to set up IP, and test in the university networking. If you want to do the same thing with me. In virtualBOX network setting, choose Attached to: Bridged Adapter. The virtual MAC address will be in the following Advanced part. You may change it manually to test your system. Bridged Adapter will make your virtual system connect to the outer network directly. More information can be found at https://www.virtualbox.org/manual/ch06.html.

1. DHCP

In my university, the new MAC address need to register in the system. So check the MAC address first and register it online. /etc/init.d/network restart should make it work. ping 8.8.8.8 to test if network is ok.

2. Static IP

I got help form https://gist.github.com/fernandoaleman/2172388. Before you do the following operation, please make sure the server has already assign a IP for your MAC address. The bold words might need to be changed according to your condition.

## Configure eth0
#
# vi /etc/sysconfig/network-scripts/ifcfg-eth0
 DEVICE=”eth0″
NM_CONTROLLED=”yes”
ONBOOT=yes
HWADDR=A4:BA:DB:37:F1:04
TYPE=Ethernet
BOOTPROTO=static
NAME=”System eth0″
UUID=5fb06bd0-0bb0-7ffb-45f1-d6edd65f3e03
IPADDR=192.168.1.44
NETMASK=255.255.255.0
## Configure Default Gateway
#
# vi /etc/sysconfig/network
NETWORKING=yes
HOSTNAME=centos6
GATEWAY=192.168.1.1
## Restart Network Interface
#
 /etc/init.d/network restart
## Configure DNS Server
#
# vi /etc/resolv.conf
 nameserver 8.8.8.8 # Replace with your nameserver ip
Advertisements

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s