首页 > 其他分享 >在 ESXi 上运行 Cisco Nexus 9000v (NX-OS 10)

在 ESXi 上运行 Cisco Nexus 9000v (NX-OS 10)

时间:2024-02-23 11:46:46浏览次数:28  
标签:10 Cisco Nexus ESXi OS switch config VMware

在 ESXi 上运行 Cisco Nexus 9000v (NX-OS 10)

在 VMware vSphere 中部署 Cisco Nexus 9000v (NX-OS 10)

请访问原文链接:https://sysin.org/blog/run-nxos-on-esxi/,查看最新版。原创作品,转载请保留出处。

作者主页:sysin.org


Nexus 9000v 概述

Cisco Nexus 9000v 是虚拟化的 Nexus 9000 NX-OS 交换机,用于在虚拟化中构建和测试网络原型环境,是学习 Cisco NX-OS 和 SDN 的便捷途径。

平台系列和资源要求

从 Cisco NX-OS 版本 9.3.3 (sysin) 开始,Nexus 9000v 已转变为具有两个版本的平台系列:Nexus 9300v 和 Nexus 9500v。

  • Nexus 9300v 代表一个虚拟的非模块化交换机,包括一个带有 64 个虚拟接口的线卡。
  • Nexus 9500v 代表虚拟模块化交换机,最多可支持 16 个线卡和 400 个虚拟接口。

Nexus 9300v 规格

Form-Factor

Component/Parameter Specification
Usage Simulation
Binary Same as NX-OS Hardware
Management Interface 1
Line Cards 1
Line Card Interfaces 64

Resource Requirements

Resource Specification
Minimum RAM 10.0 G (basic bootup)
Recommended RAM 12.0 G (depending on the number of features)
Minimum vCPUs 1
Recommended vCPUs 2
Minimum vNICs 1
Maximum vNICs 65

Nexus 9500v 规格

Form-Factor

Component/Parameter Specification
Usage Simulation
Binary Same as NX-OS Hardware
Management Interface 1
Line Cards Up to 16
Line Card Interfaces Up to 400 interfaces in the KVM/QEMU environment

Resource Requirements

Resource Specification
Minimum RAM 10.0G (basic bootup with one line card; 1.2G for each additional line card)
Recommended RAM 12.0G (depending on the number of features)
Minimum vCPUs 4 (if you configure 16 line cards, we recommend 6 vCPUs)
Minimum vNICs 1
Maximum vNICs 400 interfaces in the KVM/QEMU environment

支持的 Hypervisor

Nexus 9000v 10.4.x 系列官方系统要求:

  • KVM/QEMU 4.2.0
  • ESXi 8.0
  • Vagrant 2.3.7(VirtualBox 7.0)(仅有 9300v 版本,不支持 9500v)

以上为官方列出版本要求,并非严格限制。

本文描述在 VMware 产品中部署。可支持如下版本。

建议在以下版本的 VMware 软件中运行(Linux OVF 无需本站定制版可以正常运行,macOS 虚拟化如果不是 Mac 必须使用定制版才能运行,Windows OVF 需要定制版才能启用完整功能):

对于 VMware Fusion 或者 VMware Workstation,另有文章描述:

使用 VMware vSphere 部署

导入 OVA

支持 vSphere Client 和 ESXi Host Client,本文相关截图使用 vSphere Client。

过程略。

编辑 vNIC

  • 第一个网卡用作管理口 m0(mgmt0),使用 VM Network(非必须)
  • 其他网口(数据接口),分别放到不同的网络
  • 数据接口所在虚拟交换机需要开启混杂模式(Promiscuous mode)

添加或者编辑虚拟串口

VMware ESXi 中直接编辑现有网络串口即可。

1、开启防火墙规则:ESXi 配置 – 系统 – 防火墙,启用防火墙规则:VM serial port connected over network 23, 1024-65535 (TCP)

Firewall

Firewall

2、编辑串口如下:

  • 编辑虚机,选择 串行端口(Serial Port),类型:通过网络访问 (User Network),方向:服务器(虚拟机侦听连接)
  • 端口 URL:telnet://telnet://0.0.0.0:端口(端口应在防火墙开启的端口范围),或者 telnet://ESXi-IP:端口
  • vSPC (Use Virtual Serial Port Concentrator) 是使用 vMotion 时的可选项 (需要启用防火墙规则 VM serial port connected to vSPC),如果没有 HA 可以忽略。

