How to DIY layer-3 switches

Source: Internet
Author: User

The layer-3 switch is currently one of the mainstream switching devices. Here we will explain how to manually create the layer-3 switch. Recently, the price of vswitches has been greatly reduced. Some models of some domestic brands have fallen below RMB, which is almost the same as that of hubs. With the updates of People's cognition and the demand for bandwidth, switch replacement of the hub in the network architecture is the trend of the times, and "switching to the desktop" is also expected and feasible.

Limitations of L2 Switches

However, these cheap switches are called "Layer 2 switches ". It works on the data link layer, the second layer of the OSI model. It records the MAC address and the associated port of the Computer Nic contained in the data frame by establishing an exchange table in the memory. The switch only transmits the data frame to the corresponding port. If there is no record of the destination address in the exchange table, it can only send the data frame to all ports in broadcast mode. Therefore, all switches currently provide VLAN Division functions. VLAN division is generally specified by ports. data frames are only sent to the ports of the same VLAN, which improves performance and reduces bandwidth.

However, such vswitches can only be used on networks with less complex structures. For example, the entire network has only one CIDR block, or the computers in different CIDR blocks do not access each other. In other cases, such switches are insufficient in functions. Therefore, they are often used only as trunk switches for large networks and are responsible for the last switch from "switch to desktop. The trunk switch must use the "layer-3 Switch". Simply put, "layer-3 Switch" is the "layer-2 switch" that adds the routing function ", it allows user data to be transmitted over the Internet without the need of another router, and its forwarding speed is higher than that of a General router super router, of course, ). However, the enhancement of functions inevitably leads to a rise in the price. Compared with the second-level switch with less than yuan, the price of the third-level switch is generally more than tens of thousands of yuan, of course, this is also related to the prevalence of these switches.

"Assemble" layer-3 switches

This makes some organizations feel embarrassed when selecting network devices. High-end switches are expensive and low-end switches cannot meet the requirements. In the end, they can only go back to the next step and still use routers and hubs to build networks. In fact, when the requirements are not very high, we can use other devices as gateways to upgrade "Layer 2 switches" to "Layer 3 switches. Since the "layer-3 Switch" can be considered as composed of a router and a common switch, the simplest way is to add a router. However, a computer installed with the Windows 2000 Server operating system can also do this, in particular, the price of computer accessories has dropped sharply, and only 5000 or 6000 yuan is required to assemble a machine. However, it is not possible to connect two network segments using two network adapters. This machine can be accessed by any network segment, however, it cannot be used as a gateway to access other machines with different network segments.

We assume that this network consists of two network segments: CIDR Block 1's network address is 100 • 100 • 100 • 0, and the mask is 255 • 255 • 255 • 0; the Network Address of CIDR Block 2 is 100 • 100 • 101 • 0, and the mask is also 255 • 255 • 255 • 0. The computer is connected through a common switch. Now we hope these two network segments can access each other. Obviously, VLANs cannot be used to separate them.

Router settings

Use twisted pair wires to connect a vro to any port of the vswitch. Configure the LAN port of the vro。 to correspond to two IP addresses of different network segments. Command: ip addr 100 • 100 • 100 • 1 255 • 255 • 0; ip addr 255 • 100 • 100 • 1 101 • 255 • 255 • 0 SECONDARY. Other computers only need to set the gateway as the router address of the same network segment to access machines in the other network segment. For more network segments, you only need to configure the IP address on the vro.

PC settings

To run Windows 2000 Server smoothly, MB of memory is essential, and the memory is cheap now. Other CPUs, hard disks, and graphics cards can be used. Low-end switches are generally 10 M, M Adaptive, and the network card will also buy M, use twisted pair wires to connect the network card with any port of the switch, install the TCP/IP protocol.

First, configure two IP addresses on one network card to go To the TCP/IP protocol attribute, and click "Use the following IP Address:" to enter one of the allocated IP addresses and mask, next, click "advanced" and click "add" under "ipsettings-IP Address" to enter the second IP address. Obviously, you can add more IP addresses.

NEXT, go to "Control Panel", click "management tools-Routing and Remote Access", select "network router", and then click "NEXT" several times, the following message is displayed: "You have successfully set this server as a vro." The configuration is complete. Set gateways for other computers.

In fact, this is to set the PC as a "soft router", in other operating systems, the use of third-party software should also be able to achieve. The above experimental environment is: D-LINK switch 1024f24 port, there are 2505 m optical port of the second layer switch), Cisco 550 router, pc p Ⅲ, BX motherboard, M memory ).

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.