The two layer switch
The two
layer exchange technology
development is relatively mature, buy SL4D the two layer switchbelongs to the data link layer device, can be MAC address information to identify data packets in the forwarding, according to the MAC address, the MAC
address and corresponding
portrecords in their inside a table.
The specific work as follows:
1) when the switch receives a data packet from a port, it reads the source MAC address in Baotou, so that it knows the source MAC address of the machine on which port is connected;
2) to read in Baotou the destination MAC address, and find
the corresponding port on the table;
3) if there is corresponding to the destination
MAC address port table, the data packet is copied directly to the port
of;
Table 4) not
found in the corresponding port of the broadcast
packet to all ports on thedestination
machine, when the source
machine to respond, the switch can also record thedestination MAC address and ports corresponding, in the next data will
no longer need to all ports for broadcasting. Keep repeating this process, the MAC
address information of the whole
network can learn, the two layer switch is the way to establish and maintain its own addresstable.
From the work principle of the two layer switch can infer the following three points:
1) because the switch for most port data and exchange, which requires a bus bandwidth
is wide,if the two layer switch with N ports, each port
bandwidth is M, the switch bus bandwidth is more than N * M, the switch can achieve wire speed switching;
2) learning port connections to the MAC address of the machine, the write address table,address table size (generally two forms: one is
BEFFER RAM, a MAC table numerical), address table access capacity switch size effect;
3) there is a layer two switches generally contain specialized for processing ASIC data
packet forwarding (Application specific Integrated Circuit, application specific integrated circuit) chip, so the forwarding speed can be done very quickly. Because of various manufacturers use different ASIC, directly affect the performance of the product.
The above
three main technical parameters and evaluation of two or three layer
switchperformance, this point please consider equipment selection of attention.
The three layer switch
The first to have
a look the working process of
three layer switch through a simple network.
Devices
using IP A------------------------
three layer switch ------------------------ devices using IP B
For example, A to send data to B, known to IP, then A will use the subnet mask made network
address, to judge whether the purpose of IP and myself in the same network segment. If in
the same network segment, but do not know the data forwarding MAC address, A will send a ARP request, B returns the MAC address, A using the MAC package data packets
and send to the switch, the switch uses two
layer switching module, MAC address lookup table, forward the packet to the appropriate port.
If the
destination IP address display is not the same segment, then A and B to realize thecommunication, in the stream cache entry without a corresponding MAC address entry, will bethe first normal data packets to a default gateway, the gateway in the operating system has been set up, the third layer routing module, so it is visible for is
not in the same subnet data, firstin the MAC table is on the default gateway MAC address; and then by the three layer modulereceives the data packet, routing table lookup to determine arrived in B routing, will construct
a new frame header, the default
gateway MAC address the source MAC address, with host
B MAC address as the
destination MAC address. The
trigger mechanism by certain
identification,establish the corresponding
relationship between A and B host MAC address
and port forwarding, and recorded into the stream cache entry table, after the A to B data, directly by the two layer switch module. This time is usually
said multiple forwarding routing.
The above is the three layer switch process simple summary, it can conclude that the threelayer exchange:
1) by the combination of hardware forwarding data. This is
not simple superposition of the twolayer
switch and router, switch layer three routing module directly superimposed on the two layerof
high speed backplane bus, breaks through the traditional router interface rate limit, speed up to tens of Gbit/s. Count the backplane bandwidth, these are two important parameters of the three layer switch performance.
2) routing software to simplify
the process of simple routing. Most of the data forwarding, in addition to the necessary routing the routing software processing, are two layer module of high-speed transmission, routing software are the most efficient optimization software processing,and not simply
copy router software.
The two
layer and the three layer switch selection
The two
layer switch for LAN small. This is not to say, in
a small local area network, broadcast packets have little effect, provides solutions to perfect the rapid exchange of the two layer switchfunction, multiple access ports and low - price for small network users.
The router has the advantages of various interfaces, three layer function support of the powerful, routing ability strong, suitable for large inter network routing, its advantage is to select the best route, load sharing, link backup and other network routing information exchange, etc.the function of router.
The three
layer switch is the most
important function is to accelerate the large-scale local area network internal data fast forwarding, the routing function is to serve this purpose.
Generally
speaking, in the network data flow, fast forwarding
the response in the network, such as all the layer three switch to do the work, will cause the layer three switch overburdened,response speed is affected, the inter
network routing by the router to complete, give full play to the advantages of different devices, it is a good networking
strategy, of course, the premise isthe customer's purse is a
drum, or draw back asks next, let the
three layer switch and also forinternet.
The four layer switch
A simple
definition of the fourth layer
exchange is: it is a function, it not
only determines thetransmission based on MAC address (the second layer bridge) or the source / destination
IP address (the third layer routing), and on
the basis of TCP/UDP (fourth) application of the port number. The fourth layer switching function is like a virtual IP, pointing
to the physical server. Itfollows the protocol transmission business variety, HTTP, FTP, NFS, Telnet or other protocols.These operations in a physical server basis, the need for complex load balancing
algorithm.
In the IP
world, business type is determined by the terminal TCP or UDP port
address,application of interval in
the fourth layer exchange is determined by the source terminal and theterminal IP
address TCP and UDP port, common. In the fourth layer exchange for each searchserver group set up for the
use of virtual IP address (VIP), each server to support someapplication. The domain name server (DNS) for each application server address is stored in theVIP, not the actual server address. When a user application, a target
server group VIP connection
request (such as a TCP SYN packet to the
server switch). The server switch selectsthe best server in the group, the terminal address in VIP with the
actual server IP to replace, and the buy CXL connection request to the server. In this way, the same interval of all packets are mapped
bythe server switch, transmission in the user and the
same server
没有评论:
发表评论