{"id":44,"date":"2007-11-07T16:13:47","date_gmt":"2007-11-07T08:13:47","guid":{"rendered":"http:\/\/www.sysadmindayph.com\/blog\/all-about-virtual-interface-in-solaris\/"},"modified":"2007-11-07T16:13:47","modified_gmt":"2007-11-07T08:13:47","slug":"all-about-virtual-interface-in-solaris","status":"publish","type":"post","link":"http:\/\/www.sysadmindayph.com\/blog\/all-about-virtual-interface-in-solaris\/","title":{"rendered":"All About Virtual Interface in Solaris"},"content":{"rendered":"<p>Solaris (and other OS) allows the use of Virtual IP. Virtual interface or logical interface allows an Operating system with only one (1) network device to have multiple numbers of IP address.<\/p>\n<p><strong>The Problem<\/strong><\/p>\n<p>Got a page today, just now that one of our managed server went down. It&#8217;s a ping\/connectivity page.<\/p>\n<p>Logged in to console and investigate. It turns out that the UNIX box is multi-IP&#8217;d box. It has a virtual IP and looks like the one that gave out the ping notification is the virtual IP.<\/p>\n<p><strong>Corrective Action<\/strong><\/p>\n<p>Simple create the missing IP address using a virtual interface. Virtual interface allow a single ethernet interface to listen on additional IP addresses.<\/p>\n<p>Check the existing network IP configuration of the UNIX box:<\/p>\n<blockquote><p>UNIX-Box(AP)#ifconfig -a<br \/>\nlo0: flags=1000849&lt;UP,LOOPBACK,RUNNING,MULTICAST,IPv4&gt; mtu 8232 index 1<br \/>\ninet 127.0.0.1 netmask ff000000<br \/>\nqfe0: flags=1000843&lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 1500 index 2<br \/>\ninet 165.20.21.4 netmask fffffff0 broadcast 65.201.212.47<br \/>\nether 0:3:ba:3d:ba:99<br \/>\nqfe3: flags=1000843&lt;UP,BROADCAST,RUNNING,MULTICAST,IPv4&gt; mtu 1500 index 3<br \/>\ninet 12.3.55.22.6 netmask ffff0000 broadcast 172.31.255.255<br \/>\nether 0:3:ba:3d:ba:99<\/p><\/blockquote>\n<p>You have to have the info you need to re-create the virtual IP. In this case, it&#8217;s the network IP: <strong>12.3.55.22.12<\/strong>To create the Virtual interface:<\/p>\n<blockquote><p>\u00a0ifconfig qfe0:1 plump<br \/>\nifconfig qfe0:1\u00a0  <strong>12.3.55.22.12 up<br \/>\n<\/strong><\/p><\/blockquote>\n<p>You can set the IP address of the interface to 192.168.1.15 and turn on the interface with the following command:ifconfig hme0:1 192.168.1.15 up<\/p>\n<p>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.<\/p>\n<p>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<\/p>\n<p><strong>Disabling \/ Removing Virtual Interface<\/strong><\/p>\n<p>The example above shows how to create a virtual interface using the &#8216;<strong>plumb<\/strong>&#8216; command. In the same way, in order to remove a virtual interface (and subsequently the IP) the interface is unplumbed using the <strong>&#8216;unplumb&#8217; <\/strong>directive.<br \/>\nTo remove the virtual interface eri1:7, run the following command as root:<\/p>\n<blockquote><p>ifconfig eri1:7 unplumb<\/p><\/blockquote>\n<p><strong>\u00a0Final Words<\/strong><\/p>\n<p>Any other things we can do with virtual IP?<\/p>\n","protected":false},"excerpt":{"rendered":"<p>Solaris (and other OS) allows the use of Virtual IP. Virtual interface or logical interface allows an Operating system with only one (1) network device to have multiple numbers of IP address. The Problem Got &hellip;<\/p>\n","protected":false},"author":1,"featured_media":0,"comment_status":"open","ping_status":"open","sticky":false,"template":"","format":"standard","meta":{"footnotes":""},"categories":[16,5],"tags":[],"class_list":["post-44","post","type-post","status-publish","format-standard","hentry","category-commands","category-solaris"],"_links":{"self":[{"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/44","targetHints":{"allow":["GET"]}}],"collection":[{"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts"}],"about":[{"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/types\/post"}],"author":[{"embeddable":true,"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/users\/1"}],"replies":[{"embeddable":true,"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/comments?post=44"}],"version-history":[{"count":0,"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/posts\/44\/revisions"}],"wp:attachment":[{"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/media?parent=44"}],"wp:term":[{"taxonomy":"category","embeddable":true,"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/categories?post=44"},{"taxonomy":"post_tag","embeddable":true,"href":"http:\/\/www.sysadmindayph.com\/blog\/wp-json\/wp\/v2\/tags?post=44"}],"curies":[{"name":"wp","href":"https:\/\/api.w.org\/{rel}","templated":true}]}}