Re: [vserver] some questions of naddress

From: Jarek Dylag <jarek.dylag_at_gmail.com>
Date: Thu 15 Mar 2012 - 06:35:31 GMT
Message-ID: <CAO0LsrPeKUcRV8bpq9U3_tmhJuCa=F6X103kpKiZfNLxV4g3KQ@mail.gmail.com>

2012/3/14 songjun435 <songjun435@gmail.com>:

Hi,

> hi,all:
> I use naddress command to add ip to the vps
>
> 1. I have started a test vps with "--interface eth0:192.168.155.50/24",and I
> enter the test vps,execute ifconfig:
[...]
> 2. then I execute "naddress --set  --nid 42 --ip 10.0.0.3/24",information on
> the console:
> Adding 10.0.0.3
> 3.then I enter the test vps again,and execute ifconfig,
>    But now there is nothing output to the console,why?

You have to add new ip on hosts:
ip add addr 10.0.0.3/24 dev eth0

> Can I use the naddress to change the ip of the vps?

Yes, but naddres doesn't add ip for you.

> And how to give two or more ips to the vps?

naddress --set  --nid 42 --ip 10.0.0.3/255.255.255.0 -ip 10.1.0.3/255.255.255.0

number of positions is limited to 16 (i might be wrong about current
limit), you can also add more ip using --mask or --range:

naddress --set --nid 42 --ip 10.0.0.3/255.255.255.0 --mask 10.1.0.128/25

Jarek Dyląg
Received on Thu Mar 15 06:35:47 2012

[Next/Previous Months] [Main vserver Project Homepage] [Howto Subscribe/Unsubscribe] [Paul Sladen's vserver stuff]
Generated on Thu 15 Mar 2012 - 06:35:48 GMT by hypermail 2.1.8