可以通过GUI 或CLI进行配置
通过CLI更简单,和配置传统交换机差不多,
ACI中共有3大组件
APIC =控制器
SPINE =核心
LEAF =接入
下面我们将3种角色的带外IP配置方法都列出来
1 APIC配置带外IP
conf t
controller 1
interface mgmt0
ip address 10.249.254.1/24 gateway 10.249.254.254
oob-mgmt epg default
exit
exit
controller 2
interface mgmt0
ip address 10.249.254.2/24 gateway 10.249.254.254
oob-mgmt epg default
exit
exit
controller 3
interface mgmt0
ip address 10.249.254.3/24 gateway 10.249.254.254
oob-mgmt epg default
exit
exit
上面说的啥意思呢?就是给APIC配置Ip, APIC不是有3台吗,所以给每1台配置了带外IP
2 如何设置vty白名单
需求:限制能登录ACI的source IP及端口
只允许 192.0.20.0/24这个网段的主机来访问 APIC,并且只能访问22和443
这个就和思科传统交换机的line vty下面那个access-class是一样的。
apic1(config)# tenant mgmt
apic1(config-tenant)# external-l3 epg default oob-mgmt
apic1(config-tenant-l3ext-epg)# match ip 192.0.20.0/24
apic1(config-tenant-l3ext-epg)# exit
apic1(config-tenant)# access-list oob-default
apic1(config-tenant-acl)# match tcp dest 443
apic1(config-tenant-acl)# match tcp dest 22
2 Leaf交换机配置带外IP
进入config模式,
指定相应的node ID,
配置Ip和网关,和传统的Nexus类似
apic1# configure
apic1(config)# switch 1110
apic1(config-switch)# interface mgmt0
apic1(config-switch-if)# ip address 10.248.1.51/24 gateway 10.248.1.1
配置完成后,可以通过以下命令查看mgmt0的IP
APIC# fabric 1110 show interface mgmt 0
----------------------------------------------------------------
Node 1110 (Leaf-1110)
----------------------------------------------------------------
mgmt0 is up
admin state is up,
Hardware: GigabitEthernet, address: 0008.314f.aaaa(bia 0008.314f.aaaa)
Internet Address is 10.248.1.51/24
MTU 1500 bytes, BW 1000000 Kbit, DLY 10 usec
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, medium is broadcast
或者以下命令
APIC# show switch detail id 1110
ID : 1110
Role : leaf
Name :Leaf-1110
Pod Id : 1
Address : 10.1.11.75
In-Band V4 Address : 0.0.0.0
In-Band V6 Address : ::
OOB V4 Address : 10.248.1.51
OOB V6 Address : ::
Serial Number : FDOABCDEFGH
Version : n9000-15.1(3g)
Up Time : 00:19:58:05.000
Fabric State : YES
State : in-service
Valid Certificate : yes
Validity Start : 2024-06-08T10:55:13.000+08:00
Validity End : 2029-05-15T04:25:42.000+08:00
** 那spine交换机的带外Ip怎么配置?**
和上面Leaf的一样配置,只要指定spine的 Node ID就可以,示例:
apic1# configure
apic1(config)# switch 101
apic1(config-switch)# interface mgmt0
apic1(config-switch-if)# ip address 172.23.48.51/21 gateway 172.23.48.1
GUI配置方式
Tenants -->mgmt —>Node Mangement Addresses -->Static Node Mangement Addresses
这上面鼠标右键---->Create Static Node Management Addresses
# 配置选项如下: