Skip to content

Commit 1fa7381

Browse files
Apply suggestions from code review
Co-authored-by: vickyhella <[email protected]>
1 parent 6f26b5a commit 1fa7381

File tree

1 file changed

+40
-38
lines changed

1 file changed

+40
-38
lines changed

docs/networking/best-practice.md

Lines changed: 40 additions & 38 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ keywords:
1212
</head>
1313

1414
## 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:
1616
- Traffic isolation between the management plane and the data plane
1717
- General external switch and router configurations
1818
- 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.
2424

2525
The diagram shows a Harvester cluster composed of two hosts. It contains:
2626
- Hardware:
27-
- Two Harvester servers with daul ports network card.
28-
- One "non VLAN-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.
3636

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:
4747
- 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`.
4949
- 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`.
5151
- Two VM load balancers and one guest Kubernetes cluster load balancer.
5252

5353
## 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`).
5555

5656
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.
5757

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.
5959

6060
## 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**:
6362

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.
6668

6769
```
6870
switch2# config terminal
@@ -88,9 +90,9 @@ Since the management network is under the untagged network, switch1 can be a "no
8890
switch2# copy running-config startup-config
8991
```
9092

91-
3. ** Router Configuration **
93+
3. **Router configuration**:
9294

93-
- Configure a DHCP pool for the management network
95+
- Configure a DHCP pool for the management network.
9496

9597
```
9698
router# config terminal
@@ -104,7 +106,7 @@ Since the management network is under the untagged network, switch1 can be a "no
104106
router# copy running-config startup-config
105107
```
106108

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).
108110

109111
```
110112
router# config terminal
@@ -132,13 +134,13 @@ Since the management network is under the untagged network, switch1 can be a "no
132134

133135
## Network Access to VMs from Different VLANs
134136

135-
1. Network connection between VM networks
137+
1. **Network connection between VM networks**:
136138

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.
138140

139-
2. Network connection between VM networks and the management network
141+
2. **Network connection between VM networks and the management network**:
140142

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.
142144

143145
```
144146
router(config)# config terminal
@@ -180,10 +182,10 @@ The Harvester load balancer is divided into two types: VM load balancer and gues
180182
router(config)# ip route 192.168.0.0 255.255.255.0 ethernet0/2
181183
```
182184

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:
184186
- You can access it from the VM `VM3` and `VM4` directly because they are in the `vlan200`.
185187
- 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.
187189

188190
```
189191
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
193195
194196
:::note
195197
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.
197199
198200
:::

0 commit comments

Comments
 (0)