关于华为路由基本设置一些基本命令

1
2
3
4
5
6
7
8
9
Displayversion 显示系统软件版本号

Displayclock 查看当前系统和时间

Clockdatetime +时间+日期 修改系统时间参数

“?”和“Tab”命令 在输入信息输入“?”,可查看以输入字母开头的命令

Tab补全命令。非常经常用的说

具体还是需要用到再说吧

静态路由设置


1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
R1路由
<Huawei>system-view //进入系统视图

[Huawei]sysname r1 //更改路由名字r1

[r1]interfaceEthernet0/0/0 //进入端口Ethernet0/0/0

[r1-Ethernet0/0/0]ip add 192.168.67.1 24 //配置端口ip和子代掩码24表示255.255.255.0

[r1-Ethernet0/0/0]quit //退出端口Ethernet0/0/0

[r1]interface Ethernet0/0/1 //进入端口Ethernet0/0/1

[r1-Ethernet0/0/1]ip add 192.168.56.1 24 //进入端口Ethernet0/0/0

[r1-Ethernet0/0/1] quit //退出端口Ethernet0/0/1

[r1]interface LoopBack 0 //进入回环 LoopBack 0

[r1-LoopBack0]ip add 192.168.1.1 24 //配置回环ip和子代掩码

[r1-LoopBack0]quit ////退出回环LoopBack 0
[r1]ip route-static 192.168.57.0 255.255.255.0192.168.56.3

[r1]ip route-static 192.168.2.0 255.255.255.0192.168.67.2

[r1]ip route-static 192.168.3.0255.255.255.0 192.168.56.3



R2路由

<Huawei>system-view

[Huawei]sysname r2

[r2]interfaceEthernet0/0/0

[r2-Ethernet0/0/0]ip add 192.168.67.2 24

[r2-Ethernet0/0/0]quit

[r2]interface Ethernet0/0/1

[r2-Ethernet0/0/1]ip add 192.168.57.2 24

[r2-Ethernet0/0/1] quit

[r2]interface LoopBack 0

[r2-LoopBack0]ip add 192.168.2.2 24

[r2-LoopBack0]quit

[r2] ip route-static 192.168.1.0255.255.255.0 192.168.67.1

[r2] ip route-static 192.168.3.0 255.255.255.0192.168.57.3

[r2] ip route-static 192.168.56.0 255.255.255.0192.168.67.1



R3路由

<Huawei>system-view

[Huawei]sysnamer3

[r3]interfaceEthernet0/0/0

[r3-Ethernet0/0/0]ipadd 192.168.57.3 24

[r3-Ethernet0/0/0]quit

[r3]interfaceEthernet0/0/1

[r3-Ethernet0/0/1]ipadd 192.168.56.3 24

[r3-Ethernet0/0/1]quit

[r3]interfaceLoopBack 0

[r3-LoopBack0]ipadd 192.168.2.2 24

[r3-LoopBack0]quit

[r3] ip route-static192.168.1.0 255.255.255.0 192.168.56.1

[r3] ip route-static192.168.2.0 255.255.255.0 192.168.57.2

[r3] ip route-static192.168.67.0 255.255.255.0 192.168.57.2

当然最好修改优先级配置主备份路由啦。。。

总结:1、配置端口ip和回环ip(主要端口类型:E、G、S口)
2、配置静态路由(通过ping命令、display current-configuration、display this等命令去验证是否配置错误)

Comments

2015-09-20