I had to modify the newtork configuration of a solaris 10 host. Below, some commands and files I used/needed. This post is mostly a reminder of bulk list of commands

  • Mother of all network related command : ifconfig


  • Display the routing table : netstat -nr


  • Display open sockets, network connexions : lsof -i -n. This command is not inclueded in a standard installation, but can be obtained from solaris freeware.


  • Add/Remove a permanent route : route -p

  • Default route : cat /etc/defaultrouter


  • Name resolution (aka DNS) :
    • Check /etc/resolv.conf for correct dns addresses.

    • Check that file /etc/nsswitch.conf contains a line with hosts: files dns


  • Change an ip address :
    • Check the file /etc/hostname.interface for the hostname

    • Edit /etc/hosts and change the IP address
    • If the IP is subnetted with a weird netmask, add the wanted netmask to /etc/inet/netmasks

    • Restart the network by svcadm restart network/physical

  • Do not restart the network using a network connexion like ssh
  • Always check for the avilaibility of an alternate access to the host such as rsc, ilo or elom before changing network configuration.
    • Do not bite the hand that feeds you.


  • Configure network interfaces : dladm

    • Display interfaces : dladm show-dev

    • Display links : dladm show-links

    • Display aggregations : dladm show-aggreg


  • Firewalling:
    • Status : ipfstatus
    • Display input/output rule set : ipfstatus -i or ipfstatus -o

    • Monitoring firewall in real time : ipmon


  • IP Forwarding configuration : routeadm


  • List/Configure network services based on inet: inetadm


  • Capture and display network traffic : snoop


  • Display/Modify network driver parameters : ndd



I had to migrate a running Solaris Zone (let's call it myZone) from host A to host B. The 2 hosts and the zone didn't have the same patches and packages. Making the zone running on host B was quite painfull. Follows how I did proceed (use it at your own risk).

  • On the source host (host A) :

    1. Copy the zone filesystem (the zone path) to the host B. Copy the file /etc/zones/myZone.xml to the host B's /tmp folder.

  • On the destination host (host B) :

    1. Attach the zone by issuing the command zoneadm attach -F -n /tmp/zoneName.xml 2>&1. This command will return packages and patches not matching the host B. Those lists are preceded by These packages installed on this system were not installed on the source system: for packages and These patches installed on this system were not installed on the source system: for patches.

    2. Add all the patches listed to the file /usr/lib/brand/native/bad_patches. After adding the pataches to the, reissuing the previous command should not complain about the missing pataches.

    3. Edit the file /etc/zones/index and add myZone:configured:zonePath: at the end of the file.

    4. Move the /tmp/zoneName.xml to /etc/zones/myZone.xml.

    5. Attach the zone using zoneadm -z myZone attach -u.

    6. Boot the by zoneadm -z zoneName boot. It should boot. If not, the config (network interface, mount points) should be adopted.

  • Once, the container has been successfully booted, the lines added to the file /usr/lib/brand/native/bad_patches on the host should be removed