Skip to content

Solaris: Configuring Virtual Network with LDOM

Objective
To add a virtual network device to guest domain

Current network resource,

root@maxis70 # ldm list -o network
NAME             
primary          

MAC
    00:21:28:b3:36:a0

VSW
    NAME             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE  
    primary-vsw0     00:14:4f:f9:da:3e igb0      0    switch@0              1               1                         1500        
    primary-vsw1     00:14:4f:fb:6c:90 igb1      1    switch@1              1               1                         1500        
    primary-vsw2     00:14:4f:fb:4f:94 igb2      2    switch@2              1               1                         1500        
    primary-vsw3     00:14:4f:f9:c6:fa igb3      3    switch@3              1               1                         1500        

------------------------------------------------------------------------------
NAME             
ldom1            

MAC
    00:14:4f:fb:44:a5

NETWORK
    NAME             SERVICE                     ID   DEVICE     MAC               MODE   PVID VID                  MTU   LINKPROP  
    vnet0            primary-vsw0@primary        0    network@0  00:14:4f:fb:ef:68        1                         1500  phys-state
    vnet1            primary-vsw1@primary        1    network@1  00:14:4f:f9:aa:98        1                         1500  phys-state
    vnet2            primary-vsw2@primary        2    network@2  00:14:4f:fb:56:21        1                         1500  phys-state

Current virtual network device on guest domain,

root@maxis71 # 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.200.51.122 netmask ffffff00 broadcast 10.200.51.255
        ether 0:14:4f:fb:ef:68 
vnet1: flags=1000842<BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 3
        inet 10.100.32.234 netmask fffffc00 broadcast 10.90.35.255
        ether 0:14:4f:f9:aa:98 
vnet2: flags=1000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4> mtu 1500 index 4
        inet 10.10.32.234 netmask fffffc00 broadcast 10.90.35.255
        ether 0:14:4f:fb:56:21

Add virtual network device to the guest domain,

root@maxis70 # ldm add-vnet pvid=1 vnet3 primary-vsw3 ldom1

Network resources after adding new virtual network device,

root@maxis70 # ldm list -o network
NAME             
primary          

MAC
    00:21:28:b3:36:a0

VSW
    NAME             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE  
    primary-vsw0     00:14:4f:f9:da:3e igb0      0    switch@0              1               1                         1500        
    primary-vsw1     00:14:4f:fb:6c:90 igb1      1    switch@1              1               1                         1500        
    primary-vsw2     00:14:4f:fb:4f:94 igb2      2    switch@2              1               1                         1500        
    primary-vsw3     00:14:4f:f9:c6:fa igb3      3    switch@3              1               1                         1500        

------------------------------------------------------------------------------
NAME             
ldom1            

MAC
    00:14:4f:fb:44:a5

NETWORK
    NAME             SERVICE                     ID   DEVICE     MAC               MODE   PVID VID                  MTU   LINKPROP  
    vnet0            primary-vsw0@primary        0    network@0  00:14:4f:fb:ef:68        1                         1500  phys-state
    vnet1            primary-vsw1@primary        1    network@1  00:14:4f:f9:aa:98        1                         1500  phys-state
    vnet2            primary-vsw2@primary        2    network@2  00:14:4f:fb:56:21        1                         1500  phys-state
    vnet3            primary-vsw3@primary        3    network@3  00:14:4f:fb:0b:f7        1                         1500

Checking link status on the guest domain,

root@maxis71 # dladm show-dev
vnet0           link: up        speed: 0     Mbps       duplex: unknown
vnet1           link: up        speed: 0     Mbps       duplex: unknown
vnet2           link: up        speed: 0     Mbps       duplex: unknown
vnet3           link: unknown   speed: 0     Mbps       duplex: unknown

Plumb the interface,

root@maxis71 # ifconfig vnet3 plumb

Now, link for vnet3 is up. Yay!

root@maxis71 # dladm show-dev
vnet0           link: up        speed: 0     Mbps       duplex: unknown
vnet1           link: up        speed: 0     Mbps       duplex: unknown
vnet2           link: up        speed: 0     Mbps       duplex: unknown
vnet3           link: up        speed: 0     Mbps       duplex: unknown

Tadaaa, we can configure vnet3.

Reference,

Comments

Post a Comment

Your email is never published nor shared. Required fields are marked *