Break through VLAN

Source: Internet
Author: User

VLAN is a technology of network switches. Different computers can be divided into different networks so that they cannot communicate with each other to improve security and network performance. To communicate across VLANs, you must use a vro or a layer-3 Switching Module.

The ADSL Network in our city uses the Cisco ipvst3169 L3 switch on the access layer, and sets VLAN on the port to separate users of the same IP segment from each other. In this way, the security is high, but it is a pity that it is not convenient to play games or share files at ordinary times. You need to transfer data through other IP segments. Therefore, it is imperative to break through the VLAN.

The IP address range of my instance is 10.145.254.x, the gateway is 10.145.254.1, and a 24-bit mask is used. Because the IP address range is the same, the computer will not automatically forward data through the router, and the computer wants to contact the other computer through direct communication. In a VLAN environment, ARP cannot receive a response, so direct communication is disabled.

To achieve interoperability, you must force the computer to send data to the router.

As you know, the router determines whether a data packet should be forwarded based on its Layer 2 address and Layer 3 address. If the target MAC address of the packet is not the MAC address of the router interface, the packet is not sent to the router at all, but a layer-1 broadcast packet generated by the HUB; if the target MAC address is the same as the MAC address of the router interface, but the target IP address is not the IP address of the router interface, the package should be routed out; if both the target MAC address and IP address match the router interface, the packet is sent to the router itself.

When the computer sends data, it first determines whether the destination and itself are in the same IP network segment. If the IP address is in the same CIDR Block, an ARP request is sent to query the MAC address of the peer, and then the packet is sent. If the IP address is not in the same CIDR Block, the packet is sent, set the target MAC address in the packet header to the MAC address of the router interface of this subnet, while the destination IP address is the packet of the IP address of the computer that finally receives data. After the router receives the data, it forwards it.

To force the computer to send data directly to the router, you can start from the ARP Protocol or from the process of determining whether the same network segment is used.

The ARP method is as follows:

1,Run the arp-a command to view the list of known MAC addresses. Because only the gateway and itself are in the current VLAN, only the MAC address of the gateway is displayed here:

Internet Address Physical Address Type

10.145.254.1 00-d0-04-14-af-fc dynamic

2,Use the arp-s command to forcibly bind the IP address of the computer to communicate with and the MAC address of the gateway. In this way, the computer will send the data sent to the other party to the router. The other machine also needs to run this command, but the IP address must be specified as this one. For example, for 10.145.254.a and 10.145.254. B communication, run arp-s 10.145.254. B 00-d0-04-14-af-fc on 10.145.254. B, and run arp-s 10.145.254.a packet on 10.145.254. B.

After such setup, the computer thought it was sending data directly, and the router thought it had received the data packet to be routed. This is actually an ARP spoofing technology.

The Method for Determining the same subnet is as follows:

Both parties use the route command to create a "host route ". Host Routing is a route entry for a computer, not an IP address segment. Its target mask is 255.255.255.255.255.

Run on 10.145.254.aRoute ADD 10.145.254. B MASK 255.255.255.255 10.145.254.1Run on 10.145.254. BRoute ADD 10.145.254.a MASK 255.255.255.255 10.145.254.1You can. According to the longest routing matching principle, the computer will select the one with more than one mask when sending data, that is, the Host Routing (32-bit mask ), instead of the same subnet (24-bit mask) as the other party ).

The above two methods can be used to break through the VLAN restrictions. In addition to cs lan Gane, other software except Internet Game is running normally.

Article entry: csh responsible editor: csh

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.