blog'o thnet

To content | To menu | To search

Tuesday 13 March 2007

Adding a Specific Logical Interface with the Solaris 10

Under Solaris 10, there is no /etc/init.d/inetsvc network script anymore. You must use the new SMF to manage your network services, even special initialization ones. In order to plumb and up a new logical interface, you can now use the service instance named svc:/network/physical:default.

Here is quick example on how to use it:

# ifconfig -au4
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
nge0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 2
        inet 192.168.1.101 netmask ffffff00 broadcast 192.168.1.255
        ether 0:e0:81:58:88:ae 
# 
# cat /etc/hostname.nge0:1
192.168.1.50
# 
# svcadm restart network/physical
#
# ifconfig -au4
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
nge0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 2
        inet 192.168.1.101 netmask ffffff00 broadcast 192.168.1.255
        ether 0:e0:81:58:88:ae 
nge0:1: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 2
        inet 192.168.1.50 netmask ffffff00 broadcast 192.168.1.255
# 
# ifconfig nge0:1 down unplumb
#
# ifconfig -a4
lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000 
nge0: flags=201004843<UP,BROADCAST,RUNNING,MULTICAST,DHCP,IPv4,CoS> mtu 1500 index 2
        inet 192.168.1.101 netmask ffffff00 broadcast 192.168.1.255
        ether 0:e0:81:58:88:ae

Tuesday 2 January 2007

Remote X11 Display Using the Secure By Default Network Profile

Although already present for months in the Sun's OpenSolaris distribution, the new Secure By Default Network Profile feature is now available with the 11/06 update of the official Solaris release.

If you didn't get it through a fresh install, you can turn it on using the provided shell script (as /usr/sbin/netservices). It all works well, except in our case (at work) we want to be able to do remote display on X11. So, we use this quickly-written script in order to be able to do so easily:

# cat /tmp/svc.netservices
#!/usr/bin/env sh

echo "Setting the limited SMF configuration..."
netservices limited

echo "Setting the open form of x11-server..."
svccfg -s x11-server setprop options/tcp_listen = boolean: true

echo "Setting the open form of cde-login..."
svccfg -s cde-login setprop dtlogin/args = "\"\""
echo "Refresh the cde-login SMF service..."
svcadm refresh cde-login

echo "Restarting the SMF services..."
svcadm restart cde-login

exit 0

Hope this help... at least, it will be an online-memo for us!