[OpenIndiana-discuss] NWAM for static IP on a VNIC
Jim Klimov
jimklimov at cos.ru
Thu Dec 19 12:59:05 UTC 2013
On 2013-12-19 16:52, Jim Klimov wrote:
> Hello all,
>
> I am trying to get the following with NWAM: a physical NIC
> is connected to whatever network is available, usually with
> DHCP. Also there is a VNIC on an internal etherstub which
> serves local zones with tests, etc. The VNIC has a fixed IP
> address.
>
> This all works nicely with legacy configuration via files
> or ipadm, except that for the latter I can not set the
> interface/address enabled not-temporarily (i.e. it is down
> after reboots).
Forgot to add the screenshot that the ipadm part works well by
just enabling the interface (which can only be done as a temporary
action, i.e. from an init-script):
root at n54l:~# ipadm enable-if -t vnic127001
root at n54l:~# ipadm enable-addr -t vnic127001/v4
ipadm: could not enable address: Address object already exists
root at n54l:~# ifconfig -a
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu
8232 index 1
inet 127.0.0.1 netmask ff000000
tun0:
flags=10011008d1<UP,POINTOPOINT,RUNNING,NOARP,MULTICAST,ROUTER,IPv4,FIXEDMTU>
mtu 1500 index 4
inet 192.168.131.50 --> 192.168.131.49 netmask ffffffff
ether 20:c4:21:f6:4:ff
bge0: flags=1104843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,ROUTER,IPv4> mtu
1500 index 9
inet 192.168.1.111 netmask ffffff00 broadcast 192.168.1.255
ether 28:92:4a:36:b:c8
vnic127001: flags=1100843<UP,BROADCAST,RUNNING,MULTICAST,ROUTER,IPv4>
mtu 9000 index 10
inet 192.168.127.1 netmask ffffff00 broadcast 192.168.127.255
ether 2:8:20:3f:3f:8c
lo0: flags=2002000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv6,VIRTUAL> mtu
8252 index 1
inet6 ::1/128
bge0: flags=20002004841<UP,RUNNING,MULTICAST,DHCP,IPv6> mtu 1500 index 9
inet6 fe80::2a92:4aff:fe36:bc8/10
ether 28:92:4a:36:b:c8
vnic127001: flags=20002000840<RUNNING,MULTICAST,IPv6> mtu 9000 index 10
inet6 ::/0
ether 2:8:20:3f:3f:8c
And the NWAM config in raw mode (empty lines added for readability):
root at n54l:~# cat /etc/nwam/ncp-Automatic.conf
link:bge0
type=uint64,0;class=uint64,0;parent=string,Automatic;enabled=boolean,true;activation-mode=uint64,4;priority-group=uint64,0;priority-mode=uint64,1;
interface:bge0
type=uint64,1;class=uint64,1;parent=string,Automatic;enabled=boolean,true;ip-version=uint64,4,6;ipv4-addrsrc=uint64,0;ipv6-addrsrc=uint64,0,1;
interface:vnic127001
type=uint64,1;class=uint64,1;parent=string,Automatic;enabled=boolean,true;ipv6-addrsrc=uint64,0,1;ip-version=uint64,4;ipv4-addrsrc=uint64,2;ipv4-addr=string,192.168.127.1;
link:vnic127001
type=uint64,0;class=uint64,0;parent=string,Automatic;enabled=boolean,true;activation-mode=uint64,4;priority-group=uint64,0;priority-mode=uint64,1;
Thanks for ideas,
//Jim
More information about the OpenIndiana-discuss
mailing list