Describes in detail how to set static routes.

Source: Internet
Author: User

Few common users have a deep understanding of Static Routing settings. Here we will give a comprehensive explanation of this problem. With the popularization of broadband access, many families and small enterprises have set up local networks to share broadband access. In addition, with the expansion of the LAN, the applications of two or more routers are involved in many areas. When there are more than two routers in a LAN, you often need to set up routes because of the mutual access between hosts. Because the network size is small and does not change frequently, Static Routing is the most suitable choice.

As an entry-level article, this article will explain the static route settings with several simple examples, and at the end of the article, I will explain a little knowledge about route summary. This article takes the simplest Broadband Router as an example because this type of home and small office LAN generally use medium and low-end broadband routers. In fact, no matter what type of router, except for the configuration method and command, the principle of configuring Static Routing is not different .) A common Broadband Router with 1 WAN port and 4 LAN port can be considered as the simplest dual-Ethernet router and a four-port small switch, and its WAN port is connected to the Internet, the LAN port is connected to the Intranet for differentiation.

A route is the act of transmitting information from the source to the destination. In terms of image, the information package is like a person who wants to go to a specific location. routing is the process of selecting a path for this person. The route table is like a map marking various routes. The information package relies on Route Guidance in the route table to reach the destination. The route entries are like road signs. A default route exists in most broadband routers without static routing settings, this route forwards information packets from all destinations not in the LAN to the gateway of the WAN port. The Broadband Router only needs to configure the WAN port parameters, and the Intranet host can access the Internet, that is, this route is working. This article will be divided into two parts. The first part describes the application of Static Routing settings, and the second part describes the methods and functions of Route induction. The following uses some typical applications for beginners of the sweet potato network as an example to describe how to set up static routes and configure static routes, and the specific role of Static Routing.

Simplest Series Dual-router Environment

This often occurs in small and medium-sized enterprises that share the Internet with their original routers. As a result of expansion, they need to connect to a vro to connect to another new CIDR block. This is also likely to happen in the family. For example, after a Broadband Router is used to share the bandwidth, a wireless router is added to meet the needs of wireless client access. Sweet potato: The company's original LAN 1, which relies on a router to share the Internet, now adds a router in it, and mounts the host of another network segment LAN 2. After simple settings, it is found that all hosts share the Internet, but the host of LAN 1 cannot communicate with the host of LAN 2, however, the host in LAN 2 can Ping the host in LAN 1. What's going on?

Prawns: this is because the vro isolates broadcast and divides the broadcast domain. At this time, the hosts of LAN 1 and LAN 2 are located in two different CIDR blocks, which are isolated by the newly added vro. In this case, the host under LAN 1 cannot "View" the host in LAN 1, and the information package can only be sent to the default gateway first. At this time, the gateway is not configured with a route to LAN 2, no valid Forwarding is allowed. In this case, you must set entries for static routes. The topology of this network environment is as follows:

1. As shown in figure 1, LAN 1 is the standard class C network segment of 192.168.0.0, router R1 is the original router, its WAN port is connected to broadband, and the LAN port IP address is 192.168.0.1) the WAN port IP address of the host and router R2 is 192.168.0.100 ). The IP address of the LAN port of R2 is 192.168.1.1). The host of the new class c cidr block of LAN 2 192.168.1.0 is mounted.

If you configure a simple static route according to the Internet sharing method, the host gateway of 192.168.0.0 should point to the LAN port 192.168.0.1 of R1 ), the host gateway of the 192.168.1.0 network segment points to the LAN port 192.168.1.1 of R2. As long as the WAN port gateway of R2 points to 192.168.0.1, the host of 192.168.1.0 can access the host of the 192.168.0.0 network segment and access the Internet through broadband. This is because a default route in the aforementioned Broadband Router is working, and it sends all the IP packets that are not in this segment to the gateway of the WAN port, that is, the router R1 ), it is determined by R1 that the information packet should be forwarded to its own intranet or to the Internet. However, the host gateway of the 192.168.0.0 network segment must point to 192.168.0.1, while R1 does not know the correct location of the LAN 2 of 192.168.1.0. In this case, only Internet access and mutual access within the network segment are allowed, you cannot access hosts in the 192.168.1.0 CIDR block. In this case, you need to specify a static route configuration on R1 so that the information packet with the destination IP Address 192.168.1.0 can be forwarded to vror2 R2.


 

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.