Serial Port

虚机默认 EFI 引导

Boot Options 默认为 EFI。

编辑 vmx 文件(或者 vm 高级选项),添加:efi.serialconsole.enabled = “TRUE”

启动虚拟机

启动状态如下:

Console

连接虚拟串口

连接 ESXi 服务器 IP,端口使用前述配置的端口。

在 macOS、Linux(或其他类 UNIX 系统)下,使用 nc,例如:nc 10.10.1.101 10023,推荐!

等待虚拟机控制台界面显示:Boot Time: xxxx,连接虚拟串口,此时接管 Console 画面如下(尚未完成也可以,稍后自动出现):

start up

在 Windows 下使用 telnet,例如:telnet 10.10.1.101 10023,似乎不容易连接成功,不推荐。

在 Windows 下,可以使用 MTPuTTY,或者 PuTTY。

下面开始初始化配置了。

Abort Power On Auto Provisioning [yes - continue with normal setup, skip - bypass password and basic configuration, no - continue with Power On Auto Provisioning] (yes/skip/no)[no]:yes <---- 这里 yes

Disabling POAP.......Disabling POAP

         ---- System Admin Account Setup ----

Do you want to enforce secure password standard (yes/no) [y]:y  <---- 这里回车,然后根据提示设置 admin 账号的密码

    Enter the password for "admin":
  Confirm the password for "admin":

         ---- Basic System Configuration Dialog VDC: 1 ----

This setup utility will guide you through the basic configuration of
the system. Setup configures only enough connectivity for management
of the system.

Please register Cisco Nexus9000 Family devices promptly with your
supplier. Failure to register may affect response times for initial
service calls (sysin). Nexus9000 devices must be registered to receive
entitled support services.

Press Enter at anytime to skip a dialog. Use ctrl-c at anytime
to skip the remaining dialogs.

 Would you like to enter the basic configuration dialog (yes/no): no  <---- 这里 no

进入登录提示,输入上述用户名 admin 和密码。

必要配置

配置管理 IP

switch# conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# int m0
switch(config-if)# ip addr 10.10.188.101/24
switch(config-if)# no shut
switch(config-if)# exit

在 vrf management 配置缺省路由:

switch(config)#vrf context management
switch(config-vrf)# ip route 0.0.0.0/0 10.10.188.1

配置 m0 IP 地址后,然后使用 ssh 登录管理

配置启动镜像

以下镜像名称为 nxos64-cs.10.2.5.M.bin,根据实际版本修改。

