Original: routing configuration practices interconnection between two LAN hosts VM linux and vmlinux
I believe that the network is essential for every O & M personnel and developers. Today we want to talk about how to divide the three virtual machines in the vmvm into two local networks to implement different local networks. interconnection: the AC in the figure below communicates with each other through host B instead of the network.
Routing configuration practices:
01. Configure the network information of the server according to the topology.
02. You need to allow linux Server 01 to access linux Server 03 and access through linux Server 02.
Convert linux Server 02 to a vro
03. Implement the test method for mutual access between linux01 and linux03. Use traceroute to prove that the host has been interconnected.
Note: Based on the learned route command, implement the routing configuration project practice.
Let's take a look at the figure to get the following information.
Host A: 10.0.0.10/2
Gateway: 10.0.0.254
Machine B: 10.0.0.11/24
Gateway: 10.0.0.254
10.0.1.11/24
Gateway: 10.0.1.254
Host c: 10.0.1.11/24
Gateway: 10.0.1.254
The first thought of doing this is
First, process the source host. We need a small white machine to avoid mac conflicts. If you clone your current host directly, you will find a mac Error When configuring the NIC on the clone machine and restarting it. You can try it
Create three ABC and three VMS. Connect and clone them here.
Modifies the virtual network of a VM.
ABC Networks
Xshell connection
Rename
Testing
I. source host processing
Before cloning
Use the following command
Vim/etc/sysconfig/network-scripts/ifcfg-eth0
To delete the mak address and UUID lines.
Deleted results
[Root @ oldboyedu-39-nb ~] #>/Etc/udev/rules. d/70-persistent-net.rules
Then clear the file and execute the above command. If no error is reported, it is correct.
This is a network Rule Configuration File
[Root @ oldboyedu-39-nb ~] # Echo '>/etc/udev/rules. d/70-persistent-net.rules'>/etc/s'>/etc/rc. local
Write this command
This is to write the above command to start automatically
[Root @ oldboyedu-39-nb ~] # Shutdown-h now
Shut down for cloning
The operation on the source host is here
2. process the VM. 1. Clone the VM.
Right-click the server you want to clone and choose manage clone.
2. operations on the virtual network Editor
The arrows are different. Please follow my operations.
Operations on B
Operate on the C-host
Operate a VM on host
Operate on B
Create eth1
3-to-C Server
3. Overall Network Optimization
Create A network segment for host
Effective CIDR Block
Modify B to make the second Nic take effect
Below is the command
Vim/etc/sysctl. conf
The number of rows 0 in this file is changed to 1.
Let's make the modification take effect.
Set c
If this parameter is not set, data sent by A to C is generated but no response is returned.
Effective CIDR Block
Call for success
Thank you for reading the documentation of this Workshop. If you are not familiar with this document, please contact our staff.
This document has a very careful partner who will find out, so please check it carefully.
Here is a question about whether the UUID and mac that you just deleted will be generated later.
If you do not understand, please contact my qq20171156119