Occasionally you need to create a quick one node RAC setup for testing and one of the requirements is a private virtual interface. Virtual interfaces allow a single ethernet interface to listen on additional IP addresses. You can quickly do it in Solaris 10 so that the grid infrastructure setup can see the private virtual interconnect. You can do as below
After adding entry for private interconnect in etc/hosts file you can proceed.
Given an ethernet interface bge0 (use ifconfig -a to identify the names of your interfaces), you can create a subinterface called bge0:1 with the following command:
— Configure Virtual Interface Solaris 10–
Virtual interfaces allow a single ethernet interface to listen on additional IP addresses.
Given an ethernet interface bge0 (use ifconfig -a to identify the names of your interfaces), you can create a subinterface called bge0:1 with the following command:
# dladm show-dev
bge0 link: up speed: 1000 Mbps duplex: full
bge1 link: unknown speed: 0 Mbps duplex: unknown
bge2 link: unknown speed: 0 Mbps duplex: unknown
bge3 link: unknown speed: 0 Mbps duplex: unknown
# dladm show-link
bge0 type: non-vlan mtu: 1500 device: bge0
bge1 type: non-vlan mtu: 1500 device: bge1
bge2 type: non-vlan mtu: 1500 device: bge2
bge3 type: non-vlan mtu: 1500 device: bge3
ifconfig bge0:1 plumb
You can set the IP address of the interface to 10.90.1.102 and turn on the interface with the following command:
ifconfig bge0:1 10.90.1.102 up
ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
inet 127.0.0.1 netmask ff000000
bge0: flags=1000843 mtu 1500 index 2
inet 172.*.*.* netmask ffffff00 broadcast 172.*.*.*
ether 0:14:4f:95:e1:38
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.bge0:1
more /etc/hosts
#
# Internet host table
#
::1 localhost
10.90.1.102 hostname-priv
vi /etc/hostname.bge0:1
Add the entry hostname-priv from the host file to the virtual interface suncsftst-priv. And now it will persis after a reboot also.
2 comments
What do u mean by “some additional nonstandard things in your network” ? Need to understand this since my network is using ip addresses which are not in the same subnet . Also , an entry in /etc/hosts is as follows
10.132.45.75 user-lh oracle-user application-srv
i knew about passing only one entry corresponding to the ip i.e. user-lh . What is the use of the other two columns ? (specific purpose(s) which they serve).
Thanks a lot in advance for your reply.
Which 2 columns are you referring to ?