Home > LDom > Add VLAN into LDM vswitch (primary-vsw1)

Add VLAN into LDM vswitch (primary-vsw1)

1. Login control domain

2. List current primary domain setting to show

# ldm list-bindings primary

NAME             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE
primary-vsw1     00:14:4f:f8:72:6f e1000g1   1    switch@1              1               999  2,100                1500
PEER                        MAC               PVID VID                  MTU   LINKPROP
vnet1@gsvmdb01              00:14:4f:f8:48:bc 999  2                    1500
vnet1@testvmdb              00:14:4f:fa:0b:f9 2    100                  1500
vnet1@sgvmdb01              00:14:4f:fa:f0:88 999  2                    1500
vnet1@tvmdb01               00:14:4f:fa:e7:b7 2    100                  1500
vnet1@vivmdb                00:14:4f:f8:d8:7f 1                         1500

3. Add VLAN 199

# ldm set-vswitch vid=2,199,100 primary-vsw1

4. Set guest vivmdb vnet1 in VLAN 199

# ldm set-vnet pvid=999 vid=199 vswitch=primary-vsw1 vnet1 vivmdb

5. Verify the setting of VLAN

# ldm list-bindings primary

NAME             MAC               NET-DEV   ID   DEVICE     LINKPROP   DEFAULT-VLAN-ID PVID VID                  MTU   MODE
primary-vsw1     00:14:4f:f8:72:6f e1000g1   1    switch@1              1               999  2,199,100            1500
PEER                        MAC               PVID VID                  MTU   LINKPROP
vnet1@gsvmdb01              00:14:4f:f8:48:bc 999  2                    1500
vnet1@testvmdb              00:14:4f:fa:0b:f9 2    100                  1500
vnet1@sgvmdb01              00:14:4f:fa:f0:88 999  2                    1500
vnet1@tvmdb01               00:14:4f:fa:e7:b7 2    100                  1500
vnet1@vivmdb                00:14:4f:f8:d8:7f 999  199                  1500 <– this shows vnet1 of vivmdb set to VLAN199

6. Plumb VLAN Connect (vsw199001)  at primary domain

# ifconfig vsw199001 172.31.199.1/24 up

7. Login guest domain vivmdb

# telnet localhost 5004

8. Plumb VLAN interface (vnet199001) at guest domain

# ifconfig vnet199001 plumb
# ifconfig vnet199001 172.31.199.3/24 up
# 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 192.168.77.193 netmask ffffff00 broadcast 192.168.77.255
ether 0:14:4f:f9:2d:4c
vnet199001: flags=201000843<UP,BROADCAST,RUNNING,MULTICAST,IPv4,CoS> mtu 1500 index 4
inet 172.31.199.3 netmask ffffff00 broadcast 172.31.199.255
ether 0:14:4f:f8:d8:7f

# ping 172.31.199.1
172.31.199.1 is alive

 

Advertisements
Categories: LDom
  1. No comments yet.
  1. No trackbacks yet.

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: