Support for 802.1Q tags for NICs in Windows

Source: Internet
Author: User

WindowsNic pair802.1Q tagSupport

Objective: To test the device's support for 802.1 p, that is, the device can forward data of different priority levels to the priority value in the 802.1Q tag. Because there is no Smartbits, no VLAN terminal device, and no VLAN switch at hand, you can only rely on the NIC of the PC machine to generate the 802.1Q Network Package.

Theoretically, VLAN is a software-level function. The NIC only acts as a physical link. Any Nic supports VLAN as long as the driver supports it. For exampleInuxAfter the 8021q. O module is loaded, you can use the vconfig tool to set the vlan id and priority. In Windows, many NICs claim to support 802.1Q/P. However, the actual test results may vary. I can directly perform the test on Linux. Out of curiosity, I have tested the following types of Windows:

Test conditions:

1. In pC1 Linux, use vconfig to configure vlan id as 3 and IP address as 192.168.1.5.

2. In PC2 Windows XP system (with Linux Virtual Machine and ethereal packet capture tool installed), the NIC to be tested is inserted above, and the IP address is 192.168.1.6

I. System: Windows XP NIC: RealTek rtl8169/8110 family Gigabit Ethernet NIC "802.1Q/1 p VLAN tagging" is displayed on the NIC configuration page, as shown below:

What is the role of enable? First, use a Linux machine (pC1) to tag its vlan id 3. The result is as follows:

When PC2 captured packets with Ethereal, it was found that PC2 received a packet with a tag but responded to pC1 with ARP reply without a VLAN tag. Therefore, pC1 discards the response packet. The surface phenomenon is that pC1 cannot Ping pc2.

So how can we make PC2 send packets with VLAN tags? First, install a virtual machine VMware in windows, and install a Linux system on this virtual machine. Both redhat9 and Fedora can be used, mainly for Nic settings. Set this mode to bidged:

And specify it as a physical Nic. The host virtual network mapping settings in edit-> virtual network setting are as follows:

In this way, the virtual machine is directly connected to the rtl8169 external Nic, And the VLAN protocol is easily loaded in Linux. (Method:

Modprobe 8021q vconfig add eth0 3 ifconfig eth0.3 192.168.1.217 netmask 255.255.255.0

) OK. Now we can send packets to pC1 on a virtual machine, or pC1 sends packets to the virtual machine. In PC2, packet capture with Ethereal is found to contain tags!

Ii. System: Windows xp nic: RealTek rtl8139/810x family Fast Ethernet NIC no configuration item corresponding to VLAN/802.1Q is found on the NIC configuration page. The configuration page is as follows:

The test results are exactly the same as those of RTL 8169.

3. System: Windows xp nic: Marvell Yukon 88e8038 PCI-E Fast Ethernet controller

Similarly, if you use Linux to send a package with a tag to it and use Ethereal to capture packets on PC2, this result is different from the previous one. ethereal caught a package without a tag, this indicates that the network adapter directly removes the 802.1Q tag. Naturally, the network is naturally disconnected because no tag package is included in the response. Using the preceding method, a virtual machine is also installed in the XP system, and VLAN is configured with vconfig. Then, a packet is sent to pC1 and packet capture is found on pc1, the packets sent by the virtual machine through the PC2 NIC are tagged. PC1 then sends a response packet with a tag to PC2. At this time, the packet capture in pC1 finds that the NIC removes the tag flag, causing the virtual machine to receive a packet without a tag, naturally, communication is no longer possible.

4. System: Windows xp nic: sis191 Ethernet controller

This Nic provides direct support for VLANs and allows you to set VLAN IDs, such:

After the configuration, you can only communicate with networks with the same vlan id. Naturally, you can directly communicate with pC1, and the communication includes tags. However, this Nic can only belong to one VLAN and cannot set the priority in the tag.

In contrast, it is more convenient to use in Linux. You can add the NIC to multiple VLANs and set the priority of inbound and outbound packets.

Related Article

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.