Two switch configuration modes to configure Port-based VLAN as an example

Source: Internet
Author: User
Tags cisco switch

The configuration mode of the switch can be broadly divided into two categories: one is the configuration mode represented by the Cisco switch, and the other is the configuration mode represented by Huawei and the H3C switch. In fact, the two configuration modes are not fundamentally different, but the configuration of the command name and configuration of the way there are differences. If you grasp the basic principle of the configuration of the switch, it is not difficult to master, and extrapolate can be extended to other brands of switch configuration. In summary, if you are configuring VLANs on a switch as an example, you can refer to the following basic principles or steps:

    • The switch is initially connected through the management port on the switch. The management port is in various forms, on the switch is the COM port (the other end is also the COM port), on the switch is the RJ45 interface (the other end is the COM port) or both ends are the USB interface (the client needs to drive).
    • After the switch is connected via the HyperTerminal or Putty software on the client, the switch can be configured completely. If you think that the management port is inconvenient, you can set the management IP address of the switch, turn on telnet or Http/https connection, and manage it through the LAN connection switch.
    • The configuration command for a switch has a hierarchy and is a command tree that allows you to drill down through the command layer to configure fine items. Following any command with a question mark, you can get hints and instructions for the subcommands that the command has, which is very useful, so you don't need to memorize the entire command tree. In addition, the command can be abbreviated to the first 3 letters of the complete command.
    • To configure Port-based VLANs as an example, you should typically create VLANs, set VLAN IDs, and then join the network port to the VLAN. In the process, the switch must be queried in advance for the naming rules of the fixed network port, so that the name can enter the network port configuration.

Next, we will connect the switches with these two modes to actually configure each one.

First, connect the switch

Originally can only use HyperTerminal or putty and other terminal software through the management port to connect the switch, HyperTerminal under Windows XP is the system comes with, but later version is not, can be downloaded here, Putty support the use of a variety of ways to connect, Of course also included through the COM port, can be downloaded here. Connect the cable before starting the switch.

1. Using HyperTerminal

HyperTerminal you need to configure the country and area code when initializing, next make a new connection, select COM port, such as configure connection parameters.

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" image_thumb_thumb_thumb_thumb[1] "border=" 0 "alt=" image_thumb_thumb_thumb_thumb[1] "src=" Http://s3.51cto.com/wyfs02/M02/83/20/wKiom1drcnSxF9SgAAAbhZdYA2A622.png "width=" 351 "height=" 409 "/>

Press ENTER after confirmation, the travel command prompt indicates that the connection was successful

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" Image_thumb2_thumb_thumb_thumb "border=" 0 "alt=" image_thumb2_thumb_thumb_thumb "src=" http ://s3.51cto.com/wyfs02/m00/83/20/wkiom1drcnxh-6doaaau-gup1wa131.png "width=" 545 "height=" "/>"

2. Using putty

Run putty, set COM port connection parameters in serial

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" Image_thumb6_thumb "border=" 0 "alt=" image_thumb6_thumb "src=" http://s3.51cto.com/wyfs02/ M00/83/20/wkiom1drcnbctqjlaaasb58xazs426.png "width=" 462 "height=" 363 "/>

Select the Backspace key in Terminal/keyboard to Control-h, otherwise the Backspace key may not be available

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" Image_thumb8_thumb "border=" 0 "alt=" image_thumb8_thumb "src=" http://s3.51cto.com/wyfs02/ M01/83/1f/wkiol1drcnicnimmaaatve0fhbo220.png "width=" 463 "height=" 129 "/>

In session, select the connection type is serial, save session after open, press ENTER to see the command prompt indicating successful connection.

650) this.width=650; "Style=" background-image:none; border-right-0px; padding-left:0px; padding-right:0px; border-top-width:0px; border-bottom-width:0px; border-left-width:0px; padding-top:0px "title=" Image_thumb5_thumb "border=" 0 "alt=" image_thumb5_thumb "src=" http://s3.51cto.com/wyfs02/ M02/83/1f/wkiol1drcnmhulntaaa6bj-lnfs851.png "width=" 461 "height=" 444 "/>

II. configuring VLAN based on port partitioning

In the following example, we discuss the differences between the two modes by configuring a port-based VLAN, and it is important to note that the commands may vary from one product to another by typing in to see the prompts and instructions for the command. Before you do a complex configuration, you should first consult the product's documentation.