switch# conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# boot nxos bootflash:nxos64-cs.10.2.5.M.bin
# 或者直接 boot nxos xxx.bin,不加 bootflash:,此镜像名称通过 dir 命令查看
switch(config)# boot nxos nxos64-cs.10.2.5.M.bin
# <--- Note: use correct imagename from "dir" command output
Performing image verification and compatibility check, please wait....
switch(config)# end
switch# copy r s
[########################################] 100%
Copy complete, now saving to disk (please wait)...
Copy complete.

默认 ssh 开启

# 查看 telnet 是否启用(默认禁用)
switch# show feature | grep telnet
# 查看 ssh 是否启用(默认启用)
switch# show feature | grep ssh
switch#
# 开启 ssh
switch# conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# feature ssh
switch(config)# end
switch# copy r s

创建一个新用户(可选)

switch(config)# username sysadmin password <password> role network-admin
switch(config)# username sysadmin shelltype bash

下一步

以后可以直接使用 SSH 访问,串口可用于 SSH 无法访问之时进行问题排查。

请访问官方文档,开启你的 Nexus 之旅:

Cisco Nexus 9000 Series Switches Configuration Guides

小贴士:开启 shell 访问,可以看到 NX-OS 10 是基于 Linux kernel 4.19(10.2.x 开始为 5.10)。

switch# show feature | grep bash
bash-shell             1          disabled
switch# conf t
Enter configuration commands, one per line. End with CNTL/Z.
switch(config)# feature bash-shell
switch(config)# end
switch# run bash sudo su -
root@switch#whoami
root
root@switch#uname -a
Linux switch 4.19.179 #1 SMP Thu May 13 16:52:16 PDT 2021 x86_64 x86_64 x86_64 GNU/Linux
root@switch#
# 10.4.2 版本为 5.10
Linux switch 5.10.188 #1 SMP Wed Dec 13 17:01:10 PST 2023 x86_64 x86_64 x86_64 GNU/Linux

相关软件下载

VMware vSphere:VMware ESXi 8.0 or with driver & vCenter Server 8.0ESXi 7.0 or with driver & vCenter Server 7.0

Cisco Nexus 9000v:Cisco Nexus 9000v Switch, NX-OS Release 10.x

标签:10,Cisco,Nexus,ESXi,OS,switch,config,VMware
From: https://www.cnblogs.com/sysin/p/18029179

相关文章

  • 解决VMware与win10无法共享目录
    1、安装VMwareTools这一步适用于多数情况,但对于高版本的VMWare这一步无效,当然了,先试一试总没有坏处。有看见网上说如果VMware内安装的是高版本的Ubuntu,安装的VMwareTools会破坏Ubuntu。关于这一点博主没有验证,请自行验证。安装方法很简单:1)在VMware的虚拟机菜单下,点击“重......
  • Go 100 mistakes - #61: Propagating an inappropriate context
       疑问:前两种情况(1.客户端连接中断2.HTTP请求取消)发生,publish却不expire也不会被cancel,这样会不会有问题? ......
  • 洛谷题单指南-贪心-P1106 删数问题
    原题链接:https://www.luogu.com.cn/problem/P1106题意解读:如何删数,让剩下的数最小,贪心选择问题。解题思路:先看样例:1754384第1次遍历:删掉7,剩下15438第2次遍历:删掉5,剩下1438第3次遍历:删掉4,剩下138第4次遍历:删掉8,剩下13,即为结果所以,贪心策略如下:1、遍历每一个数,如果前一......
  • 玩转 oracle 10g 实战教程
    玩转oracle10g实战教程oracle第1讲①淘宝网,天涯网,校友网..都有各自的功能,那么当我们关闭系统的时候,下次再访问这些网站时,为什么他们各自的信息还存在。②再比如c/s的软件,比如网游、qq、他们又是怎样保存数据的-a.游戏积分b.qq聊天记录。解决之道-文件、数据库......
  • games101_Homework1
    作业描述:本次作业的任务是填写一个旋转矩阵和一个透视投影矩阵。给定三维下三个点v0(2.0,0.0,−2.0),v1(0.0,2.0,−2.0),v2(−2.0,0.0,−2.0),你需要将这三个点的坐标变换为屏幕坐标,并在屏幕上绘制出对应的线框三角形(在代码框架中,我们已经提供了draw_triangl......
  • 10个程序员必逛的网站
    大家好,我是知微!相信各位小伙伴都会经常在网上查找学习资料和经验贴,但是光靠搜索引擎,有时候费时费力,效果还不好。下面为大家整理了10个程序员经常会用到的网站,一起来看看吧!1、B站https://www.bilibili.com/B站原本定位是一个二次元动漫类的网站,经过多年的发展,逐渐成为一个学......
  • P10141
    P10141题解正难则反正着,设\(dp(l,r)\)为合并出\([l,r]\)的概率,枚举大区间两端点合并(区间DP)复杂度\(O(n^4)\)反着,设\(dp(l,r)\)表示由\([1,n]\)分裂出\([l,r]\)的概率设大区间为\([i,j]\),中间点为\(k\)若\([i,k]>[k+1,j]\),\(dp(i,k)=\frac......
  • CF1093F
    CF1093F题解容斥设\(dp(i,j)\)为考虑到\(i\)位置,该位置填\(j\)的方案数分类讨论如果\(a[i]!=-1\)如果\(j=a[i]\),\(dp(i,j)=\sum前面的总方案数\)否则\(dp(i,j)=0\)如果\(a[i]=-1\)\(dp(i,j)=\sum前面的总方案数\)前面的总方......
  • Pandas一行中满10个字符就自动换行?
    大家好,我是Python进阶者。一、前言前几天在Python白银交流群【上海新年人】问了一个Pandas处理数据的问题。问题如下:大佬们,有个需求,某一列中,有些单元格中数字太多,比如有20个字符,太难看了,有没有办法,满10个字符就自动换行!用了这个:str.wrap(10),但实际效果显示不出来。二......
  • P1082 [NOIP2012 提高组] 同余方程
    原题链接扩展欧几里得算法的应用,关于原理性的讲解这里就略去了,这边给出学习链接即模板。intexgcd(inta,intb,int&x,int&y){if(b==0){x=1;y=0;returnx;}intd=exgcd(b,a%b,x,y);x=y;y=d-a/b*y;returnx;}文......