Tuesday, September 11, 2012

Set a Netmask in a Zone

Here's how you can setup a netmask in a zone. It's not difficult at all...!


#zonecfg -z zonename

> add net
net> set physical=bge134001
net> set address=192.168.1.100/24 (Here's the trick! You'll have to put it this way /24 in order it to work)
net> set defrouter=192.168.1.1
net> end
>verify
>commit
>exit

And then you have to reboot the zone:

#zoneadm -z zonename reboot

That's it!!

Monday, July 16, 2012

ZFS Web Administration

If you are using ZFS in your Solaris install maybe it is helpful sometimes to have a gui. There you can check for snapshots, arrays, ldom's using a different file system, or maybe you want to erase snapshots or modify the ACL, and more...

Something Cool about this is that you don't have to install anything in order to use it, just execute a couple of commands.

The web gui is listening just locally 127.0.0.1 in Port 6789, in order to access remotely you have to do this:

svccfg -s svc:/system/webconsole setprop options/tcp_listen=true

then:

smcwebserver restart

Check it with netstat


# netstat -an | grep 6789

       *.6789               *.*                0      0 49152      0 LISTEN

There you go!

Now you can access from your web client!!

Tuesday, June 12, 2012

Configure VLAN's in Solaris Zones


Solaris 10 zone with Vlan



This is in the case you want to configure a VLAN in your Solaris Zone.


First check that you are connected to a trunk, then proceed with configuration.


Let's say you want to connect to the vlan id 134 and your interface name is bge1.
So you have to calculate it like this:


VLAN int name = physical interface driver name + VLAN ID *1000 + physical device instance


bge + 134 * 1000 + 1 = bge134001


Then you have to Plumb the interface:


#ifconfig bge134001 plumb


Now you have to configure the zone so it can use the interface you created.


#zonecfg -z zonename


> add net
net> set physical=bge134001
net> set address=192.168.1.55
net> set defrouter=192.168.1.1
net> end
>verify
>commit
>exit


Now let's reboot the zone in case it was online:


#zoneadm -z zonename reboot


With "ifconfig -a" you will see that a new interface was created, in this case it will be:


bge134001:1


And that's it, try to logon to the zone you've created with ssh or login from the global zone with


zlogin zonename


and check if everything went ok.