05-MDC典型配置举例
本章节下载: 05-MDC典型配置举例 (147.38 KB)
H3C S10500 MDC配置举例
Copyright © 2014 杭州华三通信技术有限公司 版权所有,保留一切权利。 非经本公司书面许可,任何单位和个人不得擅自摘抄、复制本文档内容的部分或全部, 并不得以任何形式传播。本文档中的信息可能变动,恕不另行通知。 |
本文介绍了将设备划分为多个MDC的典型配置举例。
MDC(Multitenant Devices Context,多租户设备环境)是H3C自主研发的网络设备虚拟化技术,可以实现将一台物理设备划分为多台逻辑设备,每台逻辑设备就称为一台MDC。每台MDC拥有自己专属的软硬件资源,独立运行,独立转发。对于用户来说,每台MDC就是一台独立的设备。
本文档中的配置均是在实验室环境下进行的配置和验证,配置前设备的所有参数均采用出厂时的缺省配置。如果您已经对设备进行了配置,为了保证配置效果,请确认现有配置和以下举例中的配置不冲突。
本文假设您已了解MDC特性。
MDC功能受License限制,请在使用MDC功能前,安装有效的License。
如图1所示,某公司将一台设备分配给三个部门:信息技术部、财务部和市场部共同使用。设备上有三块接口板,每个接口板上有48个以太网接口。
三个部门具有如下特点:
· 信息技术部为公司的数据中心,需要管理规模较大的服务器和存储设备。
· 财务部对网络的稳定性及安全性有较高的要求,需要独立的网络环境,不受其他部门的影响。
· 三个部门中市场部网络业务流量最少。
要求在S10500设备上使用MDC技术实现:
· 为三个部门建立三个MDC:MDC A、MDC B和MDC C,部门间业务互相隔离。
· 根据各部门的业务需求为各MDC分配合理的CPU资源和磁盘/内存空间。
¡ MDC A、MDC B和MDC C配置主控板的磁盘空间使用上限分别为:60%、50%、40%。
¡ MDC A、MDC B和MDC C配置主控板的内存空间使用上限分别为:70%、60%、50%。
¡ MDC C配置CPU权重为5,MDC A和MDC B使用缺省的CPU权重(10)。
图1 MDC典型配置组网图
本举例是在S10500-CMW710-R2111P01版本上进行配置和验证的。
· MDC创建后必须要启动MDC(缺省没有启动),才能正常运行。
· 除管理以太网接口由缺省MDC和非缺省MDC共用外,一个物理接口只能属于一个MDC。物理接口分配给MDC后,需要登录该MDC后,才能对接口下的参数进行配置。
· 由于缺省情况下,缺省MDC拥有设备上所有硬件资源的使用权限,所以在将某个业务板分配给非缺省MDC之前,请先使用undo location命令取消缺省MDC对该业务板的使用权限,再将此业务板分配给其他MDC,避免相关资源被缺省MDC占用。
· 一块业务板上的所有接口只能加入一个MDC。因此为某个MDC分配接口时,请将一块业务板上的所有接口分配给该MDC。
· 物理接口只能从缺省MDC分配到非缺省MDC。当某接口属于MDC A,要分配到MDC B时,需要先使用undo allocate interface命令,将该接口归还给缺省MDC,再使用allocate interface命令分配给MDC B。
· 将物理接口分配给MDC或者从MDC中删除时,该接口下的所有配置都会恢复到缺省情况。请确保缺省MDC和非缺省MDC用户对同一个接口的操作时序,在缺省MDC用户分配或删除接口时及时通知非缺省MDC用户,让其停止配置该接口,否则可能导致接口达不到非缺省MDC用户预期的配置效果。
(1) 配置Switch网管口的IP地址、使能Telnet服务等基础配置,供用户远程登录缺省MDC。
<Switch> system-view
[Switch] interface M-GigabitEthernet 0/0/0
[Switch-M-GigabitEthernet0/0/0] ip address 192.168.0.250 16
[Switch-M-GigabitEthernet0/0/0] quit
[Switch] telnet server enable
[Switch] line vty 0 63
[Switch-line-vty0-63] authentication-mode password
[Switch-line-vty0-63] set authentication password simple 123
[Switch-line-vty0-63] user-role network-admin
[Switch-line-vty0-63] quit
(2) 创建并配置MDC A,供信息技术部使用。
# 在缺省MDC中删除2号业务板。
[Switch] mdc Admin
[Switch-mdc-1-Admin] undo location slot 2
The configuration associated with the specified slot of MDC will be lost. Continue? [Y/N]:y
[Switch-mdc-1-Admin] quit
# 创建MDC A,并将2号业务板分配给MDC A。
[Switch] mdc MDCA
Executing this command will create MDC MDCA ID 2 and empty folder /mdc/mdc2 in t
he root directory of the storage media. Continue? [Y/N]:Y
This MDC was created successfully.
[Switch-mdc-2-MDCA] location slot 2
# 为MDC A分配接口Ten-GigabitEthernet2/0/1~Ten-GigabitEthernet2/0/48。
[Switch-mdc-2-MDCA] allocate interface ten-gigabitethernet 2/0/1 to ten-gigabitethernet 2/0/48
The configurations of the interfaces will be lost. Continue? [Y/N]:y
# 配置MDC A在1号主控板的磁盘使用上限为60%。
[Switch-mdc-2-MDCA] limit-resource disk slot 1 ratio 60
# 配置MDC A在1号主控板的内存使用上限均为70%。
[Switch-mdc-2-MDCA] limit-resource memory slot 1 ratio 70
# 启动MDC A。
[Switch-mdc-2-MDCA] mdc start
It will take some time to start MDC...
This MDC was started successfully.
[Switch-mdc-2-MDCA] quit
# 切换到MDC A,并按照提示信息键入CTRL_D进入MDC A的命令行界面进行配置。
[Switch] switchto mdc MDCA
******************************************************************************
* Copyright (c) 2004-2014 Hangzhou H3C Tech. Co., Ltd. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
Automatic configuration is running, press CTRL_D to break or press CTRL_B to
switch back to the default MDC.
<H3C> system-view
# 将MDC A的设备名称修改为“MDCA”,以便和其它MDC区别。
[H3C] sysname MDCA
# 配置MDC A 的网管口的IP地址、使能Telnet服务等基础配置,供用户远程登录MDC A。
[MDCA] interface M-GigabitEthernet 0/0/0
[MDCA-M-GigabitEthernet0/0/0] ip address 192.168.1.251 24
[MDCA-M-GigabitEthernet0/0/0] quit
[MDCA] telnet server enable
[MDCA] line vty 0 63
[MDCA-line-vty0-63] authentication-mode password
[MDCA-line-vty0-63] set authentication password simple 123
[MDCA-line-vty0-63] user-role mdc-admin
# 从MDC A返回缺省MDC。
[MDCA-line-vty0-63] return
<MDCA> switchback
[Switch]
(3) 创建并配置MDC B,供财务部使用。
# 在缺省MDC中删除3号业务板。
[Switch] mdc Admin
[Switch-mdc-1-Admin] undo location slot 3
The configuration associated with the specified slot of MDC will be lost. Continue? [Y/N]:y
[Switch-mdc-1-Admin] quit
# 创建MDC B,并将3号业务板分配给MDC B。
[Switch] mdc MDCB
Executing this command will create MDC MDCB ID 3 and empty folder /mdc/mdc3 in the root directory of the storage media. Continue? [Y/N]:y
This MDC was created successfully.
[Switch-mdc-3-MDCB] location slot 3
# 为MDC B分配接口Ten-GigabitEthernet3/0/1~Ten-GigabitEthernet3/0/48。
[Switch-mdc-3-MDCB] allocate interface ten-gigabitethernet 3/0/1 to ten-gigabitethernet 3/0/48
The configurations of the interfaces will be lost. Continue? [Y/N]:y
# 配置MDC B的1号主控板磁盘使用上限为50%。
[Switch-mdc-3-MDCB] limit-resource disk slot 1 ratio 50
# 配置MDC B在1号主控板的内存使用上限均为60%。
[Switch-mdc-3-MDCB] limit-resource memory slot 1 ratio 60
# 启动MDC B。
[Switch-mdc-3-MDCB] mdc start
It will take some time to start MDC...
This MDC was started successfully.
[Switch-mdc-3-MDCB] quit
# 切换到MDC B,并按照提示信息键入CTRL_D进入MDC B的命令行界面进行配置。
[Switch] switchto mdc MDCB
******************************************************************************
* Copyright (c) 2004-2014 Hangzhou H3C Tech. Co., Ltd. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
Automatic configuration is running, press CTRL_D to break or press CTRL_B to
switch back to the default MDC.
<H3C> system-view
# 将MDC B的设备名称修改为“MDCB”,以便和其它MDC区别。
[H3C] sysname MDCB
# 配置MDC B的网管口的IP地址、使能Telnet服务等基础配置,供用户远程登录MDC B。
[MDCB] interface M-GigabitEthernet 0/0/0
[MDCB-M-GigabitEthernet0/0/0] ip address 192.168.2.251 24
[MDCB-M-GigabitEthernet0/0/0] quit
[MDCB] telnet server enable
[MDCB] line vty 0 63
[MDCB-line-vty0-63] authentication-mode password
[MDCB-line-vty0-63] set authentication password simple 123
# 从MDC B返回缺省MDC。
[MDCB-line-vty0-63] return
<MDCB> switchback
[Switch]
(4) 创建并配置MDC C,供市场部使用。
# 在缺省MDC中删除4号业务板。
[Switch-mdc-4-MDCC] mdc Admin
[Switch-mdc-1-Admin] undo location slot 4
The configuration associated with the specified slot of MDC will be lost. Continue? [Y/N]:y
[Switch-mdc-1-Admin] quit
# 创建MDC C,并将4号业务板分配给MDC C。
[Switch] mdc MDCC
Executing this command will create MDC MDCC ID 4 and empty folder /mdc/mdc4 in the root directory of the storage media. Continue? [Y/N]:y
This MDC was created successfully.
[Switch-mdc-4-MDCC] location slot 4
# 为MDC C分配接口Ten-GigabitEthernet4/0/1~Ten-GigabitEthernet4/0/48。
[Switch-mdc-4-MDCC] allocate interface ten-gigabitethernet 4/0/1 to ten-gigabitethernet 4/0/48
The configurations of the interfaces will be lost. Continue? [Y/N]:y
# 配置MDC C的CPU权重为5,比MDC A和MDC B都低。
[Switch-mdc-4-MDCC] limit-resource cpu weight 5
# 配置MDC C的1号主控板磁盘使用上限为40%。
[Switch-mdc-4-MDCC] limit-resource disk slot 1 ratio 40
# 配置MDC C在1号主控板的内存使用上限均为50%。
[Switch-mdc-4-MDCC] limit-resource memory slot 1 ratio 50
# 启动MDC C。
[Switch-mdc-4-MDCC] mdc start
It will take some time to start MDC...
This MDC was started successfully.
[Switch-mdc-4-MDCC] quit
# 切换到MDC C,并按照提示信息键入CTRL_D进入MDC C的命令行界面进行配置。
[Switch] switchto mdc MDCC
******************************************************************************
* Copyright (c) 2004-2014 Hangzhou H3C Tech. Co., Ltd. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
Automatic configuration is running, press CTRL_D to break or press CTRL_B to
switch back to the default MDC.
<H3C> system-view
# 将MDC C的设备名称修改为“MDCC”,以便和其它MDC区别。
[H3C] sysname MDCC
# 配置MDC C的网管口的IP地址、使能Telnet服务等基础配置,供用户远程登录MDC C。
[MDCC] interface M-GigabitEthernet 0/0/0
[MDCC-M-GigabitEthernet0/0/0] ip address 192.168.3.251 24
[MDCC-M-GigabitEthernet0/0/0] quit
[MDCC] telnet server enable
[MDCC] line vty 0 63
[MDCC-line-vty0-63] authentication-mode password
[MDCC-line-vty0-63] set authentication password simple 123
[MDCC-line-vty0-63] user-role mdc-admin
# 从MDC C返回缺省MDC。
[MDCC-line-vty0-63] return
<MDCC> switchback
# 保存设备上所有MDC内的配置。
[Switch] save mdc-all
# 在缺省MDC上,查看各MDC对单板CPU/磁盘/内存资源的使用情况。
<Switch> display mdc resource
Memory:
Slot 1:
Used 359.1MB, Free 7585.4MB, Total 7944.5MB:
ID Name Quota(MB) Used(MB) Available(MB)
----------------------------------------------------------------
1 Admin 7944.5 307.8 7585.4
2 MDCA 5561.1 51.2 5509.9
3 MDCB 4766.7 51.2 4715.5
4 MDCC 3972.2 51.2 3921
Slot 2:
Used 19.1MB, Free 661.7MB, Total 680.7MB:
ID Name Quota(MB) Used(MB) Available(MB)
----------------------------------------------------------------
1 Admin 680.7 13.8 661.7
2 MDCA 680.7 5.3 661.7
Slot 3:
Used 19.1MB, Free 661.7MB, Total 680.7MB:
ID Name Quota(MB) Used(MB) Available(MB)
----------------------------------------------------------------
1 Admin 680.7 13.8 661.7
3 MDCB 680.7 5.3 661.7
Slot 4:
Used 19.1MB, Free 661.7MB, Total 680.7MB:
ID Name Quota(MB) Used(MB) Available(MB)
----------------------------------------------------------------
1 Admin 680.7 13.8 661.7
4 MDCC 680.7 5.3 661.7
CPU:
Slot 1:
ID Name Weight Usage(%)
-------------------------------------------------
1 Admin 10 0
2 MDCA 10 0
3 MDCB 10 0
4 MDCC 5 0
Slot 2:
ID Name Weight Usage(%)
-------------------------------------------------
1 Admin 10 11
2 MDCA 10 0
Slot 3:
ID Name Weight Usage(%)
-------------------------------------------------
1 Admin 10 1
2 MDCB 10 0
Slot 4:
ID Name Weight Usage(%)
-------------------------------------------------
1 Admin 10 8
3 MDCC 10 0
Disk:
Slot 1:
flash:: Used 397.9MB, Free 94.1MB, Total 492.0MB:
ID Name Quota(MB) Used(MB) Available(MB)
--------------------------------------------------------------
1 Admin 492.0 397.9 94.1
2 MDCA 295.2 0.0 94.1
3 MDCB 246 0.0 94.1
4 MDCC 196.8 0.0 94.1
· 缺省MDC
#
mdc Admin id 1
undo location slot 2
undo location slot 3
undo location slot 4
#
mdc MDCA id 2
location slot 2
limit-resource memory slot 1 ratio 70
limit-resource disk slot 1 ratio 60
mdc start
allocate interface Ten-GigabitEthernet2/0/1 to Ten-GigabitEthernet2/0/48
#
mdc MDCB id 3
location slot 3
limit-resource memory slot 1 ratio 60
limit-resource disk slot 1 ratio 50
mdc start
allocate interface Ten-GigabitEthernet3/0/1 to Ten-GigabitEthernet3/0/48
#
mdc MDCC id 4
location slot 4
limit-resource memory slot 1 ratio 50
limit-resource cpu weight 5
limit-resource disk slot 1 ratio 40
mdc start
allocate interface Ten-GigabitEthernet4/0/1 to Ten-GigabitEthernet4/0/48
#
telnet server enable
#
interface M-GigabitEthernet0/0/0
ip address 192.168.0.250 255.255.0.0
#
line vty 0 63
user-role network-admin
user-role network-operator
set authentication password hash $h$6$4WJkKacKhE7V9va/$zLfChFIvGQqPQlaSKoI2+PVa
0LYVTjxOjmrbP6GuUycHkt JBJFBuQAEeyWlkCOjKT7hpwihoV1aDNCA7bcO4dg==
#
· MDC A
#
sysname MDCA
#
telnet server enable
#
interface M-GigabitEthernet0/0/0
ip address 192.168.1.251 255.255.255.0
#
line vty 0 63
user-role mdc-admin
user-role mdc-operator
set authentication password hash $h$6$1Osndewbt1Fewtj/$zLfChFIvGQqPQlaSKoI2+PVa
0LYVTjxOjmrbP6GuUycHkt9U+0qflSvZxRlQLGMBRZhpwihoV1aDNCA7bcO4dg==
#
· MDC B
#
sysname MDCB
#
telnet server enable
#
interface M-GigabitEthernet0/0/0
ip address 192.168.2.251 255.255.255.0
#
line vty 0 63
user-role mdc-admin
user-role mdc-operator
set authentication password hash $h$6$4k3XflRf/A83ufs3$VubOg+oDeKKcIgD2BGZuErPH
pMrJcCcAeaRc30ph3EMpZjPPru0np/ALpwJBJFBuQAEeyWlkCOjKT7UQR7Z5Zg==
#
· MDC C
#
sysname MDCC
#
telnet server enable
#
interface M-GigabitEthernet0/0/0
ip address 192.168.3.251 255.255.255.0
#
line vty 0 63
user-role mdc-admin
user-role mdc-operator
set authentication password hash $h$6$4WJkKacKhE7V9vaV$1m7x89d3QBjOpyFoEOCGhWxr
t+eF/wUeRJYAwdwFls/XlyTKuEgBJ4r3lWDzPfrr5nI4qHDk47gAhVhQu7uuQg==
· H3C S10500系列交换机 ACL和QoS配置指导-Release 211x系列
· H3C S10500系列交换机 ACL和QoS命令参考-Release 211x系列
不同款型规格的资料略有差异, 详细信息请向具体销售和400咨询。H3C保留在没有任何通知或提示的情况下对资料内容进行修改的权利!