1. Configuration mode represented by Cisco switch

With the Cisco switch as the representative of the configuration mode, the more intuitive feeling is that there is a command level, you need to explicitly use the command config to enter the configuration state, exit to view, through the command prompt to know the state changes.

switch#Enableswitch# show interface Status//Show port Status, note the Ports column Flow Link back MdixportTypeDuplex Speed Neg Ctrl State pressureMode........ ............ ......  ..... ........ .... ........... ........ .......G1 1g-copper full+ EnabledOffUp Disabled onG2 1g-copper Full+ EnabledOffUp DisabledOffG3 1g-copper full+ EnabledOffUp DisabledOffSwitch# Config//Enter configuration status switch(config) # hostname sw02//Modify the device name to Sw02sw02(config) # enable password level XXXXXX//Set the login password to xxxxxxsw02(config) # VLAN database//Enter VLAN configuration status sw02(Config-vlan) # VLAN 100//Create VLAN100Sw02 (Config-vlan) # no VLAN 100Delete vlan100sw02(Config-vlan) #Exit//Exit VLAN configuration state sw02(config) # interface Ethernet G1//Enter port configuration status sw02(config-if) #switchport Access VLAN 100//Configuring VLANSW02 for Ports(config-if)Exit//exit port configuration status sw02(config)Exit//exit configuration State sw02#show VLAN//Show VLAN configuration VLAN Name PortsTypeAuthorization-------------------------------------------------------------------------1 1 g (1-16), CH (1-8)Other Required(17-24) Permanent Required

2, with Huawei, H3C switch-based configuration mode

View[Huawei]sysname sw01//Modify the device name to Sw01[sw01]user-interface console0//Enter the console user interface [Sw01-ui-console0]user privilege level15[sw01-ui-console0]authentication-ModePassword[sw01-ui-console0]SetAuthentication Password cipher xxxxxx//Set the login password to xxxxxx[sw01-ui-console0]quit//exiting the console user interface [Sw01]display Interface Ethernet Brief//Show port status, note interface column phy:physical*down:administratively down(l): Loopback(b): BFD Downinuti/oututi:input utility/output utilityinterface PHY auto-neg Duplex Bandwidth inuti oututi TrunkGigabitEthernet0/0/1 up enable full 1000M 0% 0.12%--gigabitethernet0/0/2 up enable full 1000M 0% 0.13%--gigabitethernet0/0/3 up enable full 1000M 0% 0.13%--[sw01]vlan100//Create or enter a VLAN configuration state [Sw01-vlan100]quit//exit VLAN configuration status [sw01] interface gigabitethernet0/0/1//Enter port configuration status [Sw01-gigabitethernet0/0/1] Port link-typeaccess[sw01-gigabitethernet0/0/1] Port default VLAN 100//Configuring Vlan[sw01-gigabitethernet0 for Ports/0/1] Quit//exit port configuration status [Sw01]display VLAN//Show VLAN Configuration The total number of VLANs is:2--------------------------------------------------------------------------------u:up;         D:down;         tg:tagged; ut:untagged;mp:vlan-mapping;    st:vlan-stacking;#: Protocoltransparent-vlan; *: Management-vlan;--------------------------------------------------------------------------------VIDTypePorts--------------------------------------------------------------------------------1 Common UT: GE0/0/1 (U) GE0/0/2 (u) GE0/0/3 (u) GE0/0/4 (u)GE0/0/5 (U) GE0/0/6 (u) GE0/0/7 (u) ge0/0/8 (u)GE0/0/9 (d) GE0/0/10 (U) GE0/0/11 (d) GE0/0/12 (d)GE0/0/13 (d) GE0/0/14 (d) GE0/0/15 (d) ge0/0/16 (d)GE0/0/25 (d) ge0/0/26 (d) ge0/0/27 (d) GE0/0/28 (d) Common UT: GE0/0/17 (U) ge0/0/18 (u) ge0/0/19 (d) ge0/0/20 (d)GE0/0/21 (d) ge0/0/22 (d) ge0/0/23 (d) ge0/0/24 (d)VID Status Property mac-lrn Statistics Description------------------------------------------------------------- -------------------1 Enable default enable disable VLAN 0001100 enable default enable disable VLAN 0100

Two switch configuration modes to configure Port-based VLAN as an example

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.