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
  • It looking good – neolix Mar 14 '12 at 12:02
  • I can't ping the IP Addres, I can't ping other machines, etc. I get "ping: unknown host google.com" or "connect: Network is unreachable" if I ping by IP Address. – Aidan Knight Mar 14 '12 at 12:05
  • have you service network restart and try the same. – neolix Mar 14 '12 at 12:08
  • Can you post the output of ifconfig -a after the reboot? netstat -rn would also be useful. – MadHatter Mar 14 '12 at 12:08
  • netstat -rn shows "Dest: 169.254.0.0 Gateway: 0.0.0.0 Genmask: 255.255.0.0 Flags: U MSS:0 Window:0 irtt:0 Iface:etho0" – Aidan Knight Mar 14 '12 at 12:11
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

  • 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?

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.