Huawei static routing Dynamic routing configuration

Source: Internet
Author: User


First, configure the device name and IP address:
R1:
Enter system view, return user view with Ctrl + Z.
[Huawei]sysname R1
[R1]interface G0/0/1
[R1-gigabitethernet0/0/1]ip address 202.100.1.1 255.255.255.0
Quit
[R1]interface G0/0/2
[R1-gigabitethernet0/0/2]ip Add 202.100.2.1 255.255.255.0
Quit
[r1-gigabitethernet0/0/1]int Lo 0 ===== Create loopback interface
[R1-loopback0]ip Add 1.1.1.1 255.255.255.255
[R1-loopback0]quit

R2:
[R2]interface G0/0/1
[R2-gigabitethernet0/0/1]ip Add 202.100.1.2 255.255.255.0
[R2-gigabitethernet0/0/1]int g0/0/0
[R2-gigabitethernet0/0/0]ip Add 202.100.3.2 255.255.255.0
[R2-gigabitethernet0/0/0]int Lo 0
[R2-loopback0]ip ad 2.2.2.2 255.255.255.255
[R2-loopback0]quit

R3
[R3]int G0/0/2
[R3-gigabitethernet0/0/2]ip Add 202.100.2.3 255.255.255.0
[R3-gigabitethernet0/0/2]int g0/0/0
[R3-gigabitethernet0/0/0]ip Add 202.100.3.3 255.255.255.0
[R3-gigabitethernet0/0/0]int Lo 0
[R3-loopback0]ip Add 3.3.3.3 255.255.255.255

Test
<r1>ping-c 2 202.100.1.2 =====ping two packets
<r1>display IP routing-table = = = View routing table

Two, configure static routes
[R1]ip route-static 3.3.3.3 255.255.255.255 202.100.2.3 = = = Add static Routes
[R1]ip route-static 202.100.3.0 255.255.255.0 202.100.2.3
[r1]display IP routing-table =====static stands for static route, 60 represents static route priority

Three, configure a floating route for backup
To configure a backup static route, which can go R2 when a link between R1 and R3 fails.
[R2]ip route-static 3.3.3.3 255.255.255.255 202.100.3.3
[r1]ip route-static 202.100.3.0 24 202.100.1.2 Preference
[R1]ip route-static 3.3.3.3 202.100.1.2 preference
[R3]ip route-static 202.100.1.0 255.255.255 .0 202.100.3.2
[r1]tracert 202.100.3.3
[r1]interface G0/0/2
[R1-gigabitethernet0/0/2]undo shutdown ( Note: The No drop configuration command in Huawei devices undo) Here restart can also
[R2]ip route-static 0.0.0.0 0.0.0.0 202.100.3.3 = = Add default route
[R2]ping 202.100. 2.1
Four, configure the default route
to configure a backup default route, R1 when a link between R2 and R3 fails.
[R2]ip route-static 0.0.0.0 0.0.0.0 202.100.1.1 preference
[r3]ip route-static 0.0.0.0 0.0.0.0 202.100.2.1 pref Erence
[R2]int g0/0/0
[R2-gigabitethernet0/0/0]shut
[r2-gigabitethernet0/0/0]

[R2]tracert 202.100.2.3
Traceroute to 202.100.2.3 (202.100.2.3), Max hops:30, packet length:40,press Ctrl_c-break
1 202.100.1.1 ms
2 202.100.2.3 ms MS

Huawei static routing Dynamic routing configuration

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.