The school has two computer classrooms, each with 40 computers, and the two classrooms are connected through switches. To prevent students from transmitting files over the Internet, we set the IP addresses of the computers in these two classrooms to different CIDR blocks. But a new problem arises: although the two classrooms are isolated, it becomes a problem for teachers to deliver Courseware in class. Can this problem be solved? After a series of explorations, we use a single Nic to implement communication between the two classrooms.
Implementation Principle
Only hosts in the same IP subnet can communicate with each other without a router. The host is not in the same CIDR Block and cannot communicate with each other even if it is connected through a vswitch or hub. If you do not believe this, try using two hosts with different IP addresses (for example, 192.168.1.1 and 192.168.2.1, using 255.255.255.0 as the subnet mask ), even if the two computers are connected to the same hub or vswitch, they cannot communicate when only the TCP/IP protocol is used.
We know that a computer can have multiple IP addresses. If we bind more than two IP addresses to a server, one of which is in one CIDR Block (for example, 192.168.1.0 ), another IP address is in another CIDR Block (for example, 192.168.2.0). If the two IP addresses provide the routing function for the server, the two IP addresses act as gateways, and the two CIDR blocks can be connected together. After searching for information, we found that the "Routing and Remote Access" service of Windows 2000 Server can provide the routing function well.
"Routing and Remote Access" configuration
To solve this problem, a server with a static IP address needs to be placed on the switch or hub connecting the two classrooms. This server requires at least two IP addresses, one of which is in the CIDR block of one classroom computer and the other in the CIDR Block of the other classroom computer.
By default, the "route and remote access" service has been installed on Windows 2000 server, but is not configured properly. Therefore, you need to configure the service:
1. log on to the server as an administrator. Click start. In the programs group, a computer management page is displayed. Click the management tools program group, there is a "route and remote access" item in the "Administrative Tools". Find the item, click it, and click "configure and enable route" in the "operation" menu that appears, the "route and Remote Access Server Installation Wizard" appears. Follow the wizard prompts to perform the operation. Click the [next] button and select an option appears. We need to select a "network router", because our goal is to make Windows 2000 Server take responsibility for the router.
2. Click the [next] button. A confirmation protocol window is displayed. Now the IPX/SPX protocol is no longer used, and the netbeui protocol is not a routing protocol, so we only need to route the TCP/IP protocol, select "yes, all available protocols are on the list.
3. Click the [next] button to check whether remote dial-in is allowed. Because in the LAN, users are not allowed to dial in from the telephone line, select "no. Click the [next] button and you will be prompted that the setting is complete. After you click the [finish] button, the message "Starting Routing and Remote Access Service" appears. The "Routing And Remote service" window after the service is started is shown in the figure below.
Set the client
After the service is enabled, You need to specify the IP address of the gateway for the client instead of using it immediately. Although the vro is started, the client computer does not know the IP address of the vro (that is, the gateway), so it still cannot communicate.
The setting of the client is also very simple. If you use Windows 98 as the client, right-click "Network neighbors" and click "properties" in the pop-up menu ", click "TCP/IP" in the protocol list and click the [properties] button. The "TCP/IP properties" dialog box appears. On the "Gateway" tab, enter the IP address of the server in the IP Address Bar under "new Gateway", and then click the [add] button. Which one does the server have? Of course, the IP address is selected in the same network segment as the current host. That is, if the current host IP address is "192.168.1.150", the gateway IP address is the IP address of "192.168.1.x. Of course, this does not need to be set on all computers. You only need to set it on a computer that requires cross-network communication.
After all the settings are complete, run the "ping" command to check whether the communication with another CIDR block is normal. If all the settings are correct, the communication will be okay.
How to stop a service
If you want to interrupt Communication Between Two network segments, how can this problem be achieved? This is also a good solution: In the "route and remote access" program, click "IP Route Selection" and Right-click "Local Connection" on the right, click "properties" in the pop-up menu. A dialog box is displayed, which removes the check box on "enable IP router manager.
If you have multiple CIDR blocks, you can use this method. The principle is the same. If the vswitches or hubs of the two classrooms are not directly connected, you need to install a dual Nic on the server. Each Nic is connected to the vswitch or hub of the same classroom, and then an IP address is specified separately, enable the "Routing and Remote Access" service.