[All About Switches] 10 Interface Configuration Tip 1 – Batch Configuration Highlighted

Latest reply: Oct 19, 2017 09:19:02 4364 5 2 0

S.png General William was discussing military affairs with other officers and was informed of the arrival of a Huawei switch in the next day. General William was glad about the news and read the switch product manual together with Captain Jack for a whole night. At dawn, General William gives Captain Jack three bags containing three tips for configuring Huawei switches. The three bags are in green, yellow, and red respectively. General William says, "Jack, open these bags when you have difficulty in configuring the switch. I will go to sleep."

Captain David becomes upset immediately after he sees the switch in the morning. He says, "The switch has so many interfaces. The workload in configuring all the interfaces one by one is too heavy."

Captain Jack says, "Don't worry. General William gives me three tips." Captain Jack opens the green bag and finds the first tip: batch configuration improves efficiency. Captain Jack understands the tip and explains it to Captain David.

"David, I know you are a careful person. However, configuring all the interfaces one by one easily causes misconfigurations and requires heavy workload.

[All About Switches] 10 Interface Configuration Tip 1 – Batch Configuration-1323453-2You can enable the port group function to solve this problem. You can add all the Ethernet interfaces to the same port group. After you run a configuration command once in the port group view, the configuration takes effect on all the Ethernet interfaces in the port group, reducing the configuration workload.

You can then easily configure all the interfaces."

"Jack, tell me how to configure the port group."

"OK, let me tell you the configuration details. A port group can be temporary or permanent. To temporarily deliver a configuration to multiple interfaces, you can create a temporary port group. After you deliver configuration and exit from the port group view, the system automatically deletes the temporary port group. To deliver configurations to interfaces multiple times, you can create a permanent port group. After you exit from the port group view, the port group and member interfaces in the group still exist, facilitating subsequent batch configuration for the member interfaces. If the permanent port group is not required, you need to manually delete it. Now let me tell you how to configure a port group."

[All About Switches] 10 Interface Configuration Tip 1 – Batch Configuration-1323453-3"You finally say something useful!"

"The port group configuration is as follows:

l   Configuring a temporary port group

?       Run the system-view command to enter the system view.

?       Run the port-group group-member { interface-type interface-number1 [ to interface-type interface-number2 ] } &<1-10> command or interface range { interface-type interface-number1 [ to interface-type interface-number2 ] } &<1-10> command to create a temporary port group and enter the temporary port group view.

For example, Captain David needs to shut down GE1/0/1 to GE1/0/20 in a batch. Because he needs to perform different configurations on these interfaces later, he cannot add these interfaces to a permanent port group. Therefore, he adds these interfaces to a temporary port group and shuts down the interfaces in a batch.

<HUAWEI> system-view

[HUAWEI] port-group group-member gigabitethernet 1/0/1 to gigabitethernet 1/0/20  // Add GE1/0/1 to GE1/0/20 to a temporary port group.

[HUAWEI-port-group]shutdown // Run the shutdown command in the temporary port group view.

[HUAWEI-port-group] quit  // Exit from the temporary port group view. The system automatically deletes the temporary port group.

[All About Switches] 10 Interface Configuration Tip 1 – Batch Configuration-1323453-4FAQ 1: Are the functions of the port-group group-member and interface range commands the same?

Yes. Both the two commands are used to configure a temporary port group.

l   Configuring a permanent port group

?       Run the system-view command to enter the system view.

?       Run the port-group port-group-name command to create a permanent port group and enter the permanent port group view.

?       Run the group-member { interface-type interface-number1 [ to interface-type interface-number2 ] } &<1-10> command to add Ethernet interfaces to the permanent port group.

Here is another example. Captain David needs to configure GE2/0/1 to GE2/0/10 as access interfaces. Configuration information for the ten interfaces is fixed and the same. Captain David can add the interfaces to a permanent port group.

<HUAWEI> system-view

[HUAWEI] port-group portgroup1  // Create a permanent port group named portgroup1.

[HUAWEI-port-group-portgroup1] group-member gigabitethernet 2/0/1 to gigabitethernet 2/0/10  // Add GE2/0/1 to GE2/0/10 to the permanent port group.

[HUAWEI-port-group-portgroup1] port link-type  access  // Run the command in the permanent port group view.

[HUAWEI-port-group-portgroup1] quit  // Exit from the permanent port group view. The permanent port group portgroup1 still exists.

[All About Switches] 10 Interface Configuration Tip 1 – Batch Configuration-1323453-5FAQ 2: How can I obtain information about member interfaces in a port group?

You can run the display port-group [ all | port-group-name ] command to view information about member interfaces in a permanent port group.

[All About Switches] 10 Interface Configuration Tip 1 – Batch Configuration-1323453-6 Example 1:

Captain David wants to check member interfaces in permanent port group portgroup1. He can run the following command:

<HUAWEI> display  port-group  portgroup1 // Display information about member interfaces in permanent port group portgroup1.

