How to Configure Virtual Network and Virtual Switch Devices to Use Jumbo Frames
Example 13-13 Configuring Jumbo Frames on Virtual Switch and Virtual Network Devices
The following example shows how to add a new virtual switch device that uses an MTU value of 9000
. This MTU value is propagated from the virtual switch device to all of the client virtual network devices.
First, the ldm add-vsw
command creates the virtual switch device, ldg1-vsw0
, with an MTU value of 9000
. Note that the network device net0
is specified as a value of the net-dev
property.
primary# ldm add-vsw net-dev=net0 mtu=9000 ldg1-vsw0 ldg1
Next, the ldm add-vnet
command adds a client virtual network device to this virtual switch, ldg1-vsw0
. Note that the MTU of the virtual network device is implicitly assigned from the virtual switch to which it is bound. As a result, the ldm add-vnet
command does not require that you specify a value for the mtu
property.
primary# ldm add-vnet vnet01 ldg1-vsw0 ldg1
Depending on the version of the Oracle Solaris OS that is running, do the following:
-
Oracle Solaris 11 OS: Use the
ipadm
command to view the mtu property value of the primary interface.# ipadm show-ifprop -p mtu net0 IFNAME PROPERTY PROTO PERM CURRENT PERSISTENT DEFAULT POSSIBLE net0 mtu ipv4 rw 9000 -- 9000 68-9000
The
ipadm
command creates the virtual network interface in the guest domain,ldg1
. Theipadm show-ifprop
command output shows that the value of themtu
property is9000
.ldg1# ipadm create-ip net0 ldg1# ipadm create-addr -T static -a 192.168.1.101/24 net0/ipv4 ldg1# ipadm show-ifprop -p mtu net0 IFNAME PROPERTY PROTO PERM CURRENT PERSISTENT DEFAULT POSSIBLE net0 mtu ipv4 rw 9000 -- 9000 68-9000
-
Oracle Solaris 10 OS: The
ifconfig
command creates the virtual network interface in the guest domain,ldg1
. Theifconfig vnet0
command output shows that the value of themtu
property is9000
.ldg1# ifconfig vnet0 plumb ldg1# ifconfig vnet0 192.168.1.101/24 up ldg1# ifconfig vnet0 vnet0: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 9000 index 4 inet 192.168.1.101 netmask ffffff00 broadcast 192.168.1.255 ether 0:14:4f:f9:c4:13
Example 13-14 Changing the MTU Value of a Network Interface
The following example shows how to change the MTU value of the network interface to 4000
.
Note that the MTU of an interface can only be changed to a value that is less than the MTU of the device that is assigned by the Logical Domains Manager. This method is useful when VLANs are configured and each VLAN interface requires a different MTU.
-
Oracle Solaris 11 OS: Use the
ipadm
command.primary# ipadm set-ifprop -p mtu=4000 net0 primary# ipadm show-ifprop -p mtu net0 IFNAME PROPERTY PROTO PERM CURRENT PERSISTENT DEFAULT POSSIBLE net0 mtu ipv4 rw 4000 -- 9000 68-9000
-
Oracle Solaris 10 OS: Use the
ifconfig
command.primary# ifconfig vnet0 mtu 4000 primary# ifconfig vnet0 vnet0: flags=1201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS,FIXEDMTU> mtu 4000 index 4 inet 192.168.1.101 netmask ffffff00 broadcast 192.168.1.255 ether 0:14:4f:f9:c4:13