S
S
script882012-08-26 00:38:48
Debian
script88, 2012-08-26 00:38:48

Adding a Subnet to Debian

I rent a server in hetzner, ordered subnet /29 ip addresses, prescribe
ip addr add 10.4.2.1/32 dev eth0

It is known that debian overwrites this address after reboot, what to do in this situation? how to add a subnet so that virtual machines can use these ip addresses?

Answer the question

In order to leave comments, you need to log in

4 answer(s)
A
amarao, 2012-08-26
@amarao

Register it in interfaces as an additional ip. man interfaces.
By the way, you crookedly prescribe IP in your example.

N
Nikolai Turnaviotov, 2012-08-26
@foxmuldercp

is this your physical server with a dedicated IP address to which this subnet is routed?
or a ready-made virtual machine issued by Hetzner?
Ask the hatzner support how best to act in such a situation - there seem to be quite adequate guys on technical support according to the reviews.

C
CrazySquirrel, 2012-08-26
@CrazySquirrel

up ip addr add 10.4.2.1/32 dev eth0 down ip addr del 10.4.2.1/32 dev eth0
Here it is, yes in /etc/network/interfaces.

J
jov, 2012-08-26
@jov

For the first time, register in /etc/network/interfaces

auto eth0
iface eth0 inet static
        address 10.4.2.1
        netmask 255.255.255.255

Well, then, as advised by amarao , man interfaces

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question