Basic router configuration and transmission protocol

Source: Internet
Author: User
Tags high cpu usage

In today's era of rapid network development, routers play an important role. Because the router acts as a relay system in the network layer,

Provides a routing and forwarding function for data between the third-tier networks. Therefore, the functions, functions, and basic configurations of routers must be mastered as members of the IT industry.

In the following, we will make a brief analysis on the vro from two aspects: how to set up the simplest network environment in the experiment, common situations and corresponding solutions are often encountered in the configuration; and different data encapsulation protocols (HDLC and PPP) are applied to data transmission over the Internet) and link compression to compare the transmission rate.

Vro configuration and Network Construction

To build a network, you must have a clear understanding of the network structure in the application, correct physical connection, IP Address Allocation in the router, Wan routing protocol selection, and LAN access are all important in practical applications. The following are three main aspects that we have summarized through experiments to make the entire network run.

1. physical connection between networks

In our experimental environment, the simplest point-to-point environment is used to connect the Wide Area Network Ports of two routers through a MODEM for data transmission. The MODEM is connected to a twisted pair wire (direct line), and the bandwidth of the line transmission is also required. At the LAN port, the router is directly connected to a microcomputer. However, in practical applications, it is often not just two routers connected, or multiple routers, switches, hubs, and so on. This depends on the network structure to determine the quantity and location of network devices, and further consider according to the environment and requirements.

Ii. vro Configuration

