You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Copy file name to clipboardExpand all lines: docs/networking/best-practice.md
+40-38Lines changed: 40 additions & 38 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -12,7 +12,7 @@ keywords:
12
12
</head>
13
13
14
14
## Overview
15
-
In this best practice guide, we will introduce how to configure Harvester and the external network to achieve the following goals:
15
+
This best practice guide introduces how to configure Harvester and the external network to achieve the following goals:
16
16
- Traffic isolation between the management plane and the data plane
17
17
- General external switch and router configurations
18
18
- Network access to VMs from different VLANs
@@ -24,45 +24,47 @@ We will use the following diagram as an example to illustrate the best practice.
24
24
25
25
The diagram shows a Harvester cluster composed of two hosts. It contains:
26
26
- Hardware:
27
-
- Two Harvester servers with daul ports network card.
28
-
- One "nonVLAN-aware" switch and one "VLAN-aware" switch. We will use "Cisco like" configuration as example.
29
-
- One router. We will use "Cisco like" configuration as example.
30
-
31
-
-Cabing:
32
-
- The NIC eth0 of the node1 connected to the port `ethernet1/1` of the switch1, while the NIC eth0 of the node2 connected to the port `ethernet1/2` of the switch1.
33
-
- The NIC eth1 of the node1 connected to the port `ethernet1/1` of the switch2, while the NIC eth1 of the node2 connected to the port `ethernet1/2` of the switch2.
34
-
- The port `ethernet1/3` of the switch1 connected to the port `ethernet0/1` of the router.
35
-
- The port `ethernet1/3` of the switch2 connected to the port `ethernet0/2` of the router.
27
+
- Two Harvester servers with dual-port network cards.
28
+
- One non-VLAN-aware switch and one VLAN-aware switch. We will use the Cisco-like configuration as an example.
29
+
- One router. We will use the Cisco-like configuration as an example.
30
+
31
+
-Cabling:
32
+
- The NIC eth0 of the node1 is connected to the port `ethernet1/1` of the switch1, while the NIC eth0 of the node2 is connected to the port `ethernet1/2` of the switch1.
33
+
- The NIC eth1 of the node1 is connected to the port `ethernet1/1` of the switch2, while the NIC eth1 of the node2 is connected to the port `ethernet1/2` of the switch2.
34
+
- The port `ethernet1/3` of the switch1 is connected to the port `ethernet0/1` of the router.
35
+
- The port `ethernet1/3` of the switch2 is connected to the port `ethernet0/2` of the router.
36
36
37
-
- Network Specification:
38
-
-Assume that the subnet of the Harvester hosts is in the VLAN untagged network.
39
-
-Assume all hosts are in the IPv4 subnet `10.10.0.0/24`, the gateway IP address is `10.10.0.254`.
40
-
-Assume that the VM network allows VLAN 100-200.
41
-
-Assume the IPv4 subnets of the VM network are:
42
-
- untagged network: `192.168.0.0/24`, the gateway IP address is `192.168.0.254`.
43
-
- VLAN 100: `192.168.100.0/24`, the gateway IP address is `192.168.100.254`.
44
-
- VLAN 200: `192.168.200.0/24`, the gateway IP address is `192.168.200.254`.
45
-
46
-
- Harvester Configuration:
37
+
- Network specification:
38
+
-The subnet of the Harvester hosts is in the VLAN untagged network.
39
+
-All hosts are in the IPv4 subnet `10.10.0.0/24`, and the gateway IP address is `10.10.0.254`.
40
+
-The VM network allows VLAN 100-200.
41
+
-The IPv4 subnets of the VM network are:
42
+
- untagged network: `192.168.0.0/24`, and the gateway IP address is `192.168.0.254`.
43
+
- VLAN 100: `192.168.100.0/24`, and the gateway IP address is `192.168.100.254`.
44
+
- VLAN 200: `192.168.200.0/24`, and the gateway IP address is `192.168.200.254`.
45
+
46
+
- Harvester configuration:
47
47
- Two cluster networks: `mgmt` and `vm`.
48
-
- Three VM networks under cluster network `vm`: `vlan100`, `vlan200` and `untagged`.
48
+
- Three VM networks under the cluster network `vm`: `vlan100`, `vlan200`, and `untagged`.
49
49
- Six VMs, from `VM1` to `VM6`.
50
-
- One guest cluster `demo` composed by`VM3` and `VM4`.
50
+
- One guest cluster `demo` composed of`VM3` and `VM4`.
51
51
- Two VM load balancers and one guest Kubernetes cluster load balancer.
52
52
53
53
## Multiple Cluster Networks for Traffic Isolation
54
-
The two Harvester hosts equip with two NICs. Specifically, NIC `eth0` is used for the management network (mapped to the cluster network `mgmt`), while NIC `eth1` is used for the VM network (mapped to the cluster network `vm`).
54
+
The two Harvester hosts are equipped with two NICs. Specifically, NIC `eth0` is used for the management network (mapped to the cluster network `mgmt`), while NIC `eth1` is used for the VM network (mapped to the cluster network `vm`).
55
55
56
56
It's beneficial to use two cluster networks to achieve traffic isolation between the management plane and the data plane. If there is an issue with the VM network, you can still use the management network for emergency handling to ensure business continuity. Similarly, if there is a failure in the management network, VM traffic is not affected.
57
57
58
-
If your hardware equips with more NICs, it's recommended to use not less than two NICs for one cluster network. For example, you can use NIC `eth0` and `eth1` for the management network, and use NIC `eth2` and `eth3` for the VM network.
58
+
If your hardware is equipped with more NICs, it's recommended that you use at least two NICs for one cluster network. For example, you can use NIC `eth0` and `eth1` for the management network, and use NIC `eth2` and `eth3` for the VM network.
59
59
60
60
## External Switch and Router Configuration
61
-
1.** Switch1 Configuration **
62
-
Since the management network is under the untagged network, switch1 can be a "non VLAN-aware" switch. Typically, a "non VLAN-aware" switch cannot be configured.
61
+
1.** Switch1 configuration**:
63
62
64
-
2.** Switch2 Configuration **
65
-
Configure the ports `ethernet1/1`, `ethernet1/2` and `ethernet1/3` as trunk ports, and allow VLAN 100-200.
63
+
Since the management network is under the untagged network, switch1 can be a non-VLAN-aware switch. Typically, a non-VLAN-aware switch cannot be configured.
64
+
65
+
2.** Switch2 configuration**:
66
+
67
+
Set the ports `ethernet1/1`, `ethernet1/2`, and `ethernet1/3` as trunk ports, and allow VLAN 100-200.
66
68
67
69
```
68
70
switch2# config terminal
@@ -88,9 +90,9 @@ Since the management network is under the untagged network, switch1 can be a "no
88
90
switch2# copy running-config startup-config
89
91
```
90
92
91
-
3.**Router Configuration **
93
+
3.**Router configuration**:
92
94
93
-
- Configure a DHCP pool for the management network
95
+
- Configure a DHCP pool for the management network.
94
96
95
97
```
96
98
router# config terminal
@@ -104,7 +106,7 @@ Since the management network is under the untagged network, switch1 can be a "no
104
106
router# copy running-config startup-config
105
107
```
106
108
107
-
- Configure three DHCP pools for the VM networks(untagged, vlan100 and vlan200)
109
+
- Configure three DHCP pools for the VM networks(untagged, vlan100, and vlan200).
108
110
109
111
```
110
112
router# config terminal
@@ -132,13 +134,13 @@ Since the management network is under the untagged network, switch1 can be a "no
132
134
133
135
## Network Access to VMs from Different VLANs
134
136
135
-
1. Network connection between VM networks
137
+
1.**Network connection between VM networks**:
136
138
137
-
The router configuration above uses the [`A router on a stick`](https://www.grandmetric.com/knowledge-base/design_and_configure/router-on-a-stick-approach-cisco-configuration/) technology to allow VMs among untagged network, VLAN 100 and VLAN 200 to communicate with each other. Thus, it's not required to add any more configurations on the router.
139
+
The router configuration above uses the [`A router on a stick`](https://www.grandmetric.com/knowledge-base/design_and_configure/router-on-a-stick-approach-cisco-configuration/) technology to allow VMs among untagged network, VLAN 100, and VLAN 200 to communicate with each other. Thus, it's not required to add any more configurations to the router.
138
140
139
-
2. Network connection between VM networks and the management network
141
+
2.**Network connection between VM networks and the management network**:
140
142
141
-
A feasible method to ensure network connectivity between VM networks and the management network is to manually add static routes. The following commands add static routes on the router to allow VMs in the untagged network, VLAN 100 and VLAN 200 to access the management network.
143
+
A feasible method to ensure network connectivity between VM networks and the management network is to manually add static routes. The following commands add static routes on the router to allow VMs in the untagged network, VLAN 100, and VLAN 200 to access the management network.
142
144
143
145
```
144
146
router(config)# config terminal
@@ -180,10 +182,10 @@ The Harvester load balancer is divided into two types: VM load balancer and gues
180
182
router(config)# ip route 192.168.0.0 255.255.255.0 ethernet0/2
181
183
```
182
184
183
-
2. The load balancer IP of the guest Kubernetes cluster load balancer is exposed within the VM network. In the diagram above, the guest cluster `demo` is within the VM network `vlan200` because the VMs consist of the guest cluster are in the `vlan200`. Thus, the guest Kubernetes cluster load balancer `lb2` is exposed within the VM network `vlan200`. There are three scenarios to explain how to access `lb2` if it has obtained the load balancer IP via DHCP:
185
+
2. The load balancer IP of the guest Kubernetes cluster load balancer is exposed within the VM network. In the diagram above, the guest cluster `demo` is within the VM network `vlan200` because the VMs consisting of the guest cluster are in the `vlan200`. Thus, the guest Kubernetes cluster load balancer `lb2` is exposed within the VM network `vlan200`. There are three scenarios to explain how to access `lb2` if it has obtained the load balancer IP via DHCP:
184
186
- You can access it from the VM `VM3` and `VM4` directly because they are in the `vlan200`.
185
187
- You can also access it from the VMs in other VM network directly because of the `A router on a stick` configuration.
186
-
- You can access it from the Harvester hosts, or in other words, the management network by adding the static route on the router.
188
+
- You can access it from the Harvester hosts, or in other words, the management network by adding the following static routes on the router.
187
189
188
190
```
189
191
router(config)# ip route 10.10.0.0 255.255.255.0 ethernet0/1
@@ -193,6 +195,6 @@ The Harvester load balancer is divided into two types: VM load balancer and gues
193
195
194
196
:::note
195
197
196
-
Except static route used above, you can also use dynamic routing protocols such as RIP, BGP, OSPF and ISIS according to your network planning and requirements.
198
+
Except for the static routes above, you can also use dynamic routing protocols such as RIP, BGP, OSPF, and ISIS according to your network planning and requirements.
0 commit comments