Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

The principle and configuration of static routing

2025-01-15 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Servers >

Share

Shulou(Shulou.com)06/02 Report--

One principle

1 before we talk about static routing, let's talk about the routing table:

Definition of routing table:

1. A collection of route entries maintained in a router

two。 The router chooses the path according to the routing table

The formation of routing table

Directly connected network segment: configure the IP address, and the port is in UP state to form a directly connected route

Non-directly connected network segment: you have a directly connected network segment on yourself and an undirectly connected network segment on others.

2 static rout

Static routing, a form of routing in which routing items are manually configured rather than dynamically determined. Unlike dynamic routes, static routes are fixed and will not change, even if the network condition has changed or has been reconfigured. Generally speaking, static routes are added to the routing table item by item by the network administrator.

1. Advantages:

The advantage of using static routes is the high security and confidentiality of the network. Dynamic routing requires routers to exchange their routing tables frequently, and the analysis of routing tables can reveal information such as network topology and network address. Therefore, static routing can also be used in the network for security reasons. Does not consume network bandwidth because static routes do not generate update traffic.

two。 Shortcoming

Static routing is usually not suitable for large and complex network environments. On the one hand, it is difficult for network administrators to fully understand the topology of the whole network; on the other hand, when the topology and link state of the network change, the static routing information in the router needs to be adjusted on a large scale. The difficulty and complexity of this work is very high. When the network changes or the network fails, the route cannot be reselected, which is likely to cause the route to fail.

3 default rout

The default route is the route chosen by the router when no other route exists for the destination address in the IP packet. All packets whose destination is not in the routing table of the router use the default route.

This route is usually connected to another router, and this router also processes the packet: if you know how to route the packet, the packet will be forwarded to a known route; otherwise, the packet will be forwarded to the default route to reach another router. Each time the route is forwarded, the route increases the distance by one hop.

If there is no default route, packets whose destination address does not match the table entry in the routing table will be discarded. Default routing is very effective in some times. when there is a stub network, the default route will greatly simplify the configuration of the router, reduce the workload of the administrator, and improve the network performance.

4 comparison between switching and routing

1. Routing works at the network layer

two。 Forward data according to the routing Table

3. Route selection

4. Routing Forwardin

Switching works at the data link layer

5. Forward data according to the MAC address Table

6. Hardware forwarding

5 configuration of static and default routes:

1. Configuration of static rout

Router (config) # ip route network mask {affress | interface}

The meanings of each parameter are as follows:

Network: destination network address

Mask: subnet mask

Address: the interface address of the next-hop router through which the destination network is reached

Interface: the local interface address that reaches the destination network

two。 Configuration of default rout

Router (config) # ip route 0.0.0.0 0.0.0.0 address

The meanings of each parameter are as follows:

"0.0.0.0 0.0.0.0": represents any network, that is, packets destined for any network are forwarded to the next router interface address specified by the command

* address: interface address of the next-hop router through which the destination network segment is reached

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Servers

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report