联想NE系列交换机CNOS系统常用配置手册

Posted

tags:

篇首语:本文由小常识网(cha138.com)小编为大家整理,主要介绍了联想NE系列交换机CNOS系统常用配置手册相关的知识,希望对你有一定的参考价值。

参考技术A 联想NE系列交换机CNOS系统常用配置手册目录

1 前言

2 登录交换机

2.1 NE交换机接口介绍

2.2 登录交换机

3 常用交换机配置

3.1 交换机命令模式

3.2 查看交换机接口状态和编号

3.3 VLAN配置

3.4 TRUNK配置

3.5 端口聚合配置

3.6 VLAG配置

1 前言

NE系列交换机作为联想新款交换机,安装联想云优化网络操作系统(CNOS),提供丰富的对外开放的API接口,实现软件定义网络,为软件定义数据中心提供灵活的网络支持。目前NE系列交换机有NE10032,NE1032,NE1032T,NE2572等几款交换机,NE10032交换机支持100G交换机,NE1032为10G光口交换机,NE1032T为10G电口交换机,NE2572为25G光口交换机。本文档以NE1032交换机为例进行配置说明,同时NE系列交换机在配置命令上与G系列交换机有差异,但网络的原理以及配置思路基本是一致的。本文档先从基本的网络配置作为开始,然后逐渐增加交换机高级配置相关内容

2 登录交换机

2.1 NE交换机接口介绍

1.带外管理网络端口该端口为网络RJ45口,实现交换机带外网络管理,通常情况下通过该端口对新的交换机进行初始化配置,通过个人电脑连接该端口进行交换机的配置。

2.Mini USD串口该端口为串行端口,需要通过mini USD串口线连接到交换机,该端口一般情况下不需要使用,只有当交换机的带内和带外管理IP地址不知道情况下需要使用串口进行登录。在交换机出厂时一般是配置了mini USB线,但个人笔记本电脑需要USB转接线与mini USB线进行连接.

3.业务端口对于NE1032交换机业务端口为模块化端口,需要配置相应的模块,如连接10G的光纤端口的服务器,需要在业务端口插入10G SFP光模块实现与服务器的连接。

2.2 登录交换机通过带外管理口登录交换机:带外管理端口默认IP地址为192.168.50.50,登录用户名和密码为admin/admin。该端口IP地址为默认IP地址,也可以根据用户的需要进行修改。

3 常用交换机配置

3.1 交换机命令模式交换机主要有以下几种命令模式:

1.用户模式,在登录交换机默认进入用户模式
提示符: Switch>

2.特权模式提示符: Switch#
通过Switch>enable 命令进入特权模式
该模式下可以查看交换机的状态以及ping操作,不能对交换机进行配置

3.配置模式
提示符: Switch(config)#
通过Switch# configure 进入配置模式在该模式下可以对交换机进行日常操作配置以上命令模式可以通过exit退出上一级模式

3.3 VLAN配置

配置场景

1)在配置模式下创建VLAN登录交换机后进入配置模式后,
Switch#configure
Switch(config)# vlan <VLAN ID (1‐3999)>
Switch(config-vlan)#
通过以下命令查看VLAN是否创建成功:

2)将连接服务器(未安装VMWARE等虚拟化软件的服务器)的业务端口加入到VLAN
Switch(config)# interface ethernet 1/12  进入接口配置模式,这里1/12为接口编号,通过display interface brief查看接口编号
Switch(config-if)# bridge-port mode access  定义接口为access模式
Switch(config-if)# bridge-port access vlan将端口加入到某个vlan
Switch(config-if)#exit 退出接口配置模式
如果VLAN配置错误可以通过一下命令删除VLAN配置
Switch(config)# interface ethernet 1/12
Switch(config-if)no bridge-port access vlan
通过以下命令查看端口VLAN情况
display interface ethernet 1/12 bridge-port

3.4 TRUNK配置

1)配置场景1当交换机和交换机互联时,交换机之间的互联链路需要指定为trunk模式

2)配置场景2当服务器做了虚拟化,通常服务器和交换机之间需要做TRUNK配置

3)TRUNK配置把端口定义为TRUNK端口
Switch(config)# interface ethernet 1/13 
Switch(config-if)# bridge-port mode trunk 
Switch(config-if)# bridge-port trunk allowed vlan all  允许所有的VLAN通过TRUNK口恢复TRUNK口为非TRUNK口Switch(config)# interface ethernet 1/13
Switch(config-if)# no bridge-port mode

3.5 端口聚合配置

