How to verify Ethernet address for LDOM

 

In this post , we will be discussing about various methods to realize the MAC address of Guest Domains

Displaying mac address of vnet

Adding vnet to guest domain ldom02 will result in ldom manager assigning mac address

# /opt/SUNWldm/bin/ldm add-vnet vnet0 primary-vsw0 ldom02
# /opt/SUNWldm/bin/ldm list-domain -o network ldom02NAME
ldom02

NETWORK           NAME SERVICE        DEVICE     MAC                  MODE   PVID VID
    vnet0         primary-vsw0                        00:14:4f:f8:8d:a1     1

 

Displaying mac addresses assigned to two vnets

Adding vnet to guest domain ldom01 will result in ldom manager assigning mac address from its mac address pool

# /opt/SUNWldm/bin/ldm add-vnet vnet0 primary-vsw0 ldom01

  
Adding vnet to guest domain ldom01 in hybrid mode  will result in ldom manager assigning mac address
NOTE: hybrid feature is supported only on nxge 10Gigabit ethernet  which is part of XAUI slot. Hybrid feature is supported from ldom 1.1

# /opt/SUNWldm/bin/ldm add-vnet mode=hybrid vnet1 primary-vsw0 ldom01

 
Below command will show the mac address assigned to vnet0 and vnet1. 00:14:4f:fa:33:e5 is the system mac address of guest ldom ldom01.

# /opt/SUNWldm/bin/ldm list-domain -o network ldom0
NAME
ldom01MAC
    00:14:4f:fa:33:e5

NETWORKNAME   SERVICE                DEVICE            MAC       MODE   PVID VID
vnet0    primary-vsw0@primary        network@0     00:14:4f:f8:e2:d9      1
vnet1    primary-vsw1@primary        network@1     00:14:4f:f8:c9:7e       hybrid   1

Guest domain vnet mac address can be verified by logging to guest domain ldom01 and executing ifconfig -a

# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
vnet0: flags=1000843 mtu 1500 index 2
        inet 10.5.63.112 netmask fffff800 broadcast 10.5.63.255
        ether 0:14:4f:f8:e2:d9
vnet1: flags=1000843 mtu 1500 index 3
        inet 192.1.1.3 netmask ffffff00 broadcast 192.1.1.255
        ether 0:14:4f:f8:c9:7e

  

We can find vnet0 and vnet1 mac address by executing prtconf -pv command on ldom01:

# prtconf -pv | grep local-mac-address
        local-mac-address?:  ‘true’
                local-mac-address:  00144ff8.e2d9
                local-mac-address:  00144ff8.c97e

  

Also, We can obtain mac address from guest domain ldom01 obp prompt

{0} ok devalias
vdisk1                   /virtual-devices@100/channel-devices@200/disk@0
vnet1                    /virtual-devices@100/channel-devices@200/network@1
vnet0                    /virtual-devices@100/channel-devices@200/network@0

net                        /virtual-devices@100/channel-devices@200/network@0
disk                      /virtual-devices@100/channel-devices@200/disk@0
virtual-console      /virtual-devices/console@1
name                    aliases

  
Displaying vnet0 mac address:

{0} ok cd  /virtual-devices@100/channel-devices@200/network@0
{0} ok .properties
local-mac-address        00 14 4f f8 e2 d9
max-frame-size           00004000
address-bits             00000030
reg                      00000000
compatible               SUNW,sun4v-network
device_type              network
name                     network

  
Displaying vnet1 mac address

{0} ok cd /virtual-devices@100/channel-devices@200/network@1
{0} ok .properties
local-mac-address        00 14 4f f8 c9 7e
max-frame-size              00004000
address-bits                  00000030
reg                                00000001
compatible                    SUNW,sun4v-network
device_type                  network
name                            network

 

Guest domain System mac address can be displayed by executing banner obp command

{0} ok bannerSPARC Enterprise T5220, No Keyboard
Copyright 2008 Sun Microsystems, Inc.  All rights reserved.
OpenBoot 4.30.0, 1024 MB memory available, Serial #83506149.
Ethernet address 0:14:4f:fa:33:e5, Host ID: 84fa33e5.  

  

MAC-Address collision

Adding vnet to guest domain ldom02 will result in ldom manager assigning mac address from its mac-address pool

# /opt/SUNWldm/bin/ldm add-vnet vnet0 primary-vsw0 ldom02
# /opt/SUNWldm/bin/ldm list-domain -o network ldom02

NAME
ldom02NETWORK
    NAME             SERVICE                     DEVICE     MAC   

Assigning new mac address to vnet0

#/opt/SUNWldm/bin/ldm set-vnet mac-addr=00:14:4f:d3:b1:c1 vswitch=primary-vsw0 vnet0 ldom02

Display new mac address of vnet0

 

#  /opt/SUNWldm/bin/ldm list-domain -o network ldom02
NAME
ldom02

NETWORK
    NAME             SERVICE                     DEVICE          MAC                     MODE     PVID VID
    vnet0            primary-vsw0                                       00:14:4f:d3:b1:c1       hybrid         1                                                                                                                             

Assign mac address of physical interface  to vsw

Assign mac address of e1000g0 to vsw0 and nxge0 to vsw1

Plumb nxge0, run ifconfig nxge0 to find mac address of nxge0 and then unplumb

# ifconfig nxge0 plumb
# ifconfig -a
lo0: flags=2001000849 mtu 8232 index 1
        inet 127.0.0.1 netmask ff000000
vsw0: flags=201000843 mtu 1500 index 2
        inet 10.5.60.232 netmask fffff800 broadcast 10.5.63.255
        ether 0:21:28:16:d8:5c
nxge0: flags=201000842 mtu 1500 index 3
        inet 0.0.0.0 netmask 0
        ether 0:14:4f:c9:e3:ba
# ifconfig nxge0 unplumb

  
Above data shows nxge0 mac address is 0:14:4f:c9:e3:ba. You can also find mac-address from

prtconf -pv | grep local-mac-address

Assignig mac-address 0:14:4f:c9:e3:ba to vsw1 (primary-vsw1) by executing ldm command

#/opt/SUNWldm/bin/ldm add-vsw mac-addr=0:14:4f:c9:e3:ba net-dev=nxge0 primary-vsw1 primary

Below command shows mac address 0:14:4f:c9:e3:ba has been assigned to vsw1
  

#  /opt/SUNWldm/bin/ldm list-domain -o network primary
NAME
primaryMAC
    00:21:28:16:d8:5c

VSW-NAME    MAC    NET-DEV    DEVICE        DEFAULT-VLAN-ID PVID VID     MODE
primary-vsw0 00:21:28:16:d8:5c   e1000g0  switch@0       1         1   
primary-vsw1 00:14:4f:c9:e3:ba   nxge0        switch@1   1        

  

Ramdev

Ramdev

I have started unixadminschool.com ( aka gurkulindia.com) in 2009 as my own personal reference blog, and later sometime i have realized that my leanings might be helpful for other unixadmins if I manage my knowledge-base in more user friendly format. And the result is today's' unixadminschool.com. You can connect me at - https://www.linkedin.com/in/unixadminschool/

What is in your mind, about this post ? Leave a Reply

Close
  Our next learning article is ready, subscribe it in your email

What is your Learning Goal for Next Six Months ? Talk to us