New on LowEndTalk? Please Register and read our Community Rules.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
All new Registrations are manually reviewed and approved, so a short delay after registration may occur before your account becomes active.
please help me in configuring network statically on hetzner dedi
Hello
Is it possible to configure my network statically without using an DHCP on hetzner dedicated server? My
software complains that this ins not an optimal to use DHCP. I tried following
this guide
https://wiki.hetzner.de/index.php/Netzkonfiguration_CentOS/en
and my configuration files look like this:
/etc/sysconfig/network-scripts/ifcfg-eth0
DEVICE=eth0
HWADDR=xxxxx
ONBOOT=yes
BOOTPROTO=static
IPADDR=MY_SERVER_IP
NETMASK=255.255.255.255
SCOPE="peer GATEWAY"
/etc/sysconfig/network-scripts/route-eth0
ADDRESS0=0.0.0.0
NETMASK0=0.0.0.0
GATEWAY0=GATEWAY
I also tried the folllowing variants
DEVICE=eth0
HWADDR=xxxx
ONBOOT=yes
BOOTPROTO=static
IPADDR=MY_SERVER_IP
NETMASK=255.255.255.224
SCOPE="peer GATEWAY"
/etc/sysconfig/network-scripts/route-eth0
ADDRESS0=MY_SERVER_IP
NETMASK0=255.255.255.224
GATEWAY0=GATEWAY
and none work for me. I cannot ping any IP or host but as soon as I change to use
DHCP everything works fine.
Comments
Have you tried
DEFROUTE=yes
andGATEWAY=<my_gw>
in ifcfg-eth0, and nothing in route-eth0? I think you'll want the *.224 netmask.What does your
ip ad
say if you use DHCP? Does it configure the link scope to only peer with the gateway, or global scope?I installed debian using their installer, and it uses a static address, global scope, on a /27; very standard config.
Excuse me if wrong o/s.
/etc/sysconfig/network-scripts/route-eth0
Problem solved by using their installimage script, firstly I use VNC and when using installimage I have static IP configured and here is my config for reference:
/etc/sysconfig/network-scripts/ifcfg-eth0