1)配置场景1该场景下LINUX服务器上两个网卡做了bonging mode0的绑定,这是需要在交换机做静态端口聚合,配置如下:
Switch(config)# interface ethernet 1/12,1/13
Switch(config-if)# bridge-port mode access
Switch(config-if)# bridge-port access vlan XX
Switch(config-if)# exit
Switch(config)#
Switch(config)# interface port-aggregation <1‐4096>  (聚合端口号,当有多个服务器端口聚合时建立多个聚合端口组时,通过ID号进行区分不同的聚合端口组)
Switch(config-if)# bridge-port mode access
Switch(config-if)# bridge-port access vlan
Switch(config-if)# exit
Switch(config)# interface ethernet 1/12, ethernet 1/13,
Switch(config-if-range)# aggregation-group 1 mode on
Switch(config-if-range)# exit

通过以下命令查看端口聚合:

2)配置场景2

当linux服务器上两个网卡以mode4作为绑定模式,两个网卡与交换机之间通过LACP协议实现链路聚合。(两个交换机互联也可以通过LACP方式实现聚合连接)

交换机配置如下:

将交换机12、13划入到VLAN10中

Switch(config)# interface ethernet 1/12-13
Switch(config-if-range)# bridge-port mode access
Switch(config-if-range)# bridge-port access vlan 10
Switch(config-if-range)# exit
Switch(config)#

Switch(config)# interface port-aggregation 1(聚合端口号,当有多个服务器端口聚合时建立多个聚合端口组时,通过ID号进行区分不同的聚合端口组)

Switch(config-if)# bridge-port mode access

Switch(config-if)# bridge-port access vlan 10

Switch(config-if)# exit

Switch(config)#

Switch(config)# interface ethernet 1/12,1/13

Switch(config-if-range)# aggregation-group 1 mode active  (模式为active,启用LACP协商)

3)配置场景3

在两个交换机上做一致的配置:

Switch(config)# interface ethernet 1/12-13
Switch(config-if-range)# bridge-port mode trunk
Switch(config-if-range)# bridge-port trunk allowed vlan all
Switch(config-if-range)# exit
Switch(config)#
Switch(config)# interface port-aggregation 2
Switch(config-if)# bridge-port mode trunk
Switch(config-if)# bridge-port trunk allowed vlan all
Switch(config-if)# exit
Switch(config)#
Switch(config)# interface ethernet 1/12-13
Switch(config-if-range)# aggregation-group 2 mode active(goup 2这个ID需要与上一个命令指定的ID保持一致)

通过以下命令查看端口聚合
Switch(config)# display interface port-aggregation 2

3.6 VLAG配置

配置场景

配置步骤:

1) 配置ISL

Switch(config)# interface ethernet 1/13-14
Switch(config-if-range)# bridge-port mode trunk
Switch(config-if-range)# bridge-port trunk allowed vlan all
Switch(config-if-range)# aggregation-group 10 mode active
Switch(config-if-range)# exit
Switch(config)# interface port-aggregation 10
Switch(config-if)# shutdown
Switch(config-if)# bridge-port mode trunk
Switch(config-if)# bridge-port trunk allowed vlan all
Switch(config-if)# lacp suspend-individual
Switch(config-if)# no shutdown
Switch(config-if)# exit
Switch(config)# vlag isl port-aggregation 10
Switch(config)# vlag tier-id 10
Switch(config)# vlag enable

& 注意

当输入switch(config)#vlag isl port-aggregation 10命令如果出现以下错误提示:
% ERROR: interface port-aggregation po10 has individual on, it is not allowed for vLAG ISL。建议如下处理:

进入po10接口模式下先把接口shutdown,然后输入lacp suspend-individual。

2) 配置VLAG

Switch(config)# interface ethernet 1/12
Switch(config-if-range)# bridge-port mode trunk
Switch(config-if-range)# bridge-port trunk allowed vlan all
Switch(config-if-range)# aggregation-group 5 mode active
Switch(config-if-range)# exit
Switch(config)# interface port-aggregation 5
Switch(config-if)# bridge-port mode trunk
Switch(config-if)# bridge-port trunk allowed vlan all
Switch(config-if)# exit
Switch(config)# vlag instance 1 port-aggregation 5  不同的聚合端口组使用不同的instance ID.
Switch(config)# vlag instance 1 enable

在另外一个交换机上配置相同。

通过如下命令查看是否创建VLAG ISL成功:

通过如下命令查看VLAG 是否成功:

以上是关于联想NE系列交换机CNOS系统常用配置手册的主要内容,如果未能解决你的问题,请参考以下文章

常用Git命令手册

Ansible 小手册系列 四(详解配置文件)

logback 中文手册

ASA5500系列防火墙配置手册

华为9306(9300系列)的密码恢复

Git常用命令参考手册