本文档用于测试多个CPE上连到同一VPE时,NQA server及client配置情况

一、添加设备信息,接口为http://localhost:9901/ac/device/doc.html#/default/Device/addDeviceUsingPOST_1

cpe4

  1. [
  2. {
  3. "asNumber": 111,
  4. "deviceType": "cpe",
  5. "esn": "210235A1X4P207000069",
  6. "form": "hardware",
  7. "location": "nanjing",
  8. "manageIp": "172.171.15.253",
  9. "managePwd": "h3cmng",
  10. "manageUsername": "ceni",
  11. "model": "MSR3610",
  12. "name": "cpe4",
  13. "tunnelIfIp": "11.11.11.11",
  14. "vendor": "h3c",
  15. "location": "江苏省南京市",
  16. "version": "7.1.064"
  17. }
  18. ]

cpe14

  1. [
  2. {
  3. "asNumber": 1414,
  4. "bgpLocalIfName": "",
  5. "bgpLocalIp": "",
  6. "bgpMd5": "",
  7. "description": "",
  8. "deviceType": "cpe",
  9. "esn": "000c292858caba6620090303",
  10. "form": "hardware",
  11. "location": "nanjing",
  12. "manageIp": "172.171.15.21",
  13. "managePwd": "h3cmng",
  14. "manageUsername": "ceni",
  15. "model": "MSR3610",
  16. "name": "cpe14",
  17. "tunnelIfIp": "14.14.14.14",
  18. "vendor": "h3c",
  19. "version": "7.1.064"
  20. }
  21. ]

vpe14

  1. [
  2. {
  3. "asNumber": 1515,
  4. "bgpLocalIfName": "",
  5. "bgpLocalIp": "",
  6. "bgpMd5": "",
  7. "description": "",
  8. "deviceType": "vpe",
  9. "esn": "000c29e9d8e1e93b20090303",
  10. "form": "software",
  11. "location": "nanjing",
  12. "manageIp": "172.171.15.24",
  13. "managePwd": "h3cmng",
  14. "manageUsername": "ceni",
  15. "model": "MSR3610",
  16. "name": "vpe14",
  17. "tunnelIfIp": "15.15.15.15",
  18. "vendor": "h3c",
  19. "version": "7.1.064"
  20. }
  21. ]

一次添加所有设备

  1. [
  2. {
  3. "asNumber": 111,
  4. "deviceType": "cpe",
  5. "esn": "210235A1X4P207000069",
  6. "form": "hardware",
  7. "location": "nanjing",
  8. "manageIp": "172.171.15.253",
  9. "managePwd": "h3cmng",
  10. "manageUsername": "ceni",
  11. "model": "MSR3610",
  12. "name": "cpe4",
  13. "tunnelIfIp": "11.11.11.11",
  14. "vendor": "h3c",
  15. "location": "江苏省南京市",
  16. "version": "7.1.064"
  17. },
  18. {
  19. "asNumber": 1414,
  20. "bgpLocalIfName": "",
  21. "bgpLocalIp": "",
  22. "bgpMd5": "",
  23. "description": "",
  24. "deviceType": "cpe",
  25. "esn": "000c292858caba6620090303",
  26. "form": "hardware",
  27. "location": "nanjing",
  28. "manageIp": "172.171.15.21",
  29. "managePwd": "h3cmng",
  30. "manageUsername": "ceni",
  31. "model": "MSR3610",
  32. "name": "cpe14",
  33. "tunnelIfIp": "14.14.14.14",
  34. "vendor": "h3c",
  35. "version": "7.1.064"
  36. },
  37. {
  38. "asNumber": 1515,
  39. "bgpLocalIfName": "",
  40. "bgpLocalIp": "",
  41. "bgpMd5": "",
  42. "description": "",
  43. "deviceType": "vpe",
  44. "esn": "000c29e9d8e1e93b20090303",
  45. "form": "software",
  46. "location": "nanjing",
  47. "manageIp": "172.171.15.24",
  48. "managePwd": "h3cmng",
  49. "manageUsername": "ceni",
  50. "model": "MSR3610",
  51. "name": "vpe14",
  52. "tunnelIfIp": "15.15.15.15",
  53. "vendor": "h3c",
  54. "version": "7.1.064"
  55. }
  56. ]

二、创建虚网,只包括一个分支,接口为http://localhost:9902/ac/management/doc.html#/default/Connection/addConnectionUsingPOST

  1. {
  2. "branchList": [
  3. {
  4. "active": true,
  5. "cpe": {
  6. "accessPoints": [{
  7. "accessRoutes": [
  8. {
  9. "nexthop": "16.1.1.2",
  10. "prefix": "52.1.1.0/24"
  11. }
  12. ],
  13. "bandwidth": "100",
  14. "interfaceIp": "16.1.1.1/24",
  15. "interfaceName": "GigabitEthernet1/0",
  16. "vlan": "1006"
  17. }],
  18. "deviceName": "cpe14"
  19. },
  20. "description": "branch6",
  21. "links": [{
  22. "cpeIfIp": "172.171.15.21/24",
  23. "cpeIfName": "GigabitEthernet2/0",
  24. "cpeName": "cpe14",
  25. "vpeIfIp": "172.171.15.24/24",
  26. "vpeIfName": "GigabitEthernet2/0",
  27. "vpeName": "vpe14"
  28. }],
  29. "encapType": "vxlanOverIpsec",
  30. "name": "branch14",
  31. "vpes": [{
  32. "deviceName": "vpe14",
  33. "peAccessPoints": [{
  34. "interfaceIp": "19.1.1.2/24",
  35. "remoteIp": "19.1.1.1/24",
  36. "interfaceName": "GigabitEthernet3/0",
  37. "vlan": "1099"
  38. }]
  39. }]
  40. }
  41. ],
  42. "description": "connection-nzy",
  43. "name": "connection-nzy"
  44. }

三、更新虚网,新增另一个分支,如果要删除分支,把operation改为delete

接口为http://localhost:9902/ac/management/doc.html#/default/Connection/updateConnectionUsingPOST

  1. {
  2. "branchList": [{
  3. "active": true,
  4. "cpe": {
  5. "accessPoints": [{
  6. "bandwidth": "100",
  7. "interfaceIp": "31.1.1.1/24",
  8. "interfaceName": "GigabitEthernet0/5",
  9. "vlan": "1000",
  10. "dhcpPool": {
  11. "dhcpEnable": true,
  12. "gateway": "31.1.1.1",
  13. "subnet": "31.1.1.0/24",
  14. "dhcpStart": "31.1.1.3",
  15. "dhcpEnd": "31.1.1.254",
  16. "leaseTime": "12"
  17. }
  18. }],
  19. "deviceName": "cpe4"
  20. },
  21. "description": "branch1",
  22. "links": [{
  23. "cpeIfIp": "172.171.15.253/24",
  24. "cpeIfName": "GigabitEthernet0/0",
  25. "cpeName": "cpe4",
  26. "vpeIfIp": "172.171.15.24/24",
  27. "vpeIfName": "GigabitEthernet2/0",
  28. "vpeName": "vpe14"
  29. }],
  30. "name": "branch1",
  31. "operation": "add",
  32. "vpes": [{
  33. "deviceName": "vpe14",
  34. "peAccessPoints": [{
  35. "interfaceIp": "19.1.1.2/24",
  36. "remoteIp": "19.1.1.1/24",
  37. "interfaceName": "GigabitEthernet3/0",
  38. "vlan": "1099"
  39. }]
  40. }]
  41. }
  42. ],
  43. "description": "connection-nzy",
  44. "name": "connection-nzy"
  45. }