Router configuration newbie ---- bridging and Routing

Source: Internet
Author: User

When a computer sends information in a network, it splits the information into small fragments, called "data packets" or "data packets". These packages contain the target address. So after they enter the network, they can reach the correct target computer. If the target computer is located in another network, it must be forwarded (Route Selection) to the correct network through a router. How does a router work? It checks the addresses contained in the data package and determines which network the packages should be directed.
To understand how a vro works, we must first understand the basics of bridging and routing.
 
Before a vro is ready to process a message, it must use an interface of the vro to receive the message (Box 1) in the form of frames ). If a frame is received by the LAN interface, the router checks the target MAC address of the frame to determine whether the frame is sent to a host on this website (frame 2 ). If the frame must enter this website, and the protocol for Data encapsulation is configured on the vro, The vro will try to select the route (box 3 ). If this frame should not be received by this website, and the bridging function (box 4) has been configured on the vro, and the protocol used to encapsulate data (Box 6) has not been configured on the vro ), the router will try to bridge it. If a host is running the routing protocol and wants to get a message from another host in another network, the host usually sends the frame to the router and routes it out. If the host is running a bridge protocol, the host will not notice the existence of a bridge. Therefore, the host will never send a frame directly to the bridge.
The so-called "bridging" refers to the process of forwarding a network message based on an address in the header of Layer 3. The inter-network operating system supports multiple types of bridging:
-- Transparent bridging.
-- Encapsulate bridging.
-- Source route bridging.
-- Transparent bridging of source routes.
-- Source route translation bridging.
To understand the bridging process, let's briefly discuss transparent bridging. The reason why the bridge is "Transparent" is that, after the interface LAN connection of the same vro of the host is established, the host will not see the vro. Note that in box 4, the bridging option is considered only when the router receives a frame that is not sent to itself (this website. If the router receives a frame that does not end itself and does not configure the bridging function, it simply "throws" the frame (frame 7 ). A Router (BRIDGE) that performs transparent bridging has the following functions:
-- Investigate the host location.
-- Spreads, forwards, and filters Frames Based on layer-3 addresses.
The bridge processes all frames on all interfaces and investigates the locations of each host in real time. If the bridge receives a frame on an interface, an entry (Population) is built into the bridge table to display the MAC address of the origin host and the interface that received the frame. Using this technology, the bridge can improve its own bridge by table, so as to correctly determine the route. When the bridge keeps abreast of the location of each host, it will execute three F, namely Flooding, Forwarding, and Filtering ).
When the bridge receives a frame, if it finds that the MAC address is not in its own bridge table, it will spread the frame to each interface (except the interface originally received ), as shown in Box 11. Taking this approach is expected to make the frame arrive at its destination regardless of the location of the target host. After the target host responds to the source host, the bridge will update its own bridge table and add a new location.
 
Frames are correctly sent after being forwarded or filtered by the bridge. In Figure 2, frames are forwarded from the interface connected to host 2 intact. Note that the bridge does not have a specific address. It is "Transparent. HOST 1 does not know that there is a bridge. Note that the network addresses of the Two LANs are the same. The two physical LANs are treated as a unified logical LAN.
Now, assuming that two hosts in the same LAN need to communicate, the bridge understands that they all come from the same interface. In this case, the bridge filters out the frames it receives from the host session (frame 14 in Figure 1 ). In other words, the bridge will not pass frames to other interfaces. In this way, the session communication can be performed locally to prevent the local Session from interfering with the sessions in other I 'AN network segments.
Of course, bridging also has shortcomings. When a MAC address is referenced for the first time, the bridge will certainly diffuse it. However, this is not the most serious problem. The most serious problem is that the bridge will also spread all broadcast frames and all multicast frames. If a network application is heavily reliant on broadcast or multicast addressing, it will cause considerable network communication burden, because all broadcast and multicast frames will appear on all LAN network segments.
Routing
The so-called "Route", "route selection", or "Routing" refers to the process of forwarding messages based on an address in the first layer of the network message header. However, in addition to simply reading the layer-4 address, there are still many things to be done at this time. Now, let's gradually explore the basic steps that a router has taken when forwarding network messages.

If the message is to be sent to the router for processing, the router must first know the communication protocol used by the host to determine how to control the message. As mentioned in section 1.1.2, the header of each layer must contain some values to indicate what is encapsulated in the next layer. The router must check the value of the frame header to determine the Protocol encapsulated in the frame.
In the frame header, this is either a "protocol type" field or a "Service Access Point" (SAP) field. The protocol type or SAP field indicates that the data contained in the frame is applicable to a protocol (frame 3 in Figure 1) that is being routed by the router, and the router deletes the frame header, start to process the rest-start the data packet with a 3rd-layer header (box 4 and 5 in Figure l ). On a router, an independent program is run for each protocol of its route. We call this program "Routing process ).
The routing process checks the destination network address in the packet header (this is Layer 1) and searches for consistent records (entries or entries) in a special table ). This Table is a Routing Table, as shown in box 9 of 1. For each protocol of a route, the router sets a route table for it. The route table contains a list of all networks and directions known to the router. If the router does not find an entry that matches the destination network address in the route table, the packet is discarded (Box 8 in Figure 1 ). If the router finds a table entry that matches the destination network address, it uses the information provided in the table to determine the interface to which the data packet is forwarded.
Because a message must appear as a "frame" in the network, the router must encapsulate the package and create a frame in person. In other words, the router must place a new frame header and frame tail in the package (figure 1. Box 4 and 12 ). Note that in figure 1, the content of the package does not change. Because there are many different frame header formats, the router determines the New Frame Header Format of the package based on the Interface Name and encapsulation method found in the routing table.
In Figure 3, data packets are forwarded to a LAN interface. Therefore, the router must set the destination and source MAC address in the frame header. The target MAC address is D, that is, the address of host 2, and the source MAC address is C, that is, the interface sent by the router. It may be strange that how does a router know other network conditions and improve its route table? Of course, the route table cannot be fabricated out of thin air. In fact, there are three ways for a vro to understand the target network:
1) the router is directly connected to the network.
2) We will tell the router about the network.
3) A vro learns about the network from other vrouters.
The router directly connected network will automatically appear in the routing table, so we don't need to worry about it. The network that the router learned from us (the operator) is called "Static Routing", which is actually some manually entered entries in the routing table. We will tell the router packet routing direction until it reaches a target network.
With the correct configuration, routers can communicate with each other and share network-related information. That is to say, routers can "talk" to each other ". After configuring a router so that it can understand the network conditions from other routers, we do not have to worry about creating the route table. Now we will be responsible for the router. Our job is to monitor route table changes.
Make sure the vrouters are not "Chaotic ". A router uses and shares network information ). Those protocols that are responsible for transmitting real data and have been "Routed" by The vro, we call them "Routed protocols ). For each "routing protocol" (such as IP) that can be configured on a router, they have at least one corresponding "routing protocol" (such as RIP and OSPF ). The configuration of the routing protocol is an interesting aspect of the 10 s configuration.
You can run any number of "routing protocols" as needed, as long as the vro is "powerful" and the memory is sufficient. I0S creates a route table for each running route protocol. There are two main types of routing protocols:
1) distance and azimuth.
2) link status.
Which type of network is used depends on many factors, including network requirements, business standards, and even personal preferences. I will not elaborate on their details here. You can find a lot of such information from relevant books.

Related Articles]

  • 19 typical vro configurations
  • Use bridging technology to solve IP Address Configuration Problems
  • Router configuration basics-command status

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.