- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
02-MDC configuration | 115.83 KB |
Contents
Default MDC and non-default MDCs
Assigning hardware resources to an MDC
Assigning physical interfaces to an MDC
Specifying a CPU weight for an MDC
Specifying a memory space percentage for an MDC
Displaying and maintaining MDCs
MDC configuration example (in standalone mode)
MDC configuration example (in IRF mode)
Configuring MDCs
Overview
The Multitenant Device Context (MDC) technology can partition a physical device or an IRF fabric into multiple logical devices called MDCs. Each MDC uses its own hardware and software resources, runs independently of other MDCs, and provides services for its own customer. Creating, starting, rebooting, or deleting an MDC does not affect any other MDCs. From the user's perspective, an MDC is a standalone physical device.
Each MDC is isolated from the other MDCs on the same physical device and cannot directly communicate with them. To allow two MDCs on the same physical device to communicate, you must physically connect a port allocated to one MDC to a port allocated to the other MDC.
To manage the MDCs on the same physical device, you only need to log in to the physical device.
Using MDC together with the IRF technology, you can improve network resource efficiency while integrating network resources.
MDC applications
As shown in Figure 1, LAN 1, LAN 2, and LAN 3 are three companies' LANs. To provide access service for the three companies, you can deploy a single physical device and configure an MDC for each company on the device. Then, the administrators of each company can log in only to their own MDC to maintain their own network, without affecting any other MDC or network. The effect equals deploying a separate gateway for each company.
Default MDC and non-default MDCs
A device supporting MDCs is called the default MDC (for example, Device in Figure 1). The default MDC always uses the name Admin and the ID 1. You cannot delete it or change its name or ID.
When you log in to the physical device, you are logged in to the default MDC. Configuring the physical device is the same as configuring the default MDC.
On the default MDC, you can perform the following tasks:
· Manage the entire physical device.
· Create and delete non-default MDCs (for example, Device A, Device B, and Device C in Figure 1).
· Assign resources to non-default MDCs. These resources include interfaces, CPU resources, and memory space.
No MDCs can be created on a non-default MDC. Administrators of non-default MDCs can only manage and maintain their respective MDCs.
A non-default MDC can use only the resources assigned to it. It cannot use the resources assigned to other MDCs or the remaining resources on the physical device. Resources that are not assigned to any non-default MDC belong to the default MDC.
Unless otherwise stated, the term "MDC" refers to a non-default MDC and all operations are performed on the default MDC in the following sections. For more information about the configurations and services for a non-default MDC, see related manuals.
MDC configuration task list
|
IMPORTANT: To configure MDCs for a device that you want to add to an IRF fabric, add the device to the IRF fabric before configuring MDCs. After a device joins an IRF fabric, it reboots and loads the master's configuration instead of its own. |
Tasks at a glance |
(Required.) Creating an MDC |
Assigning hardware resources to an MDC: · (Required.) Assigning physical interfaces to an MDC · (Optional.) Specifying a CPU weight for an MDC · (Optional.) Specifying a memory space percentage for an MDC |
(Required.) Starting an MDC |
(Required.) Accessing an MDC |
You can assign hardware resources to MDCs before or after you start the MDCs. As a best practice, assign MDCs resources before starting them.
Creating an MDC
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Create an MDC. |
mdc mdc-name [ id mdc-id ] |
By default, a default MDC exists. The MDC name is Admin and the MDC ID is 1. The default MDC is system defined. You cannot delete it. The MDC starts to work after you execute the mdc start command. |
Assigning hardware resources to an MDC
When you create an MDC, the system automatically assigns CPU and memory space resources to the MDC to ensure its operation. You can adjust the resource allocations as required.
An MDC needs interfaces to forward packets. However, the system does not automatically assign interfaces to MDCs and you must assign them.
Assigning physical interfaces to an MDC
By default, all physical interfaces belong to the default MDC, and a non-default MDC does not have any physical interfaces to use for packet forwarding. To enable a non-default MDC to forward packets, you must assign it interfaces.
Configuration guidelines
You can assign multiple physical interfaces to a non-default MDC. A physical interface must meet the following requirements to be assigned to a non-default MDC:
· The interface must belong to the default MDC. To assign a physical interface that belongs to one non-default MDC to another non-default MDC, you must remove the existing assignment by using the undo allocate interface command.
· The interface must not be the console or AUX port. The console port and AUX port belong to the default MDC. You cannot assign them to a non-default MDC.
· The interface must not be the management Ethernet interface. The physical management Ethernet interface of the device belongs to the default MDC and cannot be assigned to a non-default MDC. When a non-default MDC is created, the system automatically creates a virtual management Ethernet interface for the MDC. All the virtual management Ethernet interfaces use the same interface type and number and the same physical port and link as the default MDC's physical management Ethernet interface. However, you must assign different IP addresses to the virtual management Ethernet interfaces so MDC administrators can access and manage their respective MDCs. The IP addresses for the management Ethernet interfaces do not need to belong to the same network segment.
The default MDC uses only the physical interfaces that are not assigned to a non-default MDC.
To assign, reassign, or reclaim a physical IRF port, you must use the undo port group interface command to remove the physical port-IRF port binding. After you assign, reassign, or reclaim a physical IRF port, you must use the save command to save the running configuration. For more information about the undo port group interface command, see IRF Command Reference.
Assigning or reclaiming a physical interface restores the settings of the interface to the defaults. If the MDC administrator configures the interface during the assigning or reclaiming operation, settings made before the operation is completed are lost.
A physical interface can belong only to one MDC.
Interfaces on an interface card must belong to the same MDC.
To configure a physical interface assigned to an MDC, you must log in to the MDC.
Configuration procedure
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter MDC view. |
mdc mdc-name [ id mdc-id ] |
N/A |
3. Assign physical interfaces to the MDC. |
allocate interface interface-list |
By default, all physical interfaces belong to the default MDC. A non-default MDC cannot use any physical interfaces. |
Specifying a CPU weight for an MDC
To ensure correct operation of all MDCs, assign them CPU weights. All MDCs authorized to use the same interface card share the CPU of the interface card. If one MDC occupies too many of the CPU resources, the other MDCs might not be able to operate.
The number of CPU resources an MDC can use depends on the percentage of its CPU weight among the CPU weights of all MDCs that share the same CPU. For example, if three MDCs share the same CPU, setting their weights to 10, 10, and 5 is equivalent to setting their weights to 2, 2, and 1.
· The two MDCs with the same weight can use the CPU for approximately the same period of time.
· The third MDC can use the CPU for approximately half of the time for each of the other two MDCs.
The CPU weight specified for an MDC takes effect on all MPUs and all interface cards that the MDC is authorized to use.
To specify a CPU weight for an MDC:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter MDC view. |
mdc mdc-name [ id mdc-id ] |
N/A |
3. Specify a CPU weight for the MDC. |
limit-resource cpu weight weight-value |
The defaults are as follows: · The default MDC has a CPU weight of 10 on each card. · Each non-default MDC has a CPU weight of 10 on each card that it is authorized to use. The CPU weight for the default MDC is fixed at 10 and cannot be changed. |
Specifying a memory space percentage for an MDC
The MDCs on a device share and compete for the system memory space. If an MDC occupies too much memory space, the other MDCs might not be able to operate correctly. To avoid this problem, specify a memory space percentage for each MDC.
Before you specify a memory space percentage for an MDC, use the display mdc resource command to view how much memory space the MDC is using. Make sure the memory space you assign to an MDC is sufficient for the MDC to operate correctly.
To specify a memory space percentage for an MDC:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Enter MDC view. |
mdc mdc-name [ id mdc-id ] |
N/A |
3. Specify a memory space percentage for the MDC. |
· In standalone mode: · In IRF mode: |
By default, all MDCs share the memory space in the system, and an MDC can use all free memory space in the system. |
Starting an MDC
Step |
Command |
1. Enter system view. |
system-view |
2. Enter MDC view. |
mdc mdc-name [ id mdc-id ] |
3. Start the MDC. |
mdc start |
Accessing an MDC
A non-default MDC operates in the same way as a standalone device. From the system view of the default MDC, you can log in to a non-default MDC and enter MDC system view. To allow administrators of an MDC to log in to the MDC by using Telnet or SSH, you must complete one of the following tasks in MDC system view:
· Assign an IP address to the management Ethernet interface.
· Create a VLAN interface on the MDC and assign an IP address to the interface.
To return from an MDC to the default MDC, use the switchback or quit command.
To log in to a non-default MDC from the system view of the default MDC:
Step |
Command |
Remarks |
1. Enter system view. |
system-view |
N/A |
2. Log in to an MDC. |
switchto mdc mdc-name |
You use this command to log in only to an MDC that is in active state. |
Displaying and maintaining MDCs
Execute display commands in any view on the default MDC:
Task |
Command |
Display MDCs and their status. |
display mdc [ name mdc-name ] |
Display the interfaces of MDCs. |
display mdc [ name mdc-name ] interface |
Display the CPU and memory space usage of MDCs. (In standalone mode.) |
display mdc [ name mdc-name ] resource [ cpu | memory ] [ slot slot-number ] |
Display the CPU and memory space usage of MDCs. (In IRF mode.) |
display mdc [ name mdc-name ] resource [ cpu | memory ] [ chassis chassis-number slot slot-number ] |
Execute display commands in any view on a non-default MDC:
Task |
Command |
Display the ID, name, and status of the MDC. |
display mdc |
Display the interfaces of the MDC. |
display mdc interface |
Display the CPU and memory space usage of the MDC. (In standalone mode.) |
display mdc resource [ cpu | memory ] [ slot slot-number ] |
Display the CPU and memory space usage of the MDC. (In IRF mode.) |
display mdc resource [ cpu | memory ] [ chassis chassis-number slot slot-number ] |
MDC configuration example (in standalone mode)
Network requirements
As shown in Figure 2, two departments need to use the device to access the Internet.
Configure two MDCs on the device to meet the Internet access requirements of the two departments.
Configuration procedure
1. Create and configure MDCs:
# Create MDCA for Department A.
<Device> system-view
[Device] mdc MDCA
It will take some time to create MDC...
MDC created successfully.
[Device-mdc-2-MDCA] quit
# Create MDCB for Department B.
[Device] mdc MDCB
It will take some time to create MDC...
MDC created successfully.
[Device-mdc-3-MDCB] quit
# Assign interfaces GigabitEthernet 1/1/0 through GigabitEthernet 1/1/7 to MDCA.
[Device] mdc MDCA
[Device-mdc-2-MDCA] allocate interface gigabitethernet 1/1/0 to gigabitethernet 1/1/7
Configuration of the interfaces will be lost. Continue? [Y/N]:y
Execute the location slot command in this view to make the configuration take effect.
[Device-mdc-2-MDCA] quit
# Set the CPU weight to 5 for MDCA.
[Device-mdc-2-MDCA] limit-resource cpu weight 5
# Start MDCA.
[Device-mdc-2-MDCA] mdc start
It will take some time to start MDC...
MDC started successfully.
[Device-mdc-2-MDCA] quit
# Assign interfaces GigabitEthernet 3/1/0 through GigabitEthernet 3/1/7 to MDCB.
[Device] mdc MDCB
[Device-mdc-3-MDCB] allocate interface gigabitethernet 3/1/0 to gigabitethernet 3/1/7
Configuration of the interfaces will be lost. Continue? [Y/N]:y
Execute the location slot command in this view to make the configuration take effect.
# Set the CPU weight to 5 for MDCB.
[Device-mdc-3-MDCB] limit-resource cpu weight 5
# Start MDCB.
[Device-mdc-3-MDCB] mdc start
It will take some time to start MDC...
MDC started successfully.
[Device-mdc-3-MDCB] quit
2. Configure the management Ethernet interface for MDCA:
# Log in to MDCA from the default MDC. Because a non-default MDC does not have a configuration file by default, the automatic configuration process starts. Press Ctrl+D as prompted to access the CLI of MDCA.
[Device] switchto mdc MDCA
******************************************************************************
* Copyright (c) 2004-2016 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.
<Device> system-view
# Change the device name to MDCA for easy identification of the MDC.
[Device] sysname MDCA
# To enable the MDC administrator to remotely manage the MDC, assign an IP address to the management Ethernet interface and enable the Telnet service.
[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] user-interface vty 0 63
[MDCA-line-vty0-63] authentication-mode none
[MDCA-line-vty0-63] user-role mdc-admin
# Return to the default MDC.
[MDCA-line-vty0-63] return
<MDCA> switchback
[Device]
3. Configure the management Ethernet interface for MDCB:
# Log in to MDCB from the default MDC. Press Ctrl+D as prompted to access the CLI of MDCB.
[Device] switchto mdc MDCB
******************************************************************************
* Copyright (c) 2004-2016 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.
<Device> system-view
# Change the device name to MDCB for easy identification of the MDC.
[Device] sysname MDCB
# To enable the MDC administrator to remotely manage the MDC, assign an IP address to the management Ethernet interface and enable the Telnet service.
[MDCB] interface m-gigabitethernet 0/0/0
[MDCB-M-GigabitEthernet0/0/0] ip address 192.168.2.252 24
[MDCB-M-GigabitEthernet0/0/0] quit
[MDCB] telnet server enable
[MDCB] user-interface vty 0 63
[MDCB-line-vty0-63] authentication-mode none
[MDCB-line-vty0-63] user-role mdc-admin
# Return to the default MDC.
[MDCB-line-vty0-63] return
<MDCB> switchback
[Device]
Verifying the configuration
1. Verify that the MDCs exist and are operating correctly.
<Device> display mdc
ID Name Status
1 Admin active
2 MDCA active
3 MDCB active
The output shows that the MDCs have been created and are operating correctly.
2. Log in to MDCA as an administrator of Department A and then view the current configuration of the MDC.
C:\> telnet 192.168.1.251
******************************************************************************
* Copyright (c) 2004-2016 Hangzhou H3C Tech. Co., Ltd. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<MDCA> display current-configuration
…
MDC configuration example (in IRF mode)
Network requirements
As shown in Figure 3, two departments need to use the IRF fabric to access the Internet. In the IRF fabric, each member device has two LPUs. Each LPU has 12 HGE interfaces, which belong to two interface groups.
The two member devices are connected with two IRF links. The IRF port on the master is IRF port 1. The IRF port on the subordinate member is IRF port 2. IRF port 1 is bound with Ten-GigabitEthernet 1/0/0/1. IRF port 2 is bound with Ten-GigabitEthernet 2/0/01.
Configure two MDCs on the IRF fabric to meet the Internet access requirements of two departments. Assign Ten-GigabitEthernet 1/1/1/0 through Ten-GigabitEthernet 1/1/1/3 and Ten-GigabitEthernet 2/1/1/0 through Ten-GigabitEthernet 2/1/1/3 to MDCA. Assign Ten-GigabitEthernet 1/3/1/0 through Ten-GigabitEthernet 1/3/1/3 and Ten-GigabitEthernet 2/3/1/0 through Ten-GigabitEthernet 2/3/1/3 to MDCB.
Configuration procedure
1. Create MDCA and MDCB:
# Create MDCA for Department A.
<IRF> system-view
[IRF] mdc MDCA
It will take some time to create MDC...
MDC created successfully.
[IRF-mdc-2-MDCA] quit
The output shows that MDCA is created successfully. As a best practice, make sure MDCA is created successfully before you create MDCB.
# Create MDCB for Department B.
[IRF] mdc MDCB
It will take some time to create MDC...
MDC created successfully.
[IRF-mdc-3-MDCB] quit
The output shows that MDCB is created successfully. As a best practice, make sure MDCB is created successfully before you perform the following tasks.
2. Assign resources to MDCA and start MDCA:
# Assign Ten-GigabitEthernet 1/1/1/0 through Ten-GigabitEthernet 1/1/1/3 and Ten-GigabitEthernet 2/1/1/0 through Ten-GigabitEthernet 2/1/1/3 to MDCA.
[IRF] mdc MDCA
[IRF-mdc-2-MDCA] allocate interface gigabitethernet 1/1/1/0 to gigabitethernet 1/1/1/3
Configuration of the interfaces will be lost. Continue? [Y/N]:y
Execute the location slot command in this view to make the configuration take effect.
[IRF-mdc-2-MDCA] allocate interface gigabitethernet 2/1/1/0 to gigabitethernet 2/1/1/3
Configuration of the interfaces will be lost. Continue? [Y/N]:y
Execute the location slot command in this view to make the configuration take effect.
# Set the CPU weight to 5 for MDCA.
[IRF-mdc-2-MDCA] limit-resource cpu weight 5
# Start MDCA.
[IRF-mdc-2-MDCA] mdc start
It will take some time to start MDC...
MDC started successfully.
[IRF-mdc-2-MDCA] quit
3. Configure MDCA to enable remote access to MDCA:
# Log in to MDCA from the default MDC. Press Ctrl+D as prompted to stop automatic MDC configuration and access the CLI of MDCA.
[IRF] switchto mdc MDCA
******************************************************************************
* Copyright (c) 2004-2016 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.
<IRF> system-view
# Change the device name to MDCA for easy identification of the MDC.
[IRF] sysname MDCA
# Assign an IP address to the management interface and configure Telnet login.
[MDCA] display interface m-gigabitethernet brief
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Primary IP Description
M-GE1/0/0/0 UP UP --
[MDCA] interface m-gigabitethernet 1/0/0/0
[MDCA-M-GigabitEthernet1/0/0/0] ip address 192.168.2.251 24
[MDCA-M-GigabitEthernet1/0/0/0] quit
[MDCA] telnet server enable
[MDCA] user-interface vty 0 63
[MDCA-line-vty0-63] authentication-mode none
[MDCA-line-vty0-63] user-role mdc-admin
# Return to the default MDC.
[MDCA-line-vty0-63] return
<MDCA> switchback
[IRF]
4. Assign resources to MDCB and start MDCB:
# Assign Ten-GigabitEthernet 1/3/1/0 through Ten-GigabitEthernet 1/3/1/3 and Ten-GigabitEthernet 2/3/1/0 through Ten-GigabitEthernet 2/3/1/3 to MDCB.
[IRF] mdc MDCB
[IRF-mdc-3-MDCB] allocate interface gigabitethernet 1/3/1/0 to gigabitethernet 1/3/1/3
Configuration of the interfaces will be lost. Continue? [Y/N]:y
Execute the location slot command in this view to make the configuration take effect.
[IRF-mdc-3-MDCB] allocate interface gigabitethernet 2/3/1/0 to gigabitethernet 2/3/1/3
Configuration of the interfaces will be lost. Continue? [Y/N]:y
Execute the location slot command in this view to make the configuration take effect.
[IRF-mdc-3-MDCB] quit
# Set the CPU weight to 5 for MDCB.
[IRF-mdc-3-MDCB] limit-resource cpu weight 5
# Start MDCB.
[IRF-mdc-3-MDCB] mdc start
It will take some time to start MDC...
MDC started successfully.
[IRF-mdc-3-MDCB] quit
5. Configure MDCB to enable remote access to MDCB:
# Log in to MDCB from the default MDC. Press Ctrl+D as prompted to stop automatic MDC configuration and access the CLI of MDCB.
[IRF] switchto mdc MDCB
******************************************************************************
* Copyright (c) 2004-2016 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.
<IRF> system-view
# Change the device name to MDCB for easy identification of the MDC.
[IRF] sysname MDCB
# Return to the default MDC.
<MDCB> switchback
[IRF]
# View the ID of MDCB.
[IRF] display mdc
ID Name Status
1 Admin active
2 MDCA active
3 MDCB active
# Log in to MDCB from the default MDC.
[IRF] switchto mdc MDCB
******************************************************************************
* Copyright (c) 2004-2016 Hangzhou H3C Tech. Co., Ltd. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<MDCB> system-view
# Assign an IP address to the management interface and configure Telnet login.
[MDCB] display interface m-gigabitethernet brief
Brief information on interfaces in route mode:
Link: ADM - administratively down; Stby - standby
Protocol: (s) - spoofing
Interface Link Protocol Primary IP Description
M-GE1/0/0/0 UP UP --
[MDCB] interface m-gigabitethernet 1/0/0/0
[MDCB-M-GigabitEthernet1/0/0/0] ip address 192.168.1.252 24
[MDCB-M-GigabitEthernet1/0/0/0] quit
[MDCB] telnet server enable
[MDCB] user-interface vty 0 63
[MDCB-line-vty0-63] authentication-mode none
[MDCB-line-vty0-63] user-role mdc-admin
[MDCB-line-vty0-63] return
# Return to the default MDC.
<MDCB> switchback
[IRF]
Verifying the configuration
1. Verify that the MDCs exist and are operating correctly.
[IRF] display mdc
ID Name Status
1 Admin active
2 MDCA active
3 MDCB active
The output shows that the MDCs have been created and are operating correctly.
2. Display IRF link information.
[IRF] display irf link
Member 1
IRF Port Interface Status
1 Ten-GigabitEthernet1/0/0/1 UP
2 disable --
Member 2
IRF Port Interface Status
1 disable --
2 Ten-GigabitEthernet2/0/0/1 UP
The output shows that two IRF links exist and are in up state. One IRF link is on the default MDC, and the other IRF link is on MDCB.
3. Log in to MDCA as an administrator of Department A. View the running configuration of the MDC.
C:\> telnet 192.168.1.251
******************************************************************************
* Copyright (c) 2004-2016 Hangzhou H3C Tech. Co., Ltd. All rights reserved. *
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<MDCA> display current-configuration
…