1 ==== How To View Specific VTN Station Information.
3 This example demonstrates on how to view a specific VTN Station information.
5 .EXAMPLE DEMONSTRATING VTN STATIONS
6 image::vtn/vtn_stations.png[EXAMPLE DEMONSTRATING VTN STATIONS]
9 * Configure mininet and create a topology:
12 $ sudo mn --custom /home/mininet/mininet/custom/topo-2sw-2host.py --controller=remote,ip=10.100.9.61 --topo mytopo
15 s1 lo: s1-eth1:h1-eth0 s1-eth2:s2-eth1
16 s2 lo: s2-eth1:s1-eth2 s2-eth2:h2-eth0
21 * Generate traffic by pinging between hosts h1 and h2 after configuring the portmaps respectively
26 PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
27 64 bytes from 10.0.0.2: icmp_req=1 ttl=64 time=16.7 ms
28 64 bytes from 10.0.0.2: icmp_req=2 ttl=64 time=13.2 ms
33 * Create a Controller named controllerone and mention its ip-address in the below create-controller command
36 curl --user admin:adminpass -H 'content-type: application/json' -X POST -d '{"controller": {"controller_id": "controllerone", "ipaddr":"10.100.9.61", "type": "odc", "version": "1.0", "auditstatus":"enable"}}' http://127.0.0.1:8083/vtn-webapi/controllers.json
39 * Create a VTN named vtn1 by executing the create-vtn command
42 curl --user admin:adminpass -H 'content-type: application/json' -X POST -d '{"vtn" : {"vtn_name":"vtn1","description":"test VTN" }}' http://127.0.0.1:8083/vtn-webapi/vtns.json
45 * Create a vBridge named vBridge1 in the vtn1 by executing the create-vbr command.
48 curl --user admin:adminpass -H 'content-type: application/json' -X POST -d '{"vbridge" : {"vbr_name":"vBridge1","controller_id":"controllerone","domain_id":"(DEFAULT)" }}' http://127.0.0.1:8083/vtn-webapi/vtns/vtn1/vbridges.json
51 * Create two Interfaces named if1 and if2 into the vBridge1
54 curl --user admin:adminpass -H 'content-type: application/json' -X POST -d '{"interface": {"if_name": "if1","description": "if_desc1"}}' http://127.0.0.1:8083/vtn-webapi/vtns/vtn1/vbridges/vBridge1/interfaces.json
55 curl -v --user admin:adminpass -H 'content-type: application/json' -X POST -d '{"interface": {"if_name": "if2","description": "if_desc2"}}' http://127.0.0.1:8083/vtn-webapi/vtns/vtn1/vbridges/vBridge1/interfaces.json
58 * Configure two mappings on each of the interfaces by executing the below command.
60 The interface if1 of the virtual bridge will be mapped to the port "s1-eth1" of the switch "openflow:1" of the Mininet.
61 The h1 is connected to the port "s1-eth1".
63 The interface if2 of the virtual bridge will be mapped to the port "s1-eth2" of the switch "openflow:1" of the Mininet.
64 The h2 is connected to the port "s1-eth2".
68 curl --user admin:adminpass -H 'content-type: application/json' -X PUT -d '{"portmap":{"logical_port_id": "PP-OF:00:00:00:00:00:00:00:01-s1-eth1"}}' http://127.0.0.1:8083/vtn-webapi/vtns/vtn1/vbridges/vBridge1/interfaces/if1/portmap.json
69 curl -v --user admin:adminpass -H 'content-type: application/json' -X PUT -d '{"portmap":{"logical_port_id": "PP-OF:00:00:00:00:00:00:00:02-s2-eth2"}}' http://17.0.0.1:8083/vtn-webapi/vtns/vtn1/vbridges/vBridge1/interfaces/if2/portmap.json
72 * Get the VTN stations information
75 curl -X GET -H 'content-type: application/json' -H 'username: admin' -H 'password: adminpass' "http://127.0.0.1:8083/vtn-webapi/vtnstations?controller_id=controllerone&vtn_name=vtn1"
81 curl -X GET -H 'content-type: application/json' -H 'username: admin' -H 'password: adminpass' "http://127.0.0.1:8083/vtn-webapi/vtnstations?controller_id=controllerone&vtn_name=vtn1"
85 "domain_id": "(DEFAULT)",
90 "macaddr": "b2c3.06b8.2dac",
92 "port_name": "s2-eth2",
93 "station_id": "178195618445172",
94 "switch_id": "00:00:00:00:00:00:00:02",
95 "vnode_name": "vBridge1",
96 "vnode_type": "vbridge",
100 "domain_id": "(DEFAULT)",
105 "macaddr": "ce82.1b08.90cf",
106 "no_vlan_id": "true",
107 "port_name": "s1-eth1",
108 "station_id": "206130278144207",
109 "switch_id": "00:00:00:00:00:00:00:01",
110 "vnode_name": "vBridge1",
111 "vnode_type": "vbridge",