- Table of Contents
- Related Documents
-
Title | Size | Download |
---|---|---|
02-MDC configuration | 179.95 KB |
Contents
Default MDC and non-default MDCs
Licensing requirements for MDC
Restrictions and guidelines: MDC configuration
MDC configuration tasks at a glance
Assigning hardware resources to an MDC
About assigning hardware resources
Assigning physical interfaces and LPUs to MDCs
Specifying a CPU weight for an MDC
Specifying a disk space percentage for an MDC
Specifying a memory space percentage for an MDC
Display and maintenance commands for MDC
Example: Configuring MDCs (in standalone mode)
Configuring MDCs
About MDC
The Multitenant Device Context (MDC) technology can partition a physical device or an IRF fabric into multiple logical devices. Each of the logical devices is called an MDC.
MDC advantages
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. MDCs on the same physical device are isolated from each other.
For an administrator, the MDC technology can help reduce costs and improve network resource efficiency. To add a new branch on the network, you only need to create an additional MDC. To manage MDCs, you only need to log in to the physical device.
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, disk space, and memory space.
No MDCs can be created on a non-default MDC. Administrators of non-default MDCs can manage and maintain only 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.
Interface management
All interfaces belong to the default MDC by default. You can assign physical interfaces and LPUs to a non-default MDC.
The following physical interfaces always belong to the default MDC and cannot be assigned to a non-default MDC:
· Console port.
· Physical management Ethernet interfaces.
When you create an MDC, the system automatically creates one virtual management Ethernet interface for each physical management Ethernet interface on the MDC. A virtual management Ethernet interface uses the same interface number, physical port, and link as its corresponding physical management Ethernet interface. You can assign IP addresses to the virtual management Ethernet interfaces for access to the MDC. The IP addresses for the virtual management Ethernet interfaces can belong to different subnets.
You can use the shutdown command to shut down management Ethernet interfaces only on the default MDC.
Licensing requirements for MDC
MDC requires a license to run on the device. If no license is installed or the license expires, you cannot create, start, or use non-default MDCs. For more information about licenses, see "Managing licenses."
Restrictions and guidelines: MDC configuration
MDCs are supported only on the S7506X-G, S7506X-G-PoE, S7510X-G, and S7510X-G-PoE switches operating in standalone mode. For more information about standalone mode, see "Configuring IRF." You can assign disk, memory, and VLAN resources to MDCs before or after you start the MDCs. As a best practice, assign MDCs resources before starting them.
You can create a maximum of two non-default MDCs.
All commands in this chapter are supported on the default MDC, except for the switchback command. Non-default MDCs support only the following commands: display mdc, display mdc interface, display mdc resource, and switchback.
MDC configuration tasks at a glance
To configure an MDC, perform the following tasks:
After the MDC starts up, use the display mdc resource command to identify the minimum disk space and memory space requirements for the MDC.
3. Assigning hardware resources to an MDC
¡ Assigning physical interfaces and LPUs to MDCs
¡ Specifying a CPU weight for an MDC
¡ Specifying a disk space percentage for an MDC
¡ Specifying a memory space percentage for an MDC
5. (Optional.) Returning to the default MDC
6. (Optional.) Deleting an MDC
Creating an MDC
About this task
Creating an MDC is equivalent to setting up a new device. A created MDC is not initialized or started.
Hardware and feature compatibility
When the LSCM2SRP6C4Y06A0 or LSCM3SRP6C4Y06A0 MPU is installed on the S7500X-G switch, you cannot create non-default MDCs on the switch.
Procedure
1. Enter system view.
system-view
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.
Starting an MDC
About this task
An MDC starts to operate after being started.
Procedure
1. Enter system view.
system-view
2. Enter MDC view.
mdc mdc-name [ id mdc-id ]
3. Start the MDC.
mdc start
The MDC starts up and starts the automatic configuration process.
4. Return to system view.
quit
5. Use the switchto mdc command to log in to the MDC and verify that the automatic configuration process is completed.
If the automatic configuration failed, stop the automatic configuration process as prompted. For more information about automatic configuration, see "Using automatic configuration."
Assigning hardware resources to an MDC
About assigning hardware resources
When you create an MDC, the system automatically assigns resources to the MDC, including CPU resources, disk space, and memory space. You can adjust the resource allocations as required.
An MDC needs interfaces to forward packets. The system does not automatically assign LPUs or interfaces to MDCs. For an MDC to forward traffic, you must assign interfaces and LPUs to MDCs.
Assigning physical interfaces and LPUs to MDCs
Restrictions and guidelines
· Make sure no other users are configuring an interface before you assign the interface to or reclaim the interface from an MDC.
· Interfaces on LPUs are grouped. The interfaces in a group must be assigned to or removed from the same MDC at the same time. If you do not specify all interfaces of a group in a single allocate command, the command lists all interfaces in the group. You can choose to assign all interfaces in the group to the MDC at prompt.
· All interfaces on an LPU must be assigned to the same MDC.
· An interface can be assigned to only one MDC.
· Make sure an interface to be assigned to a non-default MDC belongs to the default MDC. To assign an interface that belongs to one non-default MDC to another non-default MDC, you must reclaim the interface first.
· To assign physical interfaces to an MDC, you must reclaim the LPUs where the physical interfaces reside from all MDCs, including the default MDC.
Restrictions and guidelines for interface configuration
Assigning or reclaiming a physical interface restores the settings of the interface to the defaults.
To configure parameters for a physical interface that has been assigned to an MDC, you must log in to the MDC.
Configuration considerations
Before assigning physical interfaces and LPUs to MDCs, determine the following items:
· Number of MDCs.
· Number of physical interfaces that each MDC needs.
· Interface numbers of the physical interfaces to be assigned to MDCs.
· Location of each LPU that holds the physical interfaces to be assigned.
Procedure
1. Determine the MDC requirements, including:
¡ Number of physical interfaces that each MDC needs.
¡ Interface numbers of the physical interfaces to be assigned to MDCs.
¡ Location of each LPU that holds the physical interfaces to be assigned.
2. Enter system view.
system-view
3. Enter the MDC view of the default MDC.
mdc Admin
4. Reclaim the LPUs that you want to assign to a non-default MDC.
undo location slot slot-number
By default, all LPUs belong to the default MDC.
CAUTION: Use this command with caution. After you use this command to reclaim an LPU from an MDC, the MDC cannot use this LPU to receive or send packets. Traffic forwarding might be interrupted on the MDC. |
5. Return to system view.
quit
6. Enter the MDC view for the MDC to which you want to assign physical interfaces.
mdc mdc-name [ id mdc-id ]
7. Reclaim the LPUs that you want to assign to a non-default MDC.
In standalone mode:
undo location slot slot-number
By default, all LPUs belong to the default MDC.
CAUTION: Use this command with caution. After you use this command to reclaim an LPU from an MDC, the MDC cannot use this LPU to receive or send packets. Traffic forwarding might be interrupted on the MDC. |
8. 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.
To assign multiple physical interfaces to an MDC, specify the interfaces for the interface-list argument or execute this command multiple times.
9. Assign an LPU to the MDC.
location slot slot-number
By default, all LPUs belong to the default MDC. A non-default MDC cannot use any LPUs.
Assign an LPU to an MDC only if interfaces on the LPU have been assigned to the MDC.
Specifying a CPU weight for an MDC
About this task
To ensure correct operation of all MDCs, assign them CPU weights. All MDCs share the CPU resources on the MPUs. 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 LPUs assigned to the MDC.
Procedure
1. Enter system view.
system-view
2. Enter MDC view.
mdc mdc-name [ id mdc-id ]
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 MPU and each LPU.
¡ Each non-default MDC has a CPU weight of 10 on each MPU and each assigned LPU.
The CPU weight for the default MDC is fixed at 10 and cannot be changed.
Specifying a disk space percentage for an MDC
About this task
The MDCs on a device share and compete for the disk space of the device's disk media. If an MDC occupies too much disk space, the other MDCs might not be able to save information such as configuration files and system logs. To avoid this problem, specify a disk space percentage for each MDC.
Restrictions and guidelines
You can specify the disk keyword in the display mdc resource command or use the limit-resource disk command only when the device is installed with MPUs prefixed with LSCM1.
The amount of disk space assigned to an MDC must be greater than the amount of disk space the MDC is using. If not, the MDC cannot perform operations that require more disk space, for example, creating directories, copying files, or saving files. As a best practice, execute the display mdc resource command after the MDC starts up to identify the minimum disk space requirements.
Procedure
1. Display the disk space usage of the MDC.
display mdc [ name mdc-name ] resource [ disk ] [ slot slot-number ]
This command is available in any view.
2. Enter system view.
system-view
3. Enter MDC view.
mdc mdc-name [ id mdc-id ]
4. Specify a disk space percentage for the MDC.
limit-resource disk slot slot-number ratio limit-ratio
By default, all MDCs share the disk space in the system, and an MDC can use all free disk space in the system.
Specifying a memory space percentage for an MDC
About this task
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.
Prerequisites
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.
The amount of memory space assigned to an MDC must be greater than the amount of memory space the MDC is using. As a best practice, execute the display mdc resource command after the MDC starts up to identify the minimum memory space requirements.
Procedure
1. Display the memory space usage of the MDC.
display mdc [ name mdc-name ] resource [ memory ] [ slot slot-number ]
This command is available in any view.
2. Enter system view.
system-view
3. Enter MDC view.
mdc mdc-name [ id mdc-id ]
4. Specify a memory space percentage for the MDC.
limit-resource memory slot slot-number ratio limit-ratio
By default, all MDCs share the memory space in the system, and an MDC can use all free memory space in the system.
Accessing an MDC
About this task
This feature enables you to log in to a non-default MDC from the system view of the default MDC.
Restrictions and guidelines
This feature provides the only method for you to access an MDC for the first time.
After using this feature to access an MDC, you can perform the following tasks to allow the administrator of the MDC to log in to the MDC by using Telnet or SSH:
· Assign an IP address to the management Ethernet interface.
· Create a VLAN interface on the MDC and assign an IP address to the interface.
· Make sure the MDC and the configuration terminal of the administrator of the MDC can reach each other.
Procedure
1. Enter system view.
system-view
2. Log in to an MDC.
switchto mdc mdc-name
You can use this command to log in only to an MDC that is in active state.
Returning to the default MDC
About this task
Use this feature to return from the user view of a non-default MDC to the system view of the default MDC.
Procedure
To return from the user view of a non-default MDC to the system view of the default MDC, use one of the following commands:
· switchback
· quit
Deleting an MDC
Restrictions and guidelines
When you delete an MDC, you must follow the procedure in this task so the resources in that MDC can be successfully reclaimed for reassignment.
Procedure
1. Enter system view.
system-view
2. Enter MDC view.
mdc mdc-name [ id mdc-id ]
3. Display the running configuration in the MDC view.
display this
4. Stop the MDC.
undo mdc start
CAUTION: Stop an MDC with caution. Stopping an MDC stops all services on the MDC and logs out all users on the MDC. |
5. Reclaim the LPUs assigned to the MDC.
undo location
CAUTION: Use this command with caution. After you use this command to reclaim an LPU from an MDC, the MDC cannot use this LPU to receive or send packets. Traffic forwarding might be interrupted on the MDC. |
6. Reclaim the physical interfaces assigned to the MDC.
undo allocate interface
CAUTION: Use this command with caution. This command might cause traffic forwarding interruption on the MDC. |
7. Return to system view.
quit
8. Delete the MDC.
undo mdc mdc-name
Display and maintenance commands for MDC
Execute display commands in any view on the default MDC.
Task |
Command |
Display MDCs and their status information. |
display mdc [ name mdc-name ] |
Display the interfaces of MDCs. |
display mdc [ name mdc-name ] interface |
Display the CPU, disk space, and memory space usage of MDCs. |
In standalone mode: display mdc [ name mdc-name ] resource [ cpu | disk | memory ] [ slot slot-number ] In IRF mode: display mdc [ name mdc-name ] resource [ cpu | disk | 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, disk space, and memory space usage of the MDC. |
display mdc resource [ cpu | disk | memory ] [ slot slot-number ] |
MDC configuration examples
Example: Configuring MDCs (in standalone mode)
Network configuration
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 two departments.
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 MDCA for Department B.
[Device] mdc MDCB
It will take some time to create MDC...
MDC created successfully.
[Device-mdc-3-MDCB] quit
# Reclaim the LPU in slot 2 from the default MDC.
[Device] mdc Admin
[Device-mdc-1-Admin] undo location slot 2
The configuration associated with the specified slot of MDC will be lost. Continue? [Y/N]:y
[Device-mdc-1-Admin] quit
# Assign interfaces Ten-GigabitEthernet 2/0/1 through Ten-GigabitEthernet 2/0/24 to MDCA.
[Device] mdc MDCA
[Device-mdc-2-MDCA] allocate interface ten-gigabitethernet 2/0/1 to ten-gigabitethernet 2/0/24
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
# Authorize MDCA to use the LPU in slot 2.
[Device-mdc-2-MDCA] location slot 2
# 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 Ten-GigabitEthernet 2/0/25 through Ten-GigabitEthernet 2/0/48 to MDCB.
[Device] mdc MDCB
[Device-mdc-3-MDCB] allocate interface ten-gigabitethernet 2/0/25 to ten-gigabitethernet 2/0/48
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.
# Authorize MDCB to use the LPU in slot 2.
[Device-mdc-3-MDCB] location slot 2
# 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. Press Ctrl+D as prompted to access the CLI of MDCA.
[Device] switchto mdc MDCA
******************************************************************************
* Copyright (c) 2004-2021 New H3C Technologies 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_C or CTRL_D to break or press CTRL_B to switch back to the default MDC.
Automatic configuration is aborted.
<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-2021 New H3C Technologies 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_C or CTRL_D to break or press CTRL_B to switch back to the default MDC.
Automatic configuration is aborted.
<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-2021 New H3C Technologies Co., Ltd. All rights reserved.*
* Without the owner's prior written consent, *
* no decompiling or reverse-engineering shall be allowed. *
******************************************************************************
<MDCA> display current-configuration
...