Huawei routing and switching configuration

Huawei routing and switching configuration

Preface:

Huawei routing switching equipment for learning, we can not buy a lot of equipment to learn, learning costs as much, so we use the official launch of the Huawei eNSP simulator to learn routing and switching configurations, including Huawei certification (HCNA, HCNP, HCIE) the examination was to use eNSP assisted learning, and all configurations mentioned in the text below are based on eNSP achieve.

Before learning eNSP let's simply look at what is VRP, VRP said it similar to our computer's operating system platform, we run some programs on the computer above, is based on Windows, Linux, Uxin other operating systems, and Huawei switches popular, routers and other equipment is operating on VRP operating system running.

Basics

Huawei's terminal products are mostly based on VRP5 version running, high-end equipment based on VRP8 running below shows the development process of the VRP.

Huawei routing and switching configuration

PS: VRP The more powerful version of the higher, no doubt, but not all devices are suitable for high version of the platform, the low-end routing and switching products hardware using high-performance version is clearly lower calf pull carts strenuous, so for you It is the best.

VRP

VRP (Versatile Routing Platform) that is common routing platform, is the crystallization of research experience in the communications field for many years Huawei, Huawei is all based on IP / ATM architecture of data communications products operating system platform. Huawei VRP running operating system products, including routers, LAN switches, ATM switches, dial-up access servers, IP telephony gateways, carrier-class integrated service access platform, intelligent service selection gateways, as well as a dedicated hardware firewall. Core switching platform based on IP or ATM.


enspis

eNSP (Enterprise Network Simulation Platform) provided by Huawei is a free, scalable, network simulation tool for graphical operating platform, the main corporate network routers, switches, software simulation, perfect presentation real real equipment to support large networks analog, so the majority of users have no chance in the case of a real device capable of simulation exercises, learning network technology.

Want to learn first is to install eNSP, can be downloaded at the official website of Huawei,

eNSP official Download

After the software is installed after starting as shown below:

Huawei routing and switching configuration

软件的使用也较为简单拖拖拉拉就可以创建设备,创建好设备后,需要启动设备,才能对设备进行操作,关于软件的界面介绍及使用方法不过多说明,点击软件右上角 ?标志,官方对软件使用及界面介绍比较详细。


设备操作及配置

熟悉VRP命令行并且熟练掌握VRP配置是高效管理华为网络设备的必备基础。

认识命令行视图

首先我们认识命令视图,如下图所示:

Huawei routing and switching configuration

Huawei routing and switching configuration

PS:VRP分层的命令结构定义了很多命令行视图,每条命令只能在特定的视图中执行。本例介绍了常见的命令行视图。每个命令都注册在一个或多个命令视图下,用户只有先进入这个命令所在的视图,才能运行相应的命令。进入到VRP系统的配置界面后,VRP上最先出现的视图是用户视图。在该视图下,用户可以查看设备的运行状态和统计信息。若要修改系统参数,用户必须进入系统视图。用户还可以通过系统视图进入其他的功能配置视图,如接口视图和协议视图。通过提示符可以判断当前所处的视图,例如:“< >”表示用户视图,“[ ]”表示除用户视图以外的其它视图。


VRP版本查询

接下来我们首先学习第一个命令,也就是我们上面的提到的VRP版本,那如何查看VRP版本,如下图所示:

Huawei routing and switching configuration

设备命名

我们对现场的设备进行调试的时候为了对不同设备进行区分,一般我们会对设备进行重命名。更改设备名称我们首先需要进入系统视图,对系统参数进行更改,有些设备参数是可以实时更改设备参数,有些是需要设备重启后改变,设备名称是也可实时更改的。

Huawei routing and switching configuration


设备系统时间配置

为了对设备更好的管理和运行信息的统计,我们也需要对设备时间进行初始化更改。首先我们对设备本地时区进行设置,再对本地时间进行设置。

命令 功能
clock timezone 设置所在时区
clock datetime 设置当前时间和日期
clock daylight-saving-time 设置采用夏时制

Huawei routing and switching configuration

PS:系统时钟是设备上的系统时间戳。由于地域的不同,用户可以根据当地规定设置系统时钟。用户必须正确设置系统时钟以确保其与其他设备保持同步。

设置系统时钟的公式为:UTC+时区偏移量+夏时制时间偏移量。clock datetime命令设置HH:MM:SS YYYY-MM-DD格式的系统时钟。但是需要注意的是,如果没有设定时区,或者时区设定为零,那么设定的日期和时间将被认为是UTC时间,所以建议在对系统时间和日期进行配置前先设置时区。

*clock timezone命令用来对本地时区信息进行设置,具体的命令参数为time-zone-name { add | minus } offset*。其中参数add表示与UTC时间相比,time-zone-name增加的时间偏移量。即,在系统默认的UTC时区的基础上,加上offset,就可以得到time-zone-name所标识的时区时间;参数minus指的是与UTC时间相比,time-zone-name减少的时间偏移量。即,在系统默认的UTC时区的基础上,减去offset,就可以得到time-zone-name所标识的时区时间。

有的地区实行夏令时制,因此当进入夏令时实施区间的一刻,系统时间要根据用户的设定进行夏令时时间的调整。VRP支持夏令时功能。比如,在英国,从三月的最后一个星期天到十月最后一个星期天是夏令时区间,那么可以通过执行命令指定夏令时的开始和结束时间。

总结

关于eNSP的基本操作和VRP命令行的使用就介绍到这,接下来给大家说下VRP命令行的使用技巧,VRP支持命令自动补全和简写命令,但是前期练习的时候建议大家还是敲全命令,加深对命令的记忆。自动补全是输入命令的前几个字母按Tab键会自动补全,比如输入dis,按Tab后会显示display,有时候补全的命令不是你想要的命令是因为你输入的字母可以补全多个命令,只有你输入的前几个字母是独一无二的,才会补全出你想要的结果,大家可以尝试练习一下,有时只能想起命令的首字母,但是补全的太多,出不来自己想要的命令,我们可以输入字母+?,这是会把所有相关的命令提示出来,如下图所示:

Huawei routing and switching configuration


常用命令

命令 缩写 解释
system-view sys 系统视图
quit qu 退回上一级
save 保存配置
display current-configuration dis cur 显示当前配置
display interfaces 显示接口信息
display vlan dis vlan 显示路由信息
display version 显示版本信息
super password 修改特权用户密码
sysname 交换机命名
interfaceGigabitEthernet 0/0/1 进入接口视图
interface XGigabitEthernet 0/0/1 进入接口视图
interface vlan X 进入接口视图
ip route-static 0.0.0.0 0.0.0.0 10.2.2.2 静态路由=网关
rip 三层交换支持
stp enable|isable 设置生成树,默认关闭
stp priority 4096 设置交换机的优先级
stp root primary|secondary 设置为根或者为根的备份

名词介绍

Access 类型的端口只能属于1个VLAN,一般用于连接计算机的端口,也可以连接交换机和交换机。

Trunk   类型的端口可以允许多个VLAN通过,可以接收和发送多个VLAN的报文,trunk口一般用于连接两台交换机,这样可以只用一条trunk连接实现多个vlan的扩展。

Hybrid port can allow multiple VLAN, you can receive and transmit packets of a plurality of VLAN, the switch can be used to connect and to be connected to a computer user.

PVID is Port-base Vlan ID, i.e. the VLAN ID number of a port related to a port VLAN TAG mark send and receive data frames.

Guess you like

Origin blog.51cto.com/14450118/2449152