This procedure shows how to enable physical link status updates for virtual network devices.
You can also enable physical link status updates for a virtual switch device by following similar steps and specifying the linkprop=phys-state option to the ldm add-vsw and ldm set-vsw commands.
You need to use the linkprop=phys-state option only if the virtual switch device itself is plumbed as an interface. If linkprop=phys-state is specified and the physical link is down, the virtual network device reports its link status as down, even if the connection to the virtual switch is up. This situation occurs because the Solaris OS does not currently provide interfaces to report two distinct link states, such as virtual-link-state and physical-link-state.
Become superuser or assume an equivalent role.
Roles contain authorizations and privileged commands. For more information about roles, see Configuring RBAC (Task Map) in System Administration Guide: Security Services.
Enable physical link status updates for the virtual device.
You can enable physical link status updates for a virtual network device in the following ways:
Create a virtual network device by specifying linkprop=phys-state when running the ldm add-vnet command.
Specifying the linkprop=phys-state option configures the virtual network device to obtain physical link state updates and report them to the stack.
If linkprop=phys-state is specified and the physical link is down (even if the connection to the virtual switch is up), the virtual network device reports its link status as down. This situation occurs because the Solaris OS does not currently provide interfaces to report two distinct link states, such as virtual-link-state and physical-link-state.
# ldm add-vnet linkprop=phys-state if-name vswitch-name ldom |
The following example enables physical link status updates for vnet0 connected to primary-vsw0 on the logical domain ldom1:
# ldm add-vnet linkprop=phys-state vnet0 primary-vsw0 ldom1 |
Modify an existing virtual network device by specifying linkprop=phys-state when running the ldm set-vnet command.
# ldm set-vnet linkprop=phys-state if-name ldom |
The following example enables physical link status updates for vnet0 on the logical domain ldom1:
# ldm set-vnet linkprop=phys-state vnet0 ldom1 |
To disable physical link state updates, specify linkprop= by running the ldm set-vnet command.
The following example disables physical link status updates for vnet0 on the logical domain ldom1:
# ldm set-vnet linkprop= vnet0 ldom1 |
The following examples show how to configure link-based IPMP both with and without enabling physical link status updates:
The following example configures two virtual network devices on a domain. Each virtual network device is connected to a separate virtual switch device on the service domain to use link-based IPMP.
Test addresses are not configured on these virtual network devices. Also, you do not need to perform additional configuration when you use the ldm add-vnet command to create these virtual network devices.
The following commands add the virtual network devices to the domain. Note that because linkprop=phys-state is not specified, only the link to the virtual switch is monitored for state changes.
# ldm add-vnet vnet0 primary-vsw0 ldom1 # ldm add-vnet vnet1 primary-vsw1 ldom1 |
The following commands configure the virtual network devices on the guest domain and assign them to an IPMP group. Note that test addresses are not configured on these virtual network devices because link-based failure detection is being used.
# ifconfig vnet0 plumb # ifconfig vnet1 plumb # ifconfig vnet0 192.168.1.1/24 up # ifconfig vnet1 192.168.1.2/24 up # ifconfig vnet0 group ipmp0 # ifconfig vnet1 group ipmp0 |
The following example configures two virtual network devices on a domain. Each domain is connected to a separate virtual switch device on the service domain to use link-based IPMP. The virtual network devices are also configured to obtain physical link state updates.
# ldm add-vnet linkprop=phys-state vnet0 primary-vsw0 ldom1 # ldm add-vnet linkprop=phys-state vnet1 primary-vsw1 ldom1 |
The virtual switch must have a physical network device assigned for the domain to successfully bind. If the domain is already bound and the virtual switch does not have a physical network device assigned, the ldm add-vnet commands will fail.
The following commands plumb the virtual network devices and assign them to an IPMP group:
# ifconfig vnet0 plumb # ifconfig vnet1 plumb # ifconfig vnet0 192.168.1.1/24 up # ifconfig vnet1 192.168.1.2/24 up # ifconfig vnet0 group ipmp0 # ifconfig vnet1 group ipmp0 |