Implementing Unidirectional and Bidirectional VirtualWire Links


In this section you configure a single bidirectional VirtualWire link using the port-association-create command with the option virtual-wire to create a single bidirectional VirtualWire link. Each port of the VirtualWire transmits traffic in full-duplex mode.


This can be implemented in two ways that are functionally equivalent:

  • Configuring VirtualWire direction individually - or
  • Configuring a VirtualWire link using the bidir parameter


To configure a unidirectional VirtualWire link from device A to device B, enter the following command:
CLI (network-admin@Leaf1) > port-association-create name A-to-B virtual-wire master-ports 10 slave-ports 20
REST API Command:  POST http://<switch-ip>/vRes/port-associations
{
“name”: “A-to-B”,
“virtual-wire”:”true”,
“master-ports”: “10”,
“slave-ports”: “20”
}

Note: Please note that the parameter “mode(?) must be set to “true”. This is the case when the switch is running in VirtualWire mode and you are configuring VirtualWire features.



To configure a unidirectional Virtual Wire link from device B to device A, enter the following command:

CLI (network-admin@Leaf1) > port-association-create name B-to-A virtual-wire master-ports 20 slave-ports 10

REST API Command:  POST http://<switch-ip>/vRes/port-associations
{
“name”: “B-to-A”,
“virtual-wire”:”true”,
“master-ports”: “20”,
“slave-ports”: “10”
}

To configure a bidirectional Virtual Wire link from device A to device B, enter the following command:

CLI (network-admin@Leaf1) > port-association-create name A-to-B bidir virtual-wire master-ports 10 slave-ports 20

REST API Command: POST http://<switch-ip>/vRes/port-associations
{
“name”: “A-to-B”,
“bidir”,
“virtual-wire”:”true”,
“master-ports”: “20”,
“slave-ports”: “10”
}

To display existing Virtual Wire links, use the port-association-show command:

CLI (network-admin@Leaf1) > port-association-show

switch          name        master-ports   slave-ports  policy        virtual-wire  bidir
---------      ------      -----------   -----------  -----------  ------------ -----
vw-switch       A-to-B      10            20            all-masters  true        true
 
REST API Command: POST http://<switch-ip>/vRes/port-associations

To delete an existing Virtual Wire link, use the port-association-delete command with the name string parameter:

CLI (network-admin@Leaf1) > port-association-delete name A-to-B

REST API Command: POST http://<switch-ip>/vRes/port-associations/A-to-B