]> git.proxmox.com Git - pve-network.git/blame - test/documentation.txt
controllers: add generate_controller_rawconfig
[pve-network.git] / test / documentation.txt
CommitLineData
d0b4e1c2
AD
1Here a sample of command with pvesh to manage the sdn.
2
3
4#create a vlan transportzone
613e30f2
AD
5pvesh create /cluster/sdn/zones/ --zone vlanzone --type vlan --ipam pve --bridge vmbr0
6#create a vnet on vlanzone
7pvesh create /cluster/sdn/vnets/ --vnet vnet100 --type vnet --zone vlanzone --tag 100
8#create a subnet on vlanzone
9pvesh create /cluster/sdn/vnets/vnet100/subnets/ --type subnet --subnet 192.168.0.0/24 --gateway 192.168.0.1
d0b4e1c2
AD
10
11
d0b4e1c2 12#create a layer2 vxlan unicast transportzone
613e30f2 13pvesh create /cluster/sdn/zones/ --zone vxlanunicastzone --type vxlan --ipam pve --peers 192.168.0.1,192.168.0.2,192.168.0.3
d0b4e1c2 14
3a437257
AD
15#create an evpn controller
16pvesh create /cluster/sdn/controllers/ --controller evpn1 --type evpn --peers 192.168.0.1,192.168.0.2,192.168.0.3 --asn 1234
17
18#add a ebgp peer
19pvesh create /cluster/sdn/controllers/ --controller bgp1 --type bgp --peers 192.168.0.253,192.168.0.254 --asn 1234 --ebgp --node pxnode1
d0b4e1c2
AD
20
21#create a layer2 vxlan bgpevpn transportzone
3a437257
AD
22pvesh create /cluster/sdn/zones/ --zone layer2evpnzone --type evpn --ipam pve --controller evpn1
23
24#create a layer3 routable vxlan bgpevpn transportzone + exit-nodes
25pvesh create /cluster/sdn/zones/ --zone layer3evpnzone --type evpn --ipam pve --controller evpn1 --vrf-vxlan 4000 --exit-nodes pxnode1,pxnode2
d0b4e1c2 26
d0b4e1c2
AD
27
28
29#create a vnet in the transportzone
938ebef7 30pvesh create /cluster/sdn/vnets/ --vnet vnet10 --type vnet --zone vlanzone --tag 10
d0b4e1c2 31
613e30f2
AD
32#create a vnet in the transportzone with subnets for evpn routing
33pvesh create /cluster/sdn/vnets/ --vnet vnet11 --type vnet --zone layer3evpnzone --tag 11 --mac c8:1f:66:f8:62:8d
34pvesh create /cluster/sdn/vnets/vnet11/subnets/ --type subnet --subnet 10.0.0.0/24 --gateway 10.0.0.1
35pvesh create /cluster/sdn/vnets/ --vnet vnet12 --type vnet --zone layer3evpnzone --tag 12 --mac c8:1f:66:f8:62:8e
36pvesh create /cluster/sdn/vnets/vnet11/subnets/ --type subnet --subnet 10.0.1.0/24 --gateway 10.0.1.1
37
38#display running configuration
39pvesh get /cluster/sdn/vnets --running
40pvesh get /cluster/sdn/zones --running
41pvesh get /cluster/sdn/controllers --running
42pvesh get /cluster/sdn/vnets/vnetX/subnets --running
43
44
45#display pending configuration
46pvesh get /cluster/sdn/vnets --pending
47pvesh get /cluster/sdn/zones --pending
48pvesh get /cluster/sdn/controllers --pending
49pvesh get /cluster/sdn/vnets/vnetX/subnets --pending
d0b4e1c2
AD
50
51
52#apply changes from /etc/pve/sdn.cfg.new to /etc/pve/sdn.cfg
53pvesh set /cluster/sdn
54
55
56#generate local /etc/network/interfaces.d/sdn and reload (need to be called on each node)
57 pvesh set /nodes/<node>/network
58
59
60display transporzone status on all cluster nodes
61#pvesh get /cluster/resources
62┌────────────────────────────────────┬─────────┬───────┬───────────┬─────────┬───────┬────────┬─────────────┬────────────┬────────────┬───────────────┬──────┬───────────┬──────────────┬────────────────┐
63│ id │ type │ cpu │ disk │ hastate │ level │ maxcpu │ maxdisk │ maxmem │ mem │ node │ pool │ status │ storage │ uptime │
64│ sdn/node1/transportzone10 │ sdn │ │ │ │ │ │ │ │ │ kvmformation1 │ │ error │ │ │
65├────────────────────────────────────┼─────────┼───────┼───────────┼─────────┼───────┼────────┼─────────────┼────────────┼────────────┼───────────────┼──────┼───────────┼──────────────┼────────────────┤
66│ sdn/node1/zone1 │ sdn │ │ │ │ │ │ │ │ │ node1 │ │ available │ │ │
67├────────────────────────────────────┼─────────┼───────┼───────────┼─────────┼───────┼────────┼─────────────┼────────────┼────────────┼───────────────┼──────┼───────────┼──────────────┼────────────────┤
68│ sdn/node1/zone4 │ sdn │ │ │ │ │ │ │ │ │ node1 │ │ available │ │ │
69├────────────────────────────────────┼─────────┼───────┼───────────┼─────────┼───────┼────────┼─────────────┼────────────┼────────────┼───────────────┼──────┼───────────┼──────────────┼────────────────┤
70
71
72
73
74#list all transport zones of a node
75
a64ea85d 76pvesh get /nodes/<node>/sdn/zones/
d0b4e1c2
AD
77 ┌─────────────────┬───────────┐
78 │ sdn │ status │
79 ├─────────────────┼───────────┤
80 │ transportzone10 │ error │
81 ├─────────────────┼───────────┤
82 │ zone1 │ available │
83 ├─────────────────┼───────────┤
84 │ zone4 │ available │
85 └─────────────────┴───────────┘
86
87
88#list all vnet status from a node transportzone
89
a64ea85d 90pveset get /nodes/<node>/sdn/zones/<transportzone>/content
d0b4e1c2
AD
91
92 ┌─────────┬────────┐
93 │ vnet │ status │
94 ├─────────┼────────┤
95 │ vnet100 │ error │
96 ├─────────┼────────┤
97 │ vnet101 │ error │
98 └─────────┴────────┘
99
100
101
102