去年学完了Cisco的路由交换,从CCNA学到CCIE。学完之后才发现,整个国内市场好像更倾向于使用华为、H3C这类国有网络设备厂商。不过还好,至少网络的基础理论知识是相同的,于是买了基本关于HUAWEI认证的书籍,准备稍稍过一遍,有了思科的学习经历,对应华为而言应该不难,那么开始吧!
华为认证体系
华为和思科一样拥有一整套的认证体系。
操作系统
有过思科学习经历的都知道思科的实验大部分都是在GNS3中进行的,虽然思科官方有packet tracer,但是能通过packet tracer做出来的实验非常少,只能模拟CCNA阶段的实验,我是特别喜欢GNS3,因为他具备跨平台性,基本思科的实验都是在Linux上完成,搭配IOU,无需通过虚拟机获取镜像非常省资源。 那么华为也有自己的模拟器,叫做ENSP,目前最新的版本是1.2.00.360。华为的操作系统叫VRRP(Versatile Routing Platform),它是整个华为数通产品的通用网络操作系统。
1.获取模拟器的方式:
2.启动路由器
启动路由器和通过gns3拖拽路由器或者交换机设备启动是一样的方式,如图拖拽设备后通过线缆连接 然后选择菜单栏的启动按钮即可启动设备
3.启动界面
启动完成后,就进入了配置路由器的界面了,和思科一样,华为的管理型网络设备的配置都是在命令行模式下进行。
VRRP各模式下的切换
启动设备后我们可以通过命令在各个模式下切换和配置,与思科基本思路是一样的,但仍有些差异,下面简单看下与思科对比最基本的配置命令
1.调出当前模式下所能使用的命令,在命令行中按?号键即可看到。
<Huawei>?
User view commands:
arp-ping ARP-ping
autosave <Group> autosave command group
backup Backup information
cd Change current directory
clear <Group> clear command group
clock Specify the system clock
cls Clear screen
compare Compare configuration file
copy Copy from one file to another
debugging <Group> debugging command group
delete Delete a file
dialer Dialer
dir List files on a filesystem
display Display information
factory-configuration Factory configuration
fixdisk Try to restory disk
format Format file system
free Release a user terminal interface
ftp Establish an FTP connection
help Description of the interactive help system
hwtacacs-user HWTACACS user
license <Group> license command group
lldp Link Layer Discovery Protocol
---- More ----
2.切换到特权模式,暂且这样叫吧,用思科习惯了!都是一个意思,可以使用简写如:sys,或者输入完整的system-view。一般没事谁愿意不偷懒谁是傻瓜。
<Huawei>sys
<Huawei>system-view
Enter system view, return user view with Ctrl+Z.
[Huawei]
3.进入接口,配置IP地址
(1)我们首先需要知道连接的接口是什么?单击菜单栏的显示所有接口显示出来。
(2)然后,我们开始配置,第一步,进入接口,不记得的单词可以按?号显示哦!
[Huawei]int
[Huawei]interface ?
Bridge-if Bridge-if interface
Cellular Cellular interface
Dialer Dialer interface
Eth-Trunk Ethernet-Trunk interface
GigabitEthernet GigabitEthernet interface
Ima-group ATM-IMA interface
LoopBack LoopBack interface
MFR MFR interface
Mp-group Mp-group interface
NULL NULL interface
Tunnel Tunnel interface
Virtual-Ethernet Virtual-Ethernet interface
Virtual-Template Virtual-Template interface
Vlanif Vlan interface
Wlan-Ess Wlan-Ess interface
[Huawei]interface g
[Huawei]interface GigabitEthernet 0/0/0
[Huawei-GigabitEthernet0/0/0]
(3)配置IP,华为这块做的比较人性化,子网可以采用CIDR的方式去简写。
[Huawei-GigabitEthernet0/0/0]ip add
[Huawei-GigabitEthernet0/0/0]ip address 1.1.1.1 24
Oct 17 2015 07:34:36-08:00 Huawei %%01IFNET/4/LINK_STATE(l)[1]:The line protocol
IP on the interface GigabitEthernet0/0/0 has entered the UP state.
[Huawei-GigabitEthernet0/0/0]
(4)退出接口模式
Huawei-GigabitEthernet0/0/0]quit
4.修改设备名称,使用sysname去命名,比如我们现在的交换机在杭州市福地机房A1楼层B9机房C09机柜第48U上,我们可以这样缩写。方便我们定位设备位置,以便于设备出现故障我们能够快速知道故障设备去进行排查。
[Huawei]sysname HZ-FD-A1-B9-C09-48
[HZ-FD-A1-B9-C09-48]
5.查看设备版本,思科是show,华为是display。
HZ-FD-A1-B9-C09-48]display version
Huawei Versatile Routing Platform Software
VRP (R) software, Version 5.130 (AR2200 V200R003C00)
Copyright (C) 2011-2012 HUAWEI TECH CO., LTD
Huawei AR2220 Router uptime is 0 week, 0 day, 0 hour, 14 minutes
BKP 0 version information:
1. PCB Version : AR01BAK2A VER.NC
2. If Supporting PoE : No
3. Board Type : AR2220
4. MPU Slot Quantity : 1
5. LPU Slot Quantity : 6
MPU 0(Master) : uptime is 0 week, 0 day, 0 hour, 14 minutes
MPU version information :
1. PCB Version : AR01SRU2A VER.A
2. MAB Version : 0
3. Board Type : AR2220
4. BootROM Version : 0
6.修改时间,我们使用clock timezone 设置时区,使用clock datetime设置时间。
<HZ-FD-A1-B9-C09-48>clock timezone BJ add 08:00:00
<HZ-FD-A1-B9-C09-48>clock datetime 7:41:50 2015-10-17
7.设置标题信息
如果需要在登录路由器提供警告信息,我们可以设置header login为登录标题,header shell 可以设置登录成功后标题文本信息为"Warning, do not touch this device"。 HZ-FD-A1-B9-C09-48]header login information "hello" [HZ-FD-A1-B9-C09-48]header shell information "Warning, do not touch this device" [ [HZ-FD-A1-B9-C09-48]quit quit
Configuration console exit, please press any key to log on
Warning, do not touch this device
<HZ-FD-A1-B9-C09-48>
8.查看配置信息display current-configuration 查看当前设备的配置信息。
[HZ-FD-A1-B9-C09-48]display current-configuration
[V200R003C00]
#
sysname HZ-FD-A1-B9-C09-48
header shell information "Warning, do not touch this device"
header login information "Warning, do not touch this device"
#
snmp-agent local-engineid 800007DB03000000000000
snmp-agent
#
clock timezone BJ add 08:00:00
#
portal local-server load portalpage.zip
#
drop illegal-mac alarm
#
set cpu-usage threshold 80 restore 75
#
aaa
authentication-scheme default
authorization-scheme default
accounting-scheme default
domain default
domain default_admin
local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$
local-user admin service-type http
#
firewall zone Local
---- More ----
9.查看接口配置信息
[HZ-FD-A1-B9-C09-48]display interface GigabitEthernet 0/0/0
GigabitEthernet0/0/0 current state : UP
Line protocol current state : UP
Last line protocol up time : 2015-10-17 07:34:36 UTC-08:00
Description:HUAWEI, AR Series, GigabitEthernet0/0/0 Interface
Route Port,The Maximum Transmit Unit is 1500
Internet Address is 1.1.1.1/24
IP Sending Frames' Format is PKTFMT_ETHNT_2, Hardware address is 00e0-fc0e-79a9
Last physical up time : 2015-10-17 07:24:45 UTC-08:00
Last physical down time : 2015-10-17 07:24:37 UTC-08:00
Current system time: 2015-10-17 07:48:45+08:00
Port Mode: FORCE COPPER
Speed : 1000, Loopback: NONE
Duplex: FULL, Negotiation: ENABLE
Mdi : AUTO
Last 300 seconds input rate 0 bits/sec, 0 packets/sec
Last 300 seconds output rate 0 bits/sec, 0 packets/sec
Input peak rate 0 bits/sec,Record time: -
Output peak rate 96 bits/sec,Record time: 2015-10-17 07:34:45
Input: 0 packets, 0 bytes
Unicast: 0, Multicast: 0
Broadcast: 0, Jumbo: 0
Discard: 0, Total Error: 0
CRC: 0, Giants: 0
Jabbers: 0, Throttles: 0
Runts: 0, Symbols:
---- More ---- Ignoreds: 0, Frames:
Output: 1 p
---- More ---- Unicast: 0, Multicast: 0
Broadcast: 1, Jumbo:
---- More ---- Discard: 0, Total Error:
Collisions: 0, ExcessiveColli
---- More ---- Late Collisions: 0, Deferreds: ---- More ---- Input bandwidth utilization thr
Output bandwidth utilization threshold: 100.00%
Input bandwidth util
---- More ---- Output bandwidth utilization : 0%
10.保存配置,华为路由器以及H3C路由器报错配置需要在普通模式下操作。
<HZ-FD-A1-B9-C09-48>save
The current configuration will be written to the device.
Are you sure to continue? (y/n)[n]:y
It will take several minutes to save configuration file, please wait.......
Configuration file had been saved successfully
Note: The configuration file will take effect after being activated
<HZ-FD-A1-B9-C09-48>
11.查看当前路由器所有接口的简单信息。
[HZ-FD-A1-B9-C09-48]display ip interface brief
*down: administratively down
^down: standby
(l): loopback
(s): spoofing
The number of interface that is UP in Physical is 2
The number of interface that is DOWN in Physical is 2
The number of interface that is UP in Protocol is 2
The number of interface that is DOWN in Protocol is 2
Interface IP Address/Mask Physical Protocol
GigabitEthernet0/0/0 1.1.1.1/24 up up
GigabitEthernet0/0/1 unassigned down down
GigabitEthernet0/0/2 unassigned down down
NULL0 unassigned up up(s)
12.查看路由表信息
HZ-FD-A1-B9-C09-48]display ip routing-table
Route Flags: R - relay, D - download to fib
------------------------------------------------------------------------------
Routing Tables: Public
Destinations : 7 Routes : 7
Destination/Mask Proto Pre Cost Flags NextHop Interface
1.1.1.0/24 Direct 0 0 D 1.1.1.1 GigabitEthernet0
/0/0
1.1.1.1/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0
/0/0
1.1.1.255/32 Direct 0 0 D 127.0.0.1 GigabitEthernet0
/0/0
127.0.0.0/8 Direct 0 0 D 127.0.0.1 InLoopBack0
127.0.0.1/32 Direct 0 0 D 127.0.0.1 InLoopBack0
127.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
255.255.255.255/32 Direct 0 0 D 127.0.0.1 InLoopBack0
[HZ-FD-A1-B9-C09-48]
13.ping直连接口
[HZ-FD-A1-B9-C09-48]ping 1.1.1.2
PING 1.1.1.2: 56 data bytes, press CTRL_C to break
Reply from 1.1.1.2: bytes=56 Sequence=1 ttl=255 time=90 ms
Reply from 1.1.1.2: bytes=56 Sequence=2 ttl=255 time=30 ms
Reply from 1.1.1.2: bytes=56 Sequence=3 ttl=255 time=40 ms
Reply from 1.1.1.2: bytes=56 Sequence=4 ttl=255 time=20 ms
Reply from 1.1.1.2: bytes=56 Sequence=5 ttl=255 time=20 ms
--- 1.1.1.2 ping statistics ---
5 packet(s) transmitted
5 packet(s) received
0.00% packet loss
round-trip min/avg/max = 20/40/90 ms
14.抓包,单击路由器右键选择数据包
以上是关于华为路由器的简单配置。当然,华为和H3C的配置几乎一模一样,学完华为H3C信手拈来。