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
35 curl -v --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
40 curl -v --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
42 .Create a vBridge in the VTN
45 curl -v --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
47 .Create two Interfaces into the vBridge
50 curl -v --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
51 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
53 .Configure two mappings on the interfaces
56 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:01-s1-eth1"}}' http://127.0.0.1:8083/vtn-webapi/vtns/vtn1/vbridges/vBridge1/interfaces/if1/portmap.json
57 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
59 .Get the VTN stations information
62 curl -v -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"
68 curl -v -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"
72 "domain_id": "(DEFAULT)",
77 "macaddr": "b2c3.06b8.2dac",
79 "port_name": "s2-eth2",
80 "station_id": "178195618445172",
81 "switch_id": "00:00:00:00:00:00:00:02",
82 "vnode_name": "vBridge1",
83 "vnode_type": "vbridge",
87 "domain_id": "(DEFAULT)",
92 "macaddr": "ce82.1b08.90cf",
94 "port_name": "s1-eth1",
95 "station_id": "206130278144207",
96 "switch_id": "00:00:00:00:00:00:00:01",
97 "vnode_name": "vBridge1",
98 "vnode_type": "vbridge",