Today's vro not only includes the concept of data forwarding and route conversion, but also implements a variety of meanings and functions, such as security restrictions and traffic control. Therefore, here we will briefly introduce several steps to implement the original functions. First, enter the port mode to give each wide area network port and Ethernet port an IP address and the corresponding Address Mask. Secondly, we need to set the link transmission encapsulation protocol for bandwidth and data at the wide area network port (HDLC and PPP protocols are used in the experiment respectively ). Finally, you need to configure the routing protocol. In a large network, there are many different protocols (Static Routing, dynamic OSPF, and VPN) available ). However, we chose CISCO's proprietary dynamic routing protocol (PDUS.

3. user terminal settings

For the convenience of the experiment, we have only placed a Microcomputer In the Ethernet to connect to the Ethernet port. All devices connected from the Ethernet must specify an IP address and the same network segment as the Ethernet port of the router. At the same time, the Ethernet port of the router is used as the gateway, in order to ensure normal information exchange between the Ethernet and the Internet segment.

After the above three configurations, the lab network can run. PING command can be used to check whether two computers can communicate normally. However, in the course of the experiment, there are still many things to pay attention to in each of the above aspects. The following are some of our experiences in the experiment.

1. ASCOM connected to the wide area network is smart. Therefore, after the connection, the two MODEM clock can be synchronized before communication. However, you must note that the MODEM can be customized or manually set. When the transmission rate of the MODEM is changed, the link is automatically disconnected, the slave MODEM will re-Synchronize the clock with the master MODEM to communicate at the new rate.

II. during the port status check of the vro, when the interface is connected to the downlink device, the port is UP. When the downlink device is enabled, and the connection link protocol is configured, the Protocol Status of the port is UP.

3. When configuring the routing protocol, if the protocol is not UP, check that the status of the router is UP for all ports, but the link is disconnected. This is because the router does not transmit the route information of the connected device to the route table of the connected router, when forwarding data, you can only find the directly connected CIDR Block through the route table of the connected router, but cannot find the CIDR block address of the next hop. Only when the protocol runs normally and the router learns the route in the network through the routing protocol can the obtained data be forwarded to the next hop. Note that when using the routing protocol, the network number is specified to use the entire network of the routing protocol.

4. the data link layer encapsulation protocol of the vro Wan must be synchronized, that is, the same encapsulation protocol must be used for sending and receiving data. Otherwise, the WAN port will lose data packets of different interface encapsulation types, resulting in connection failure.

5. Because the interfaces between the microcomputer and the router belong to the same type of network access equipment, they must be connected using a pair of twisted pair wires (crossover lines. In the same case, the vswitch is connected to the hub. You can also identify the port. Cross-line is used for the same logo, and direct-line is used for the opposite.

Data Transmission

The significance of the network itself lies in its ability to make information faster and more easily transmitted to the entire area covered by the network, so as to meet the requirements of the times of informatization and globalization. However, information transmission must be ensured correctly and completely. In the early days of computer communication, people have discovered that for the actual links that often generate code, as long as appropriate control procedures are added, the communication can become relatively reliable. These procedures have evolved into data transmission encapsulation protocols for the Internet, such as HDLC, PPP, ATM, and frame relay. Therefore, after two computers can communicate with each other in this experiment network, we not only transmit the HDLC and PPP data rates, CISCO routers are also used to compare the compression and non-pressurization statuses under the two Protocols respectively.

The software used to test the transmission speed is a registry file of 5.58M, which is used for data transmission over FTP. Binary algorithms and HASH Sorting are applied during the transmission process.

From the experiment results, we can see that in the same network environment, HDLC is a little faster than PPP under normal circumstances. After compression, both Protocols are significantly faster than before compression. Why? Let's start with their structure.

HDLC (High-level Data Link Control), Advanced Data Link Control. The predecessor was the bit-oriented procedure SDLC, which was later called HDLC after being modified by ISO. In a CISCO router, HDLC is the default transmission protocol, which is similar to a common HDLC structure. Therefore, we analyze the structure of HDLC.

Frame Structure of HDLC

Data on the data link layer is in frames. The structure of a frame has a fixed format. The Flag field F (Flag) is placed at the beginning and end of the frame and serves as the frame boundary to solve the bit synchronization problem. The Frame Check Sequence field occupies 16 bits. The generated polynomial is CRC-CCITT. The tested range is from 1st bits of the address field to the last 1 of the information field. The control field C has a total of 8 bits. Many important features of HDLC are implemented by control fields.

The frame format of PPP is similar to that of HDLC. Different from HDLC, the protocol field contains two more bytes. When the Protocol field is 0x0021, the information field is the IP datagram. If it is 0xC021, the information field is the link control data, while 0x8021 indicates the network control data. PPP does not provide reliable transmission with serial numbers and validation. PPP works at the network layer and data link layer, including the NCP and LCP protocols. NCP is a layer-3 multi-protocol encapsulation for LAN, and LCP is used for Wan Link Control Protocol on layer-2.

In terms of the structure of the two, PPP has a more complex control mechanism than HDLC, and the processing time is relatively longer. From the perspective of communication connection, HDLC adopts the handshake protocol between the two parties during connection and disconnection. PPP uses an authentication mechanism. Both parties connect to HDLC and negotiate with each other for identity authentication, LCP configuration, open the communication to the end of the communication, complete the whole process. Therefore, throughout the test, PPP processes the connection data on the link, which takes more time than HDLC. The transmission speed of HDLC is better reflected in the data transmission of large lines. However, PPP is more secure than HDLC. Its Identity Authentication can detect all received data according to security requirements. After Authentication, it will forward the received data or discard the data. Therefore, the requirements for visual transmission for the two protocols are considered.

In addition, we perform link compression transmission for the two Protocols. As a result, both of them are significantly improved in terms of speed. In fact, the so-called compression is the compression of the transmission object, the packet header and the load. Link compression is not a special protocol function, but CISCO provides two compression algorithms dedicated to data transmission through routers-Stac and Predictor.

However, in the HDLC structure, Stac is the only choice. The compression of data by STAC is actually replaced by some redundant data streams with specific tags, and these tags with information are obviously shorter than the replaced data streams. If the algorithm cannot find a replacement string in the data, there will be no compression, or the compression function is not activated during transmission. In some applications, for example, compression only increases the transmission overhead when sending encrypted data. In such cases, the original transmission is not modified. In addition, the Stac compression algorithm imposes high requirements on CPU usage resources and is often not used in vrouters with high CPU utilization. The Predictor compression algorithm is just like its name. This CISCO Priority Algorithm predetects the upcoming feature data sequence from an operating search system, which is generated based on a compression dictionary. What is a compression dictionary? In fact, it is a coding book composed of a large number of possible data sequences. If a feature data stream is found in this dictionary and exactly matches one of the dictionary entries, this dictionary entry will be used to replace the data stream. The obtained entries contain smaller and shorter feature sequences. At the far end, these features are decoded in comparison with the data dictionary.

Data streams are identified and replaced with appropriate information. The Predictor compression algorithm is like a physical language. A gesture can be used to express the entire sentence and meaning (Compressed), far more than the sentence and meaning composed of individual words (no compression) easy to use. Because all groups can understand the gesture language, they can communicate well with each other. On the contrary, when one of them contains an unknown physical language during communication, communication will not occur between them. There will also be a lack of communication during compression. If the compression algorithm is used on one side, the compression algorithm must be used on the other side. (Note that the algorithms used at both ends must be consistent .) Stac is a high CPU usage, while Predictor is an extremely high memory usage. Therefore, if the vro is not equipped with a large-capacity RAM, do not consider implementing the Predictor algorithm. However, if RAM is sufficient, using Predictor is also a good choice. 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.