Routing and Switching (VI): Static Routing and Routing Basics

Static Routing and Routing Basics

First, the basic routing

1, the router works

A router receives a data packet, check the destination IP address, and then routing table. After finding the route table forwarding matching entry according to the interface and the next hop of the packet data entry. Routing table entries are generally divided into direct routes, static routing and dynamic routing. IP routing table stores the optimal routing entries. The optimum route heading longest match rule Usually, route priority, routing metric is selected.

  • The longest match: multiple matching routing table if the destination network routing entry exists, select the longest entry in the mask table plus
  • Routing priority: when the same mask length, route priority comparison, the smaller the priority routing protocol priority
  • Routing metric: when the same priority routing, routing metric comparison, the smaller the priority metric.

2, route type

Route types are as follows

  • Direct routes: found link layer protocol routing entries, also known as interface routes
  • Static Routes: manually configured route. Static routing configuration is simple, suitable for small network topology is simple.
  • Dynamic routing: routing, dynamic routing protocol common dynamic routing protocols study found there are RIP, OSPF, BGP, ISIS, etc.

3, Huawei default routing protocol priority

Routing and Switching (VI): Static Routing and Routing Basics

Second, the static routing

1, Introduction to Static Route

Static routing configuration simple and flexible, can achieve load balancing and routing backup. Need to manually configure and maintain the route, when the network topology changes can not respond in a timely manner, the need to manually update the configuration for simple network configuration scenarios.

2, static routing configuration

Configuring common static routes
ip route-static net_prefix netmask next_hop_ip

<br/>ip route-static 2.2.2.0 255.255.255.0 10.1.0.2<br/>ip route-static 2.2.2.0 255.255.255.0 10.1.1.2<br/>
Cost load balancing
Routing and Switching (VI): Static Routing and Routing Basics

Floating static routes configured
IP route by the preference-static net_prefix Netmask next_hop_ip High
IP-route static net_prefix Netmask next_hop_ip by the preference Low
<br/>ip route-static 2.2.2.0 255.255.255.0 10.1.0.2<br/>ip route-static 2.2.2.0 255.255.255.0 10.1.1.2 preference 100<br/>
static routes Floating
Routing and Switching (VI): Static Routing and Routing Basics

When GigabitEthernet0 / 0/0 interface failure, the switching to GigabitEthernet0 / 0/1 Interface
Routing and Switching (VI): Static Routing and Routing Basics

Guess you like

Origin blog.51cto.com/12631595/2479835