One of the common mistakes done while configuring the guest LDOMs for the first time is – to not configure control domain for inter domain communications. In this case the control domain and guest ldoms can talk to everyone on the network but not to each other.
There are 2 scenarios:
1. If one just want guest domains to communicate with the outside world then one should directly plumb up the switch vsw’s along with the primary domain’s network interface used to create those vsws (In our example we have e1000g0).
primary # ifconfig vsw0 plumb
2. If one wants to communicate between the guest domains and the control domain, one will need to replace the primary interface for eg (e1000g0) with vsw0.
For e.g. below are the “ldm ls -l” and “ifconfig -a” outputs from control and guest domain
Primary/Control domain output :
# ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 e1000g0: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 2 inet 10.1.2.xx netmask ffffff00 broadcast 10.1.2.255 ether 0:21:28:3f:a3:50
# ldm ls -l --- (Only switch output) ...... VSW NAME MAC NET-DEV ID DEVICE LINKPROP DEFAULT-VLAN-ID PVID VID MTU MODE INTER-VNET-LINK primary-vsw0 00:14:4f:fb:44:fb e1000g0 0 switch@0 1 1 1500 on
Guest domain ldom01 output :
# ifconfig -a lo0: flags=2001000849<UP,LOOPBACK,RUNNING,MULTICAST,IPv4,VIRTUAL> mtu 8232 index 1 inet 127.0.0.1 netmask ff000000 vnet0: flags=1000843[UP,BROADCAST,RUNNING,MULTICAST,IPv4] mtu 1500 index 2 inet 10.1.2.xx netmask ffffff00 broadcast 10.1.2.255 ether 0:14:4f:fa:e8:33
Replacing e1000g0 with vsw0
Here are the steps of replacing e1000g0 with vsw0:
1) First, unbind the guest domain which is using vsw0. If you have other guest domains bound to that switch, same command needs to be run for those domains.
# ldm unbind ldom01
where ldom01 is the guest domain bound to that switch.
2) Rename the primary domain interface file to vsw0.
# mv /etc/hostname.e1000g0 /etc/hostname.vsw0
3) Remove the virtual switch vsw-e1000g0.
# ldm rm-vsw vsw-e1000g0 primary
4) Now re-add the virtual switch vsw-e1000g0 with the mac address of interface e1000g0.
# ldm add-vsw mac-addr=0:21:28:3f:a3:50 net-dev=e1000g0 vsw-e1000g0 primary
5) Save the new configuration as newconfig.
# ldm add-config newconfig
6) Reboot the primary domain.
7) Verify if the control domain is booted off the newconfig, it should say “current”.
# ldm list-config factory-default newconfig [current]
8) Bind the guest ldom.
# ldm bind ldom01
where ldom01 is the guest domains bound to that switch. If you have other guest domains bound to that switch, same command needs to be run for those domains as well.
9) Start the guest ldom.
# ldm start ldom01
10) Validated network connectivity to primary domain by connecting to guest domain from control domain.