[Network engineer routing article]-Huawei static routing basics

1. Introduction of static routing function:

  A static route is a route that is manually configured so that data packets can be transmitted to a specified destination network according to a predetermined path. When the dynamic routing protocol can not learn some route to the destination network, configure a static state will route is very important


Two, static routing application scenarios:

    Static routing is mainly used in small networks. The number of devices in the three-layer switch or router networking is limited, the total network routing is limited, and the maintenance workload is controllable. At this time, static routing can be considered; or the network equipment does not support Some dynamic routing protocols such as RIP and OSPF can only use static routing; in addition, for export equipment, such as routers, firewalls, etc., the default routing for the public Internet can be configured with static routing. Other Internet cafes or college environments use telecommunications. When exporting links from many operators such as China Unicom, China Unicom, etc., use the address library method (that is, static routing) for the resources of the Education Network or China Unicom for precise matching, so that the data flow access to China Unicom is given priority to go through the Unicom export. , Access to the resources of the education network gives priority to the education outlet, and the telecommunications link serves as a backup for both. This method of static routing is simple to configure and precise and controllable. Data packets can be forwarded exactly according to the path configured by the administrator, so sometimes it can be used as a temporary routing strategy to guide the data flow to follow the new configuration. , To supplement some of the shortcomings of dynamic routing protocols, or unexpected routing learning (static routing is usually the highest priority, matching data priority than dynamic RIP, OSFP, BGP routes). 

 

Three, static routing experiment configuration:

  1. Topological diagram:

  image.png

  2. Requirements (purpose) : Use static routing to configure the network so that different network segments can complete mutual access

  3. Configuration ideas:

        1) Set up the topology map environment and mark the planned IP address

    2) Modify the default name of the network device and configure the IP address

   3) Configure static routes to enable mutual access between network segments

  4. Configuration process:

Step 1: Modify the default name of the network device and configure the IP address

  1) Configure each PC information

  image.pngimage.pngimage.png

 

 

2) Configure router AR1 default name and interface IP

<Huawei>sys //Enter system view mode

Enter system view, return user view with Ctrl+Z.

[Huawei]sysname AR1 //Modify the name of the device

[AR1]int g0/0/0 //Enter interface mode

[AR1-GigabitEthernet0/0/0]ip add 192.168.12.1 24 //Configure an IP for the interface, that is, the gateway IP

[AR1-GigabitEthernet0/0/0]int g0/0/1

[AR1-GigabitEthernet0/0/1]ip add 192.168.1.2 24

[AR1-GigabitEthernet0/0/1]int g0/0/2

[AR1-GigabitEthernet0/0/2]ip add 192.168.2.2 24

[AR1-GigabitEthernet0/0/2]quit //Quit the current mode

3) Configure router AR2 default name and interface IP

<Huawei>sys

Enter system view, return user view with Ctrl+Z.

[Huawei]sysname AR2

[AR2]int g0/0/0

[AR2-GigabitEthernet0/0/0]i add 192.168.12.2 24

[AR2-GigabitEthernet0/0/0]int g0/0/1

[AR2-GigabitEthernet0/0/1]ip add 192.168.3.2 24

[AR2-GigabitEthernet0/0/1]quit

 

Step 2: Configure static routes to enable mutual access between network segments

1) Configure router AR1 static route

       [AR1]ip route-static 192.168.3.0 24 192.168.12.2 // Data packets whose destination address is 192.168.3.0/24 are forwarded to 192.168.12.2

2) Configure the router AR2 static route

       [AR2]ip route-static 192.168.1.0 24 192.168.12.1

[AR2]ip route-static 192.168.2.0 24 192.168.12.1

For more learning materials for net workers, to obtain certification-related learning content, you can add q: 696283186

Four, static routing configuration verification:

  1. [AR1]dis ip routing-table //View AR1 routing table

 image.png

2. [AR2]dis ip routing-table //View AR2 routing table

 image.png

3. Test the connectivity of PC3 to PC1 and PC2

 image.pngimage.png

 

4. View the capture information:

 image.png

  It can be seen from the packet capture information that PC3 first uses its own MAC address as the source MAC and obtains the MAC address of the target host PC1 through ARP. After obtaining it, it uses its own IP as the source IP to send data packets to the target host PC1, and PC3 receives PC1 After the reply, complete a data transfer.


Five, save configuration information,

 image.png

 For more learning materials for net workers, to obtain certification-related learning content, you can add q: 696283186

So far, the basic configuration of static routing is complete

Summary: When you cannot learn some destination network routes through dynamic routing protocols, you need to configure static routes

      Static routing is applied to small-scale networks, such as 5 routers or less, static routing can be manually configured

 


Guess you like

Origin blog.51cto.com/15039035/2569459