Answer the question
In order to leave comments, you need to log in
How to add an additional IP to the server?
Hey! I ordered an additional IP for a virtual machine on the server (hetzner), received all the necessary data:
IP
Gateway
Mask
Tell me how to add them to Linux Ubuntu 14.04 so that you can specify a connection with this IP.
Answer the question
In order to leave comments, you need to log in
ip addr add ${ip_a}/${netmask} dev ${interface}
where ${ip_a} is your ip-address
${netmask} is your mask
${interface} is the interface to add ip to.
If the gateway address differs from the default gateway, it will probably be necessary to add more routing rules, like this:
ip ru add from ${ip_a} lookup ${table}
ip ro add default via ${ip_gw} dev ${interface} table ${table}
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question