Solaris Logical Interfaces


To assign additional ip addresses to a Sun Solaris UNIX box, one must use ifconfig to configure logical interfaces.

# ifconfig eri0 plumb
# ifconfig eri0:1 plumb
# ifconfig eri0:2 plumb

# ifconfig -a
lo0: flags=1000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4> mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
eri0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 192.168.4.200 netmask ffffff00 broadcast 192.168.4.255
        ether 0:3:ba:12:bc:b7
eri0:1: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2
        inet 0.0.0.0 netmask 0

/sbin/ifconfig eri0:1 inet 192.168.4.202 netmask 255.255.255.0 broadcast 192.168.4.255
/sbin/ifconfig eri0:2 inet 192.168.4.204 netmask 255.255.255.0 broadcast 192.168.4.255

ifconfig eri0:1 up
ifconfig eri0:2 up

Here is another variation on the procedure:

# ifconfig dmfe0 plumb
# ifconfig dmfe0:1 plumb

# ifconfig -a
lo0: flags=1000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
dmfe0: flags=1000843 mtu 1500 index 2
        inet 192.168.5.199 netmask ffffff00 broadcast 192.168.5.255
        ether 0:3:ba:11:c7:b5
dmfe0:1: flags=1000842 mtu 1500 index 2
        inet 0.0.0.0 netmask 0

/sbin/ifconfig dmfe0:1 inet 192.168.5.199 netmask 255.255.255.0 broadcast 192.168.5.255

ifconfig dmfe0:1 up

To have these interfaces configured on boot create files /etc/hostname.eri0:1 and /etc/hostname.eri0:2 containing "host1" and "host1" respectively.


 

Home