On 01/16/11 09:16, Mikle Krutov wrote:
> Hello, misc!
> I've got trouble with network, as i can not change the netmask of both
> of my net-devices:
...
> # ifconfig vr0 
> vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>     <..>
>       inet 10.196.100.206 netmask 0xff000000 broadcast 10.255.255.255
>     <..>
> # ifconfig vr0 netmask 255.255.255.0
> # ifconfig vr0 
> vr0: flags=8843<UP,BROADCAST,RUNNING,SIMPLEX,MULTICAST> mtu 1500
>     <..>
>       inet 10.196.100.206 netmask 0xff000000 broadcast 10.255.255.255
>     <..>

Try using ifconfig like the examples at the bottom of the man page, it
will work just fine...

# ifconfig vr0 inet 10.196.100.206 netmask 255.255.255.0

exactly why your syntax doesn't work, I didn't find in a quick glance at
ifconfig(8), but the examples will work.

> It also could not be done with configuration files (/etc/hostname.???)

It can be done just fine with hostname.if, if done properly.  You didn't
show what you did, so I can't say what you did wrong, but see
hostname.if(5), and rest assured a lot of people set their netmasks.
Just about everyone, one way or another. :)

> And actually due to my providers setup, i need to change mac address of
> vr0 to the different one, and if i do that with /etc/hostname.vr0 - only
> lladdr setting is read from that file on boot.

ditto.

Nick.

Reply via email to