Portgroup: portgroup1

GigabitEthernet2/0/1

GigabitEthernet2/0/2

GigabitEthernet2/0/3

GigabitEthernet2/0/4

GigabitEthernet2/0/5

GigabitEthernet2/0/6

GigabitEthernet2/0/7

GigabitEthernet2/0/8

GigabitEthernet2/0/9

GigabitEthernet2/0/10

[All About Switches] 10 Interface Configuration Tip 1 – Batch Configuration-1323453-7 Example 2:

Captain David forgets names of the configured port groups. How to solve the problem? Don't worry. He can run the display port-group all command to view all configured port groups and their member interfaces on the switch.

<HUAWEI> display  port-group  all  // Display all configured port groups and their member interfaces on the switch.

Portgroup: portgroup1  // Port group portgroup1 and its member interfaces.

GigabitEthernet2/0/1

GigabitEthernet2/0/2

GigabitEthernet2/0/3

GigabitEthernet2/0/4

GigabitEthernet2/0/5

GigabitEthernet2/0/6

GigabitEthernet2/0/7

GigabitEthernet2/0/8

GigabitEthernet2/0/9

GigabitEthernet2/0/10

Portgroup: portgroup2  // Port group portgroup2 and its member interfaces.

GigabitEthernet0/0/40

GigabitEthernet0/0/41

GigabitEthernet0/0/42

GigabitEthernet0/0/43

GigabitEthernet0/0/44

GigabitEthernet0/0/45

GigabitEthernet0/0/46

GigabitEthernet0/0/47

With General William's tip, Captain David easily allocates an interface to each tent and configures relevant functions for the interfaces in batches. To practice batch configuration, Captain David configures multiple commands on an idle interface. "Oh, No! If Captain Jack finds out the configurations, he would laugh at me. What can I do? I have to look up in the product manual and find out how to clear all the configurations on the interface in a batch.

Great! I find it! I only need to run the clear configuration this command in the interface view to clear all the configurations. Problem solved!"

<HUAWEI> system-view

[HUAWEI] interface gigabitethernet 0/0/1

[HUAWEI-GigabitEthernet0/0/1] display this

#

interface GigabitEthernet0/0/1

description abc

port link-type access

#

Return

[HUAWEI-GigabitEthernet0/0/1] clear configuration this // Clear all configurations on an interface to restore the default setting.

Warning: All configurations of the interface will be cleared, and its state will be shutdown. Continue? [Y/N] :y         Info: Total 2 command(s) executed, 2 successful, 0 failed. [HUAWEI-GigabitEthernet0/0/1] display this

#

interface GigabitEthernet0/0/1

shutdown    // The interface is shut down after all the configurations are cleared.

#

return

General William gets up at noon. He praises Captain David for completing the interface configuration for each tent. He also poses another question, "David, the information security of the general's tent is very important. Communication between the general's tent and soldiers' tent is not allowed. Do you know how to configure the switch?" Captain David has no idea. Captain Jack smiles and says, "David, you forget that General William also gives us another tip?"

Captain David laughs, "Give me the second tip quickly."

Do you want to know what happens? See you in the next episode.

Spoiler: The next episode describes interface management tip 2: port isolation. Stay tuned!




★★★Summary★★★ All About Huawei Switch Features and Configurations

This article contains more resources

You need to log in to download or view. No account?Register

x
  • x
  • convention:

m7g
m7g Created Aug 9, 2017 06:49:26
Good, Pls tell me which versions the clear configuration all command runs on? 
user_2790689
Created May 26, 2015 03:13:04 Helpful(0) Helpful(0)

Thank you .
  • x
  • convention:

yaba_mobhe
Created Sep 5, 2016 12:13:23 Helpful(0) Helpful(0)

thank you

  • x
  • convention:

Payman.Gh
Created Jul 26, 2017 04:55:19 Helpful(0) Helpful(0)

thank you
  • x
  • convention:

dm
Created Oct 19, 2017 09:19:02 Helpful(0) Helpful(0)

i also tried the clear configuration this command and it doesn't work...I prefer the undo option...
eg in the interface view...undo port link-type to remove an interface from its previous port link-type
  • x
  • convention:

Reply

Reply
You need to log in to reply to the post Login | Register

Notice Notice: To protect the legitimate rights and interests of you, the community, and third parties, do not release content that may bring legal risks to all parties, including but are not limited to the following:
  • Politically sensitive content
  • Content concerning pornography, gambling, and drug abuse
  • Content that may disclose or infringe upon others ' commercial secrets, intellectual properties, including trade marks, copyrights, and patents, and personal privacy
Do not share your account and password with others. All operations performed using your account will be regarded as your own actions and all consequences arising therefrom will be borne by you. For details, see " Privacy."
If the attachment button is not available, update the Adobe Flash Player to the latest version!
Login and enjoy all the member benefits

Login and enjoy all the member benefits

Login