Set up IP address-based VLAN

Source: Internet
Author: User

1. Planning VLAN
The LAN with eight computers is divided into two virtual LAN: VLAN1 and VLAN2. PC1 and PC2 both belong to VLAN1 and vlan2. 1.

To identify different computers in the network, you must assign a unique IP address to each computer. An IP address consists of a network number and a host number. If the network numbers of the two computers are the same, the two computers are in the same CIDR block. That is to say, the computers in the same CIDR block must not be in the same physical network. In this way, we can divide virtual subnets (VLANs) based on IP addresses ).
Computers in the same CIDR block can directly communicate with each other, while computers in different CIDR blocks must communicate with each other through a router. A VLAN is in the same broadcast domain, and communication between VLANs is completed through a 3rd-layer router. To achieve the routing function, hardware devices such as routers and layer-3 switches can be used, you can also install the routing protocol software on a computer.

Ii. Configure VLAN

1. IP Address Settings for each computer in VLAN1
According to the IP address and subnet mask of each computer, the network segment of VLAN1 is 192.168.0.0. The IP address and subnet mask of each computer are set as follows:
(1) Right-click "Network neighbors" and click "properties" in the shortcut menu to open the "Network and dial-up connections" dialog box;
(2) Right-click "Local Connection" and click "properties" in the shortcut menu to open the "Local Connection Properties" dialog box;
(3) Select "Internet protocol TCP/IP)" and click "properties" to open the "Internet protocol TCP/IP) properties" dialog box, and enter the corresponding IP address and subnet mask. Figure 2 shows the specific settings of pc1 ).
Set the IP address and subnet mask of other computers in the same way.
2. IP Address Settings for each computer in VLAN2
According to the IP address and subnet mask of each computer, the network segment of VLAN2 is 10.212.1.0. The specific setting method is the same as above.

It must be noted that PC1 and PC2 have two different IP addresses, so that PC1 and PC2 can communicate directly with other computers in VLAN1 and vlan2. You can set these two different IP addresses in two ways: PC1 and PC2 both have two NICs, one with one IP address; two Computers, PC1 and PC2, both have only one network card, but you can set multiple IP addresses on one network card. In method 1, the IP address settings are the same as those in Method 2:
(1) Click "advanced" in Figure 2. The "Advanced TCP/IP Settings" dialog box is displayed.

 


(2) Click "add" and enter a new IP address and subnet mask in the pop-up window.
(3) Click "add" to confirm. In this way, two IP addresses are bound to one Nic, one of which belongs to VLAN1 and the other belongs to vlan2.
After the preceding settings, a physical network is divided into two different VLANs with different network numbers, which cannot communicate directly. To communicate between VLAN1 and VLAN2, you must use a vro to forward information.
Iii. Route settings
In a Windows 2000 network, you can set a Windows 2000 Server as a router. When configuring a route, you must first enable the routing function and then configure static or dynamic routing. If two VLANs need to communicate with each other, you only need to set the gateway of each computer in VLAN1 to 10.212.1.1 and set the gateway of each computer in VLAN2 to 192.168.0.1, figure 4 shows the gateway set by computer PC3 in VLAN1.


Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.