An instance of static route settings

Source: Internet
Author: User

For an instance of static route settings, it is easy to complete the settings. Hurry into the Wireless World. 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 explains Static Routing with several simple examples, and explains how to set up Static Routing at the end. 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.

Static Routing 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.

In most broadband routers, if static route settings are not configured, a default route exists internally, 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 routing induction methods and functions.

The following uses some typical static routing settings for beginners of the sweet potato network as an example to describe how to configure Static Routing and static routing entries, and the specific role of Static Routing. Example 1: the simplest series-type dual-router environment usually occurs in the networks where the original routers share the Internet, 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 & #8220; view & #8221; the host in LAN 1 can only send the information package to the default gateway first, at this time, the gateway is not configured with a route to LAN 2, so it cannot be effectively forwarded. In this case, you must set static route entries. The topology of this network environment is as follows:

As shown in a static route configuration, 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 follow the Internet sharing method for simple settings, you should point the host gateway of 192.168.0.0 to the LAN port 192.168.0.1 of R1), and the host gateway of the 192.168.1.0 network segment 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 and 192.168.1.0 hosts can access hosts in the 192.168.0.0 CIDR Block 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 on R1 so that the information packet with the destination IP address of 192.168.1.0 can be forwarded to vror2 R2.

 

Static route settings



A static route entry consists of three parts: 1. the destination IP address or destination network, subnet; 2. subnet mask; 3. gateway or next hop. In example, the static route entry set on R1 should be: the destination IP Address 192.168.1.0 represents the CIDR Block 1. x), the subnet mask 255.255.255.0 because it is a class C network segment), and the next hop 192.168.0.100.

Static route setting 2, which is the static route table configuration in TP-LINK R410, takes effect after saving. For a Cisco Router, type the command: Router (config) # ip route 192.168.1.0 255.255.255.0 192.168.0.100 in global configuration mode. Note: The gateway IP address must belong to the same network segment as the WAN or LAN port.

 

Static route settings

The default route is written as follows: the destination IP address is 0.0.0.0, The subnet mask is 0.0.0.0, And the next hop is the default gateway on the WAN port; 8 default routes with 0 values & #8221 ;. In addition, if the destination IP address is a specific host IP address such as 192.168.1.2), the route entry should be: Destination IP address 192.168.1.2, subnet mask 255.255.255, Next Hop or gateway 192.168.0.100.

Using this connection method, you can also conveniently set the access permissions of hosts under LAN 2 using the built-in access control list of the router, which is very convenient for enterprise users. & #8220; firewall setting & #8221; In a Broadband Router is actually a simplified Access Control list, that is, ACL-Access Control Lists.

For example, if you want a computer with the IP address 192.168.1.7 in LAN 2 to be unable to send or receive emails, computers with IP addresses 192.168.1.8 cannot access the ERP server in LAN 1 in the enterprise. If the IP address is 192.168.0.10, no restrictions are imposed on other computers in the LAN, in this case, you must specify the following data packet filtering table,

 

Static route settings

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.