Thursday, February 8, 2007
Solaris: Virtual Interface Adding/Removing
(Source : http://www.tech-recipes.com/solaris_networking_tips35.html)
Virtual interfaces allow a single Ethernet interface to listen on additional IP addresses.
Given an ethernet interface hme0 (use ifconfig -a to identify the names of your interfaces), you can create a subinterface called hme0:1 with the following command:
# /sbin/ifconfig hme0:1 plumb
You can set the IP address of the interface to 172.22.23.34 and turn on the interface with the following command:
# /sbin/ifconfig hme0:1 172.22.23.34 up
# /sbin/ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
hme0: flags=1000843 mtu 1500 index 2
inet 172.22.23.39 netmask ffffff00 broadcast 172.22.23.255
ether 9:0:21:aa:be:5f
hme0:1: flags=1000843 mtu 1500 index 2
inet 172.22.23.34 netmask ffff0000 broadcast 172.22.255.255
Unless you do some additional nonstandard things in your network, all of the subinterfaces on a physical interface need to be in the same subnet.
To make the virtual interface persist following a reboot, you can add the ip address or hostame from /etc/hosts in the file /etc/hostname.hme0:1
Removing the virtual interface from Solaris:
(Source: http://www.tech-recipes.com/solaris_networking_tips139.html)
Solaris allows multiple virtual or logical interfaces to exist with different IP addresses on the same physical interface. Virtual interfaces are created or plumbed up using the plumb directive in ifconfig. They are unplumbed using the unplumb directive.
To remove the virtual interface eri1:7, run the following command as root:
# ifconfig eri1:7 unplumb
Subscribe to:
Post Comments (Atom)
© Jadu Saikia www.UNIXCL.com
No comments:
Post a Comment