Hello.
I have got my first IPv4 subnet ever, and I'm trying to use it. I have followed this guide from Hetzner to how to setup a subnet.
Everything seems OK. But something is wrong. A) When I create a Windows VM using the subnet and using DHCP, I get no internett access. But if I use one of the free IPs from the subnet, it' on internet right away:
Then I create a Linux VM: CentOS 6.6 64bit minimal.iso
Also there DHCP is not working. When I change ONBOOT=yes, and restart the network, I can see that the eth0 card has got the second free IP from my subnet. All seems correct. But still, it's not on the internet. I can't ping anything.
Then I change the setup from DHCP to Static, like on Windows. I use exact the same settings as I use on Windows, but of course the second IP ;) But the Linux VM will not go on internet whatever I try.
Here is my settings, and still, no internett. I use /etc/init.d/network restart after every change I make, and I also reboot the server when the new settings is not working, just to see if that helps.
vi /etc/sysconfig/network-scripts/ifcfg-eth0
ifconfig
vi /etc/resolv.conf I have just tried with the Google NS, and just with the Hetzner nameservers.
/etc/init.d/network restart
Here I get two errors I don't know anything about. Why do it say that I can't use the Gateway? It's the correct one in the subnet, it's the same as I use on Windows. So why will it not work in Linux? I have tried to use gateway in the eth0 file and in vi /etc/sysconfig/network but the same error both places.
Here is some info from my DHCP scope, as you can see, x.2 is dedicated to the server. I have tried with reservation and without.
Here is the subnet.
What are I'm missing here? Why can I not use DHCP in the first place? (not a big issue, only 6 IPs, so I can use static IP without any problem). But why do static IP work on Windows but not on Linux with the same settings?
I really hope someone here can help me!
http://ift.tt/1dvHQ0Z
0 comments:
Post a Comment