How to Set static routes

Source: Internet
Author: User

By configuring Static Routing, You can manually specify the path to access a certain network. The network structure is relatively simple, generally, Static Routing is used when the path to a network is unique.

Task

Command

Create a static route

Ip routePrefix mask {address | interface}[Distance][TagTag] [Permanent]

Prefix: destination network to be reached

Mask: Subnet mask

Address: the IP address of the next hop, that is, the port address of the adjacent router.

Interface: Local Network interface

Distance: Management distance (optional)

Tag: optional tag values)

Permanent: specify that the route will not be removed even if the port is switched off.

The next hop address for access 192.1.0.64/26 is set to 192.200.10.6 on Router1, that is, when a destination address belongs to the network range of 192.1.0.64/26, route it to an adjacent router with the address 192.200.10.6. On Router3, the next hop address for access to the 192.1.0.128/26 and 192.200.10.4/30 networks is set to 192.1.0.65. Because the Serial 0 address on Router1 is 192.200.10.5 and 192.200.10.4/30 belong to a directly connected network, there is a path to access 192.200.10.4/30, so you do not need to add a static route on router1.

Router1:

Ip route 192.1.0.64 route 192 192.200.10.6

Router3:

Ip route 192.1.0.128 255.255.255.192 192.1.0.65

Ip route 192.200.10.4 route 255.252 192.1.0.65

At the same time, because Router3 is no longer connected to other routers except router Router2, you can also assign a default route to it to replace the above two static routes,

Ip route 0.0.0.0 0.0.0.0 192.1.0.65

That is, as long as the path to the specific destination address is not found in the routing table, the data is routed to the adjacent router with the address 192.1.0.65.

Related Articles]

  • Static route settings and related commands
  • Vro static route configuration command
  • Technology sharing: publish static routes to OSPF

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.