0

I am a complete Linux newbie, but we have quite a few spare Dedicated Machines available right now, so I decided to setup CentOS 6.2 on one of them and start getting more familiar with it. Obviously the first step after install is to configure the NIC, however I am having a lot of trouble getting it working.

I used the instructions from HERE and the IP Address block assigned to this machine is 64.79.102.104/29

Here are my settings, and I made sure to reset after making all of the changes. Is there something wrong with any of them I am missing?

ifcfg-eth0

DEVICE="eth0"
BOOTPROTO=static
NM_CONTROLLED="yes"
HWADDR="00:25:90:01:04:52"
IPADDRESS=64.79.102.106
NETMASK=255.255.255.248
ONBOOT="yes"

network

NETWORKING=yes
HOSTNAME=centos.xfs.com
GATEWAY=64.79.102.105

resolv.conf

nameserver 8.8.8.8
nameserver 8.8.4.4
user9517
  • 115,471
  • 20
  • 215
  • 297
Aidan Knight
  • 650
  • 3
  • 11
  • 19

2 Answers2

2

ifcfg-eth0

DEVICE="eth0"
BOOTPROTO="none"
NM_CONTROLLED="no"
HWADDR="00:25:90:01:04:52"
IPADDR="64.79.102.106"
NETMASK=255.255.255.248
GATEWAY="64.79.102.105"
ONBOOT="yes"

Set that as your ifcfg-eth0. The Directive for the IP Address is actually "IPADDR". The GATEWAY should be defined in this config file, and BOOTPROTO set to none. Also remember that if you're using "quotes" after the = to keep them consistent across the config file.

A couple more basics...

  • Enter your IP and hostname in /etc/hosts
  • In the terminal type:

    hostname centos.xfs.com

NcA
  • 441
  • 2
  • 8
  • Thank you! I set it exactly as instructed, removed the GATEWAY=x.x.x.x from "etc/sysconfig/network". I realized I was using eth0 but it should have been eth1. It seemed to start working (atleast delayed the errors) but still no luck. I think I have more issues than I realized though, so I will just accept this and keep tinkering. – Aidan Knight Mar 14 '12 at 13:29
  • Did you reset the network service after making the changes? I noticed you're using public IPs. Do you have a block allocated to you? And are the gateway/netmask settings correct? – NcA Mar 14 '12 at 13:31
  • Actually I just gave it one more shot using eth0 and it worked. The rest of our machines seem to be configured to use eth1, so I assumed this was what I should be using. Thank you! – Aidan Knight Mar 14 '12 at 13:33
1

Could you try removing NM_CONTROLLED=yes and restarting, see if that improves things?

MadHatter
  • 79,770
  • 20
  • 184
  • 232