Introduction to route packet forwarding

Source: Internet
Author: User
Tags file transfer protocol

Router is the core of the network. The role of the router is to connect each network. Therefore, the router is responsible for data packet transmission between different networks. The efficiency of Internet communication depends on the performance of the router, that is, whether the router can forward data packets in the most effective way. In addition to packet forwarding, the router also provides other services. To meet today's network needs, routers are also used to ensure service availability around the clock (24x7, 7 days a week, 24 hours a day. To help ensure network connectivity, the router uses a backup path to prevent faults in the preferred path. L integrated data, video, and voice services are provided through wired and wireless networks. The router uses the Quality of Service (QoS) of IP data packets to ensure real-time communication, such as ensuring that voice, video, and important data are not lost or delayed. L The Impact of worms, viruses, and other attacks by allowing or rejecting packet forwarding. Internal Structure of the router: the router contains many common hardware and software components of other computers, including: l CPU (central processor) l RAM (Random Access Memory) l ROM (read-only memory) l The Operating System (Cisco IOS) router can connect to multiple networks, which means that it has multiple interfaces, each of which belongs to a different IP network. When a router receives an IP packet from an interface, it extracts the destination IP address of the packet and matches it with the route table of the router to decide which interface to forward the packet. The router is mainly responsible for transmitting data packets to local and remote destination networks. The method is as follows: l determine the optimal path of the sent data packet l forward the data packet to the destination (the router uses the route table to determine the optimal path of the forwarded data packet. When the router receives a packet, it checks its destination IP address and searches the routing table for the most matched network address. A vro receives packets encapsulated by a certain type of data link frame (such as an Ethernet frame). When such packets are forwarded, package encapsulation depends on the type of the router interface and the type of media connected to it .) Vro CPU and memory: vro components and their functions vrouters include: l central processor (CPU) c pu to execute operating system commands, such as system initialization, routing and switching functions. L random access memory (RAM) l read-only memory (ROM) RAM stores the instructions and data to be executed by the CPU. RAM is used to store the following components: l Operating System: at startup, the Operating System copies Cisco IOS (Internetwork Operating System) to RAM. L run the configuration file: This is the configuration file that stores the configuration commands currently used by the router IOS. Except for a few special commands, all commands configured on the vro are stored in the running configuration file, also known as running-config. L IP route table: This file stores information about the direct network and remote network, used to determine the optimal route for packet forwarding. L ARP cache: This cache contains the ing between IPv4 addresses and MAC addresses, similar to ARP cache on a PC. ARP cache is used on a router with a LAN interface (such as an Ethernet interface. L Data Packet Buffer: After the data packet arrives at the interface and before it is sent from the interface, it will be temporarily stored in the buffer. RAM is a volatile memory. If a vro is powered off or restarted, its content will be lost. ROM is a permanent storage. Cisco devices use ROM for storage: l bootstrap command l basic diagnostic software l Lite version IOSROM uses firmware, that is, software embedded in the integrated circuit. Flash Memory: non-volatile computer memory, which can be stored and erased electronically. Flash memory is used as a permanent storage for the operating system Cisco IOS. If the router is powered off or restarted, the content in flash memory will not be lost. NVRAM: NVRAM (non-volatile RAM) does not lose information after the power is off. It is generally used to save the configuration file at startup. IOS (Internetwork Operating System): IOS is the Operating System, which can manage the hardware and software resources of the router, including memory allocation, process, security, and file System. Cisco IOS is a multitasking operating system that integrates routing, switching, Internet, telecom, and other functions. The more IOS functions a person has, the larger the IOS file. Router START process: the START process is divided into four main stages: 1. run POST2. load bootstrap program 3. search for and load Cisco IOS software 4. search for and load the startup configuration file, or enter the setup mode to execute POST: that is, the power-on self-check process should be performed on several hardware components including CPU, RAM, and NVRAM. After the POST is complete, the router runs the bootstrap program. Load bootstrap program: The bootstrap program will copy from ROM to RAM. After entering RAM, the CPU executes the commands in the bootstrap program. The main task of the bootstrap program is to find Cisco IOS and load it to RAM. Search for and load Cisco IOS: find Cisco IOS software. IOS is usually stored in flash memory, but may also be stored in other locations, such as TFTP (simple File Transfer Protocol) servers. If the complete IOS image cannot be found, the lite version of IOS will be copied from ROM to RAM. This version of IOS is generally used to help diagnose problems, or to load the full version of IOS to RAM. Search for and load the configuration file: after IOS is loaded, the bootstrap program searches for the startup configuration file (also known as startup-config) in NVRAM ). This file contains the previously saved configuration commands and parameters, including: l interface address l route information l password l other configurations saved by the network administrator if the startup configuration file startup-config is in NVRAM, it will be copied to RAM as the running configuration file running-config. If not, the router may search for the TFTP server. If the vro detects that an active link is connected to the configured vro, a broadcast is sent through the active link to search for the configuration file. Run the configuration file: If the startup configuration file is found in NVRAM, IOS loads it to RAM as running-config and runs the commands in the file in one row. Enter the Setting Mode (optional): If the startup configuration file cannot be found, the vro will prompt you to enter the setting mode. Is to set the wizard (fool mode) command line interface: Is the debugging mode. Once a prompt is displayed, the router starts to run IOS with the current running configuration file. The network administrator can also start to use the IOS command on the vro. Check the router startup process: Use the show version command to see the information: IOS Version: Cisco Internetwork Operating System Software IOS (tm) C2600 Software (C2600-I-M), version 12.2 (28 ), release software (fc5) is the Cisco ios software version in RAM, which is also the SOFTWARE version used by the router .) ROM Bootstrap program: ROM: System Bootstrap, Version 12.1 (3r) T2, release software (fc1) (displays the System bootstrap SOFTWARE stored in ROM memory (originally used to start the router) .) IOS location: ROM: System Bootstrap, Version 12.1 (3r) T2, release software (fc1) (displays the location where the boostrap program loads in Cisco IOS, and the complete file name of the IOS image .) CPU and RAM size: cisco 2621 (MPC860) processor (revision 0x200) with 60416 K/5120 K bytes of memory (the first part shows the CPU type of the vro. The last part of this line shows the DRAM size. Some series routers (such as 2600) use a portion of DRAM as the data packet storage. Data Packet storage is used to buffer data packets. To determine the total DRAM size on the vro。, add two numbers. In this example, the Cisco 2621 router has 60,416 KB (kilobytes) of DRAM available for temporary storage of Cisco IOS and other system processes. The remaining 5,120 KB is dedicated for data packet storage. The sum of the two is 65,536 K, that is, a total of 64 mb dram .) Interface: 2 FastEthernet/IEEE 802.3 interface (s) 2 Low-speed serial (sync/async) network interface (s) (this output shows the physical interface on the router. In this example, the Cisco 2621 router has two fast Ethernet interfaces and two low-speed serial interfaces .) NVRAM size: 32 K bytes of non-volatile configuration memory. (This is the NVRAM size on the vro. NVRAM is used to store the startup-config file .) Flash size: 16384 K bytes of processor board System flash (Read/Write) (this is the flash size on the vro. Flash memory is used to permanently store Cisco IOS .) Configuration register: Configuration register is 0x2102 (the last line displays the current Configuration value of the software Configuration register (in hexadecimal format ). If there is a second value enclosed in parentheses, this value indicates the configuration register value that will be used for the next reload. The configuration register can be used for multiple purposes, such as password restoration. The default factory settings of the configuration register are 0x2102. This value indicates that the vro loads the Cisco IOS software image from flash memory and the startup configuration file from NVRAM .) Vro port: vro Management port: the Management port (CONSOLE) can be configured with a device, an Auxiliary port (AUX), a management device, or a modem. Router interface: the router interface is mainly responsible for receiving and forwarding data packets. Different interfaces have different purposes and media. Like other devices, Cisco uses LED lights to provide status information. Interfaces belong to different networks. vro interfaces are mainly divided into two groups: l LAN interfaces-for example, Ethernet interfaces and Fast Ethernet interfaces-l WAN interfaces-for example, serial interfaces, ISDN interfaces, and LAN interfaces of the frame relay interfaces: like a PC, it also has a MAC address and participates in the ARP process. Router interfaces are typically RJ-45 interfaces that support unshielded twisted pair wires (UTP. When a vro is connected to a vswitch, use a pass-through cable. Cross-cable is used when two routers are connected directly through the Ethernet interface or the PC Nic is connected to the router Ethernet interface. WAN Interface: used to connect a vro to an external network. These networks are usually distributed in a distant location. Layer 2 encapsulation of WAN interfaces can be of different types, such as PPP, frame relay, and HDLC (Advanced Data Link Control ). The MAC address is not used on the WAM interface. The WAN interface uses its own layer-3 address. Router and network layer: The main purpose of a router is to connect multiple networks and forward data packets to its own network or other networks. Because the main forwarding decision of a vro is based on layer-7 IP data packets (that is, based on the destination IP address), The vro is considered as a layer-7 device. The process of making a decision is called routing. When receiving a packet, the router checks its destination IP address. If the destination IP address does not belong to any network directly connected to the vro, The vro。 forwards the packet to another vro. After receiving a packet, Each router searches its route table to find the optimal match between the destination IP address of the packet and the network address in the route table. If a match is found, the data packet is encapsulated into the layer-3 data link frame of the corresponding outbound interface. The type of data link encapsulation depends on the interface type, such as the Ethernet interface or HDLC interface. Vro operates on layers 1st, 2nd, and 3rd: After receiving a bit stream, the vro decodes it and uploads it to layer 2nd. In this case, the vro unblocks frames. The router checks the destination address of the data link frame to determine whether it matches the receiving interface (including the broadcast address or multicast address. If it matches the data part of the frame, the IP data packet will be uploaded to Layer 3, which is determined by the router route. Then, the router re-encapsulates the data packet to the new layer 2nd data link frame and forwards it as the encoded bit stream from the outbound port.

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.