41 |
41 |
.. code-block:: console
|
42 |
42 |
|
43 |
43 |
$ kamaki network create --name='My Private Net'
|
44 |
|
attachments:
|
45 |
|
cidr: 192.168.1.0/24
|
46 |
|
cidr6: None
|
47 |
|
created: 2013-06-19T13:52:02.268886+00:00
|
48 |
|
dhcp: False
|
49 |
|
gateway: None
|
50 |
|
gateway6: None
|
51 |
|
id: 3
|
52 |
|
name: My Private Net
|
53 |
|
public: False
|
54 |
|
status: ACTIVE
|
55 |
|
tenant_id: s0m3-u53r-1d
|
56 |
|
type: MAC_FILTERED
|
57 |
|
updated: 2013-06-19T13:52:02.388779+00:00
|
58 |
|
user_id: s0m3-u53r-1d
|
59 |
|
|
60 |
|
Let's create two more networks, one for virtual server 141 and one for virtual
|
61 |
|
server 142
|
62 |
|
|
63 |
|
.. code-block:: console
|
64 |
|
|
65 |
|
$ kamaki network create --name='For virtual server 141'
|
66 |
|
...
|
67 |
|
id: 4
|
68 |
|
...
|
69 |
|
$ kamaki network create --name='For virtual server 142'
|
70 |
|
...
|
71 |
|
id: 5
|
72 |
|
...
|
|
44 |
id: 3
|
|
45 |
status: ACTIVE
|
|
46 |
router:external: True
|
|
47 |
user_id: s0m3-u53r-1d
|
|
48 |
updated: 2013-06-19T13:54:57.672744+00:00
|
|
49 |
created: 2013-06-19T13:52:02.268886+00:00
|
|
50 |
links: ...
|
|
51 |
public: False
|
|
52 |
tenant_id: s0m3-u53r-1d
|
|
53 |
admin_state_up: True
|
|
54 |
SNF:floating_ip_pool: False
|
|
55 |
subnets:
|
|
56 |
type: MAC_FILTERED
|
73 |
57 |
|
74 |
58 |
Connect and disconnect
|
75 |
59 |
----------------------
|
76 |
60 |
|
77 |
|
Lets connect the networks to some virtual servers:
|
|
61 |
Lets connect the network to some virtual servers:
|
78 |
62 |
|
79 |
63 |
.. code-block:: console
|
80 |
64 |
|
81 |
|
$ kamaki network connect 4 141
|
82 |
|
$ kamaki network connect 5 142
|
|
65 |
$ kamaki network connect 3 --device-id=141 --device-id=142
|
83 |
66 |
|
84 |
67 |
.. note:: **network connect** is a shortcut for **port create**:
|
85 |
68 |
|
86 |
69 |
.. code-block:: console
|
87 |
70 |
|
88 |
|
$ kamaki port create --network-id=4 --device-id=141
|
89 |
|
$ kamaki port create --network-id=5 --device-id=142
|
|
71 |
$ kamaki port create --network-id=3 --device-id=141
|
|
72 |
$ kamaki port create --network-id=3 --device-id=142
|
90 |
73 |
|
91 |
74 |
Now, let's check the current network state. We expect to see the servers
|
92 |
75 |
connected to networks with ids 4 and 5, but not 3.
|
... | ... | |
95 |
78 |
|
96 |
79 |
$ kamaki network list -l
|
97 |
80 |
1 public_network
|
98 |
|
attachments:
|
99 |
|
10
|
100 |
|
. . . . . . .
|
101 |
|
20
|
102 |
|
cidr: 10.0.0.0/24
|
103 |
|
cidr6: None
|
104 |
|
created: 2013-05-29T17:30:03.040929+00:00
|
105 |
|
dhcp: True
|
106 |
|
gateway: 10.0.0.254
|
107 |
|
gateway6: None
|
108 |
|
public: True
|
109 |
|
status: ACTIVE
|
110 |
|
tenant_id: None
|
111 |
|
type: CUSTOM
|
112 |
|
updated: 2013-06-19T13:36:51.932214+00:00
|
113 |
|
user_id: None
|
114 |
|
3 My Private Net
|
115 |
|
attachments:
|
116 |
|
cidr: 192.168.1.0/24
|
117 |
|
cidr6: None
|
118 |
|
created: 2013-06-19T13:52:02.268886+00:00
|
119 |
|
dhcp: False
|
120 |
|
gateway: None
|
121 |
|
gateway6: None
|
122 |
|
public: False
|
|
81 |
status: ACTIVE
|
|
82 |
router:external: True
|
|
83 |
user_id: None
|
|
84 |
updated: 2013-06-19T13:36:51.932214+00:00
|
|
85 |
created: 2013-05-29T17:30:03.040929+00:00
|
|
86 |
links: ...
|
|
87 |
tenant_id: None
|
|
88 |
admin_state_up: True
|
|
89 |
SNF:floating_ip_pool: False
|
|
90 |
public: True
|
|
91 |
subnets:
|
|
92 |
53
|
|
93 |
type: IP_LESS_ROUTED
|
|
94 |
2 My Private Net
|
123 |
95 |
status: ACTIVE
|
124 |
|
tenant_id: s0m3-u53r-1d
|
125 |
|
type: MAC_FILTERED
|
126 |
|
updated: 2013-06-19T13:54:57.672744+00:00
|
|
96 |
router:external: True
|
127 |
97 |
user_id: s0m3-u53r-1d
|
128 |
|
4 For virtual server 141
|
129 |
|
attachments:
|
130 |
|
11
|
131 |
|
cidr: 192.168.2.0/24
|
132 |
|
cidr6: None
|
133 |
|
created: 2013-06-19T13:53:02.268886+00:00
|
134 |
|
dhcp: False
|
135 |
|
gateway: None
|
136 |
|
gateway6: None
|
137 |
|
public: False
|
138 |
|
status: ACTIVE
|
139 |
|
tenant_id: s0m3-u53r-1d
|
140 |
|
type: MAC_FILTERED
|
141 |
98 |
updated: 2013-06-19T13:54:57.672744+00:00
|
142 |
|
user_id: s0m3-u53r-1d
|
143 |
|
5 For virtual server 142
|
144 |
|
attachments:
|
145 |
|
12
|
146 |
|
cidr: 192.168.3.0/24
|
147 |
|
cidr6: None
|
148 |
|
created: 2013-06-19T13:54:02.268886+00:00
|
149 |
|
dhcp: False
|
150 |
|
gateway: None
|
151 |
|
gateway6: None
|
|
99 |
created: 2013-06-19T13:52:02.268886+00:00
|
|
100 |
links: ...
|
152 |
101 |
public: False
|
153 |
|
status: ACTIVE
|
154 |
102 |
tenant_id: s0m3-u53r-1d
|
|
103 |
admin_state_up: True
|
|
104 |
SNF:floating_ip_pool: False
|
|
105 |
subnets:
|
155 |
106 |
type: MAC_FILTERED
|
156 |
|
updated: 2013-06-19T13:54:57.672744+00:00
|
157 |
|
user_id: s0m3-u53r-1d
|
158 |
|
$ kamaki network
|
159 |
|
|
160 |
|
It is time to make a meaningful connection: connect two servers to a private
|
161 |
|
network
|
162 |
|
|
163 |
|
.. code-block:: console
|
164 |
|
|
165 |
|
$ kamaki network connect 141 3
|
166 |
|
$ kamaki network connect 142 3
|
167 |
107 |
|
168 |
108 |
Now the servers can communicate with each other through their shared private
|
169 |
|
network. Let's see the network details to confirm that
|
|
109 |
network. A look at the network details will confirm that:
|
170 |
110 |
|
171 |
111 |
.. code-block:: console
|
172 |
112 |
|