The principle, difference and example of static routing and default routing

Source: Internet
Author: User
Tags config

Static routing

The concept of static routing

(1) The most original configuration of the route, pure manual, easy to manage, but time-consuming, generally used in small enterprises or middle-down enterprises

(2) The disadvantage of static routing is not to dynamically reflect the network topology, when the network topology changes, the administrator must manually change the routing table;

(3) Static routing does not take up too much CPU and RAM resources on the router and does not occupy the bandwidth of the line. Static routes are also used if you want to hide portions of the network for security reasons or if an administrator wants to control the data forwarding path.

(4) in a small and simple network, static routes are often used because it is simpler to configure static routes.

Configuration of static routes:

IP Router Destination network mask {gateway address interface}

Example:

(1) IP router 192.168.1.0 255.255.255.0 s0/0

The meaning of this sentence is that the router sees the network segment of the destination segment as 192.168.1.0 and sends the packet from the interface s0/0.

(2) IP router 192.168.1.0 255.255.255.0 192.168.2.0

The meaning of this sentence is: On the hosta, the router sees the destination network segment as a 192.168.1.0 packet and sends the packet to the 192.168.2.0 network segment. If you want to go to 192.168.1.0, you must pass 192.168.2.0

Attention:

When writing a static route, if the link is a point-to-point link (for example, a PPP-encapsulated link), both the gateway address and the interface are acceptable ((1) and (2) can be used.

However, if the link is a multiple-access link (for example, Ethernet), only the gateway address ((2)) can be used.

Static Routing configuration Experiment

There are two ways to configure a static route:

(1) The static route with the next hop router;

(2) A static route with a delivery interface.

 Router (config) #hostname A (change router host name) A (config) #interface f0/0 (Enter interface f0/0) A (config-if) #ip address 192.168 .1.1 255.255.255.0 (set interface IP address and subnet mask) A (config-if) #no shutdown (Enable interface) A (config) #interface f0/1 A (config-if) #ip ad  Dress 192.168.2.1 255.255.255.0 A (config-if) #no shutdownxxx The following two select one: Static routing with interface A (config) #ip Route 192.168.3.0 255.255.255.0 F0/1 (destination segment IP address destination subnet mask Send interface (F0/1 of Router a)) or static route A (config) #ip Route 192.168.3.0 255.255.255 with the next hop route. 0 192.168.2.2 (target segment IP address target subnet mask Next router interface IP address) xxxrouter (config) #hostname b b (config) #interface f0/0 B (config -IF) #ip address 192.168.3.1 255.255.255.0 B (config-if) #no shutdown B (config) #interface f0/1 B (config-if) #ip ad Dress 192.168.2.2 255.255.255.0 B (config-if) #no shutdownxxx The following two select one: static route B (config) #ip Route 192.168 with the next hop route. 1.0 255.255.255.0 192.168.2.1 or: Static route B (config) with interface #ip Route 192.168.1.0 255.255.255.0 F0/1 (destination segment IP address destination subnet mask sent Interface (router b)) xxx 

Default route

More Wonderful content: http://www.bianceng.cnhttp://www.bianceng.cn/Network/lyjs/

Proposed: Routing to view the routing table and decide how to forward packets, a static route to a configuration, cumbersome and easy to error, but if the router has a neighbor know how to go all the destinations, you can match the routing table task to it, save a lot of things.

The concept of the default route

(1) In effect, the default route is a special static route, meaning that the router can make a choice when there is no matching table entry between the destination addresses of the packages in the routing table. If there is no default route, a package with the destination address that does not have a matching table entry in the routing table is discarded.

(2) default route (route), which is the default route selected by the router if the destination address in the IP packet cannot find another route that is present.

Default route is 0.0.0.0

When matching an IP address, 0 indicates wildcard, any value is acceptable, all 0.0.0.0. And any destination address will succeed, resulting in the default routing requirements. That means 0 can match any IP address.

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.