华为路由器 常用命令

应用程序如 Ping、tracert 、FTP、telnet


1.使用PING 命令操作步骤

pc设备配置

<Huawei>SYSNAME PC
[Huawei-GigabitEthernet0/0/0]ip address 192.168.1.1 24

AR1 设备配置

[Huawei]sysname AR1
[AR1]int g0/0/0	
[AR1-GigabitEthernet0/0/0]ip address 192.168.1.2 24

在PC上 PING AR1 设备

[PC]ping 192.168.1.1
  PING 192.168.1.1: 56  data bytes, press CTRL_C to break
    Reply from 192.168.1.1: bytes=56 Sequence=1 ttl=255 time=70 ms
    Reply from 192.168.1.1: bytes=56 Sequence=2 ttl=255 time=1 ms
    Reply from 192.168.1.1: bytes=56 Sequence=3 ttl=255 time=1 ms
    Reply from 192.168.1.1: bytes=56 Sequence=4 ttl=255 time=1 ms
    Reply from 192.168.1.1: bytes=56 Sequence=5 ttl=255 time=1 ms

  --- 192.168.1.1 ping statistics ---
    5 packet(s) transmitted
    5 packet(s) received
    0.00% packet loss
    round-trip min/avg/max = 1/14/70 ms

2.使用tracert 路由追踪 在PC上操作步骤如下

[PC]tracert 192.168.1.2

 traceroute to  192.168.1.2(192.168.1.2), max hops: 30 ,packet length: 40,press 
CTRL_C to break 

 1 192.168.1.2 80 ms  20 ms  20 ms 

3.配置telnet 远程登陆

RT2 上配置命令

[Huawei]user-interface vty 0
[Huawei-ui-vty0]authentication-mode password 
Please configure the login password (maximum length 16):HUAWEI
[Huawei-ui-vty0]USER privilege level 3
[Huawei-ui-vty0]SET authentication password cipher HUAWEI

R1 上telnet R2

<Huawei>TELNET 192.168.1.2
  Press CTRL_] to quit telnet mode
  Trying 192.168.1.2 ...
  Connected to 192.168.1.2 ...
Login authentication
Password:
<AR2>
<AR2>

4. 配置 FTP 服务器

AR2 配置

[AR2]ftp server enable 
[AR2]aaa
[AR2-aaa]local-user aaa password cipher bbb
[AR2-aaa]local-user aaa privilege level 3
[AR2-aaa]local-user aaa ftp-directory flash:/
[AR2-aaa]local-user aaa service-type ftp

AR1 上登陆 FTP

<AR1>ftp 192.168.1.2
Trying 192.168.1.2 ...

Press CTRL+K to abort
Connected to 192.168.1.2.
220 FTP service ready.
User(192.168.1.2:(none)):aaa
331 Password required for aaa.
Enter password:
230 User logged in.
[AR1-ftp]

在AR1 上查看AR2 FTP 文件

[AR1-ftp]dir
200 Port command okay.
150 Opening ASCII mode data connection for *.
drwxrwxrwx   1 noone    nogroup         0 Jul 12 01:25 dhcp
-rwxrwxrwx   1 noone    nogroup    121802 May 26  2014 portalpage.zip
-rwxrwxrwx   1 noone    nogroup      2263 Jul 12 01:25 statemach.efs
-rwxrwxrwx   1 noone    nogroup    828482 May 26  2014 sslvpn.zip
drwxrwxrwx   1 noone    nogroup         0 Jul 12 01:25 .
226 Transfer complete.
FTP: 327 byte(s) received in 0.060 second(s) 5.45Kbyte(s)/sec.

下载文件

[AR1-ftp]get sslvpn.zip
Warning: The file sslvpn.zip already exists. Overwrite it? (y/n)[n]:y
200 Port command okay.
150 Opening ASCII mode data connection for sslvpn.zip.
 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%92%93%94%95%96%97%98%99%226 
Transfer complete.
FTP: 828482 byte(s) received in 3.050 second(s) 271.63Kbyte(s)/sec.
posted @ 2019-07-12 10:39  向往C  阅读(10753)  评论(0编辑  收藏  举报