Layer-3 switching Configuration

Source: Internet
Author: User

Basic Configuration

S> enable enters privileged Mode
S # configure terminal enters global configuration mode
S (config) # change the vswitch name by hostname
S (config) # enable password level _ # password set user password (level _ # = 1) or privileged password (level _ # = 15)
S (config) # line console 0 go to the console interface
S (config-line) # password lele_password to set the Console password
S (config) # line vty 0 15 enter the virtual terminal
S (config-line) # password telnet_password to set the Telnet password
S (config-line) # login allows Telnet Logon
S (config) # enable password | secret privilege_password configure the privileged password (encrypted or unencrypted)
S (config) # interface ethernet | fastethernet | gigabitethernet slot _ #/port _ # enter the interface sub-Configuration Mode
S (config-if) # [no] shutdown to disable or enable this interface (enabled by default)
S (config) # ip address IP_address sunbet_mask specifies the ip address
S (config) # ip default-gateway router's _ IP_address specifies which router address is the default gateway
S # show running-config view current configuration
S # copy running-config startup-config Save the current configuration in RAM to NVRAM
S> show interface [type slot _ #/port _ #] view information of all or specified Interfaces
S> show ip: displays the IP configuration of the vswitch (available only on the 1900 Series)
S> show version to view device information
S # show ip interface brief verify IP configuration
S (config-if) # speed 10 | 100 | auto sets the interface Rate
S (config-if) # duplex auto | full | half sets the interface duplex mode
S> show mac-address-table view CAM table
S # clear mac-address-table clear dynamic entries in the CAM table
1900 (config) # mac-address-table permanent MAC_address type [slot _ #/] port _ # create static entries in the CAM table
2950 (config) # mac-address-table static MAC_address vlan _ # interface type [slot _ #/] port _ # create static entries in the CAM table
1900 (config) # mac-address-table restricted static MAC_address source_port list_of_allowed_interface
1900 (config-if) # port secure enable sticky Learning
1900 (config-if) # port secure max-mac-count value sets the number of addresses learned by the viscous learning feature (the default value is 132, and the value range is 1-132)
1900 (config) # address-violation suspend | ignore | disable changes Security Options
1900> show mac-address-table security verify port security measures
2950 (config) # switchport mode access defines the interface as a host port rather than a relay Port
2950 (config) # switchport port-security port enabling security measures
2950 (config) # switchport port-security maximum value specifies the maximum number of devices that can be associated with this interface
2950 (config) # switchport port-security violation protect | restrict | shutdown specifies what should happen when a security violation occurs
2950 (config) # switchport port-security mac-address MAC_address specifies the exact MAC address related to this interface
2950 (config) # switchport port-security mac-address sticky enable sticky
2950 (config) # show port interface type [slot _ #/] port _ # verify interface configuration
2950 (config-if) description name sets the Interface description
2950 # show buffers
1900 # copy nvram tftp: // IP_address_of_TFTP_server/file_name back up the configuration file to the TFTP Server
1900 # copy tftp: // IP_address_of_TFTP_server/file_name nvram resume configuration from the TFTP server to NVRAM
1900 # delete nvram delete a configuration file
2950 # erase startup-config Delete the configuration file
3550 # show tcam qos TCAM_ID statistics view TCAM remaining capacity
4000> enable enters privileged Mode
4000> (enable) set password set user mode password
4000> (enable) set enablepass to set the authorization password
4000> (enable) set interface sc0 IP_address mask configure IP Address
4000> (enable) set port enable | disable slot _ #/port _ # enable/disable the interface
4000> (enable) show port [slot _ #/port _ #] display interface information
4000> (enable) set port name slot _ #/port _ # name sets vswitch Interface Description
4000> (enable) set port speed slot _ #/port _ #4 | 10 | 16 | 100 | auto sets the switch interface Rate
4000> (enable) set port duplex slot _ #/port _ # full | half sets the switch interface duplex mode
4000> (enable) clear config all Delete configuration information in NVRAM
4000> (enable) erase all Delete content in FLASH
4000> (enable) show flash display FLASH Content
4000> (enable) show cam [count] dynamic | static | permanent | system [vlan _ #] display CAM table
VLAN 1900 (config) # vtp domain VTP_domain_name defines the switch domain Name
1900 (config) # vtp server | client | transparent defines VTP mode of the switch (Default server)
1900 (config) # vtp password VTP_password configure VTP password
1900 (config) # vtp pruning enable | disable enable/disable trim (enabled by default)
1900 (config) # enable SNMP trap in vtp trap enable (enabled by default)
1900 # show vtp verify VTP Configuration
2950 # vtp database access VLAN and VTP configuration (both used before IOS12.1 and in global configuration mode after 12.1)
2950 (vlan) # vtp domain VTP_domain_name defines the switch domain Name
2950 (vlan) # vtp server | client | transparent defines VTP mode of the switch (Default server)
2950 (vlan) # vtp password VTP_password configure VTP password
2950 (vlan) # enable/disable trim in vtp pruning (enabled by default)
2950 (config) # snmp-server enable traps vtp enable SNMP Trap (enabled by default)
2950 # show vtp status check VTP Configuration
2950 # show vtp counters displays VTP statistics related to VTP message sending and receiving
1900 (config-if) # trunk on | off | desirable | auto specifies the Relay Type
1900 # show trunk A | B verification interface Relay (A is fa0/26, B is fa0/27)
2950 (config-if) # switchport mode trunk | dynamic desirable | dynamic auto | nonegotiate specifies the relay type (Automatic negotiation by default)
2950 (config-if) # switchport trunk native | allowed | pruning vlan VLAN _ # configure Relay
2950 (config-if) # switchport trunk pruning vlan remove VLAN _ # Clear VLANs that do not want to be downgraded
2950 # show interfaces [type 0/port _ #] switchport | trunk verification interface Relay
1900 (config) # vlan _ # [name VLAN_name] Create a VLAN
1900 (config-if) # vlan-membership static VLAN _ # statically allocate this interface to a VLAN
1900 # show vlan verification VLAN
1900 # show vlan-membership view VLAN membership
1900 # show spantree [VLAN _ #] view STP information of a VLAN
2950 # access the vlan database (used before ISO12.1)
2950 (vlan) # vlan _ # [name VLAN_name] Create a VLAN
2950 (config) # vlan _ # access the VLAN database (used after ISO12.1)
2950 (config-vlan) # name VLAN_name create VLAN
2950 (config-if) # switchport mode access specifies that the connection is an access link connection.
2950 (config-if) # switchport access vlan _ # specify VLAN as access link connection
4000> (enable) set vlan VLAN _ # name VLAN_name configure VLAN
4000> (enable) set vlan _ # slot _ #/port _ #-port _ # assign a port to a VLAN
4000> (enable) set trunk slot _ #/port _ # [on | off | desirable | auto | nonegotiate] [VLAN _ #] [isl | dot1q | dot10 | lane | negotiate] configure Relay
4000> (enable) clear trunk slot _ #/port _ # VLAN _ # delete a VLAN
4000> (enable) show trunk slot _ #/port _ # verify the relay port
4000> (enable) set vtp v2 enable configuration VTPv2
4000> (enable) set vtp [domain name] [mode client | server | transparent] [passwd password] [pruning enable | disable] [v2 enable | disable] set VTP
4000> (enable) show vtp domain verify VTP domain Information
4000> (enable) show vtp statistics displays the summary of VTP announcement messages sent or received
4000> (enable) set vtp pruneeligble VLAN _ # set VTP reduction
4000> (enable) clear vtp pruneeligble VLAN _ # clear VLANs that do not want to be downgraded

STP 4000> (enable) set spantree enable | disable VLAN _ # enable/disable STP (enabled by default)
2950 (config) # [no] spanning-tree vlan _ # enable/disable STP (enabled by default)
4000> (enable) show spantree [VLAN _ #] verify stp status
2950 # show spanning-tree verify STP status
4000> (enable) set spantree root [secondary] VLAN _ # [dia network_diameter] [hello hello_time] set the number of master root node bridges, backup node bridges, and Max bridges (2-7), duration (1-10, default 2)
4000> (enable) set spantree portcost slot _ #/port _ # cost _ # set port overhead
2950 (config-if) # spanning-tree cost _ # Set port overhead
4000> (enable) set spantree portpri slot _ #/port _ # priority _ # set port priority
4000> (enable) set spantree portvlanpri slot _ #/port _ # priority _ # [VLAN _ #] Change VLAN priority settings
2950 (config-if) # spanning-tree vlan _ # port-priority _ # Set port priority
4000> (enable) set spantree fwddelay delay _ # [VLAN _ #] sets the interval from the listening status to the learning status and then to the forwarding status (15 seconds by default, the value range is 4-30 seconds)
4000> (enable) set spantree hello interval_time [VLAN _ #] to set the time interval for the Root Node switch to send BPDU (2 seconds by default, value range: 1-10 seconds)
4000> (enable) set spantree maxage agingtime [VLAN _ #] to set the time for the switch to hold BPDU (default: 20 seconds, value range: 6-40 seconds)
2950 (config) # spanning-tree vlan _ # forward-time forward_time sets the interval from the listening status to the learning status and then to the forwarding status (15 seconds by default, the value range is 4-30 seconds)
2950 (config) # spanning-tree vlan _ # hello-time hello_time sets the time interval for the Root Node switch to send BPDU (2 seconds by default, with a value range of 1 to 10 seconds)
2950 (config) # spanning-tree vlan _ # max-age maxage sets the time for the switch to hold BPDU (default: 20 seconds, value range: 6-40 seconds)
4000> (enable) set port channel slot _ #/port _ # on creates an Ethernet channel set
4000> (enable) show port capabilities slot _ #/port _ # view port configurations
4000> (enable) show port channel verifies the configuration of the Ethernet channel set
2950 (config-if) # channel-group group_number mode auto | desirable | on
2950 # show etherchannel group_number | brief | detail | load-balance | port-channel | summary verifies the configuration of the etherchannel set
4000> (enable) set spantree portfast slot _ #/port _ # enable to configure PortFast
2950 (config-if) # spanning-tree portfast configure PortFast
4000> (enable) set spantree uplinkfast enable | disable [rate station_update_rate] [all-protocols off | on] enable/disable UplinkFast
4000> (enable) show spantree uplinkfast verify UplinkFast Configuration
2950 (config) # spanning-tree uplinkfast [max_update_rate] enable/disable UplinkFast
2950 # show spanning-tree uplinkfast verify UplinkFast Configuration
4000> (enable) set spantree backbonefast enable | disable enable/disable BackboneFast
4000> (enable) show spantree backbonefast verify the BackboneFast Configuration
2950 (config) # spanning-tree backbonefast enabling BackboneFast

Inter-network routing
2600 (config) # interface type slot _ #/port _ #. subint_number configure Sub-interface
2600 (config-subif) # encapsulation dot1q | isl | sde | tr-isl VLAN _ # configure encapsulation type
4000> (enable) show module
4000> (enable) session module _ # access L3SM
L3SM (config-if) # mac-address mac_address allocates MAC addresses
MLS 2600 (config) # mls rp ip start MLS
2600 (config-if) # mls rp vtp-domain domain_name assign vro interface to VTP domain
2600 (config-if) # mls rp vlan-id VLAN _ # assign VLAN to the interface
2600 (config-if) # mls rp management-interface specifies this interface as a management interface
2600 # show mls rp provides global MLS Information
2600 # show mls rp interface type slot _ #/port _ # provide MLS information for the specified interface
2600 # show mls rp vtp-domain domain_name provides MLS information for VTP Domains
6500> (enable) set mls enable to start MLS on the MLS-SE
6500> (enable) set mls include rp_ip_address tell the vswitch which IP address is correct
6500> (enable) show mls include display the IP address list of the external Route Processor
6500> (enable) set mls flow [destination | destination-source | full] Tell the MLS switch which information to cache the candidate data packet
6500> (enable) show mls entry displays the layer-3 cache table
6500> (enable) set mls agingtime aging_time changes the cache aging time (256 seconds by default, the value range is 8 times the value of 8 in 8-seconds)
6500> (enable) set mls agingtime fast fast_aging_time pkt_threshold change the fast aging cycle and packet threshold
6500> (enable) show mls ip verify the configuration of the MLS-SE
6500> (enable) clear mls entry [destination IP_address] [source IP_address] [flow protocol] [source_port] [destination_port] [all] Delete all or specified MLS cache records
3550 (config) # ip routing start IP routing
3550 (config) # ip cef starts CEF
3550 (config-if) # no switchport converts the second-layer interface to the Third-layer interface
3550 (config-if) # ip route-cache cef start CEF on the Interface
3550 # verify cef with show ip CEF

Multicast
3640 (config) # ip multicast-routing
3640 (config-if) # ip pim dense-mode: Set the interface to PIM intensive mode
3640 (config-if) # ip pim sparse-mode: Set the interface to PIM sparse mode
3640 (config-if) # ip pim sparsed-dense-mode: Set the interface to PIM sparse-intensive mode
3640 (config) # ip pim rp-address IP_address group_ACL _ # [override] manual RP Configuration
3640 (config) # ip pim send-rp-announce type slot _ #/port _ # scope ttl_value group-list ACL _ # advertise RP group allocation
3640 (config) # ip pim send-rp-discovery scope ttl_value configure the RP ing proxy
3640 (config-if) # Set the ttl threshold value for ip multicast TTL-threshold ttl_value
3640 (config-if) # Add ip igmp join-group group_address to multicast group
3640 # show ip mroute view multicast Information
3640 # ping to verify connections between RP and other multicast routers
3640 # mtrace source_IP_address [destination_IP_address] [group] multicast traceroute
3640 (config-if) # ip cgmp configuration CGMP Router
4000> (enable) set cgmp enable to start CGMP
4000> (enable) show cgmp statistics view CGMP statistics
4000> (enable) show multicast group cgmp
4000> (enable) set cgmp leave enable to check IGMPv2 exit information generated by the client
4000> (enable) set igmp enable to start IGMP
4000> (enable) ip igmp snooping
4000> (enable) set igmp fastleave enable to start the quick exit process
4000> (enable) show igmp statistics display IGMP listening status information on the switch
QoS 2950 (config) # wrr-queue cos-map queue_ID cos_value create a queue
2950 (config) # wrr-queue bandwidth bandwidth_value set the queue threshold
2950 (config) # class-maps name defines matching criteria for information transmission classification
2950 (config-cmap) # match access-group ACL _ # Identify classified information transmission
2950 (config) # policy-map name is determined as the classification standard set for Access Information Transmission
2950 (config-pmap) # class name
2950 (config-pmap-c) # set ip dscp number
2950 (config-if) # service-policy input name applies policies to this interface
3550 (config) # mls qos start QoS
3550 (config-if) # auto qos voip starts automatic service quality on the Interface
3550 (config) # priority-list priority_queue _ # protocol high | medium | normal | low [list ACL _ #] defines information flows for priority Queues
3550 (config) # priority-list priority_queue _ # queue-limit _ # define the maximum queue space for a specific priority queue
3550 (config-if) # priority-group priority_queue _ # assign a priority queue to a specific output interface
3550 (config) # queue-list queue_list _ # interface type slot _ #/port _ # queue_number defines the information flow for a specific custom queue
3550 (config) # queue-list queue_list _ # queue queue_number byte-count size_in_bytes [limit number_of_queue] defines the maximum space of a queue for a specific custom queue
3550 (config-if) # custom-queue-list custom_queue_number assigns priority queues for specific output Interfaces
4840 (config) # ip Server Load balancer serverfarm serverfarm_name configure Server Load balancer Redundancy
4840 (config-slb-sfarm) # real IP_address [port _ #] specifies the virtual IP Address
4840 (config-slb-sfarm) # inservice starts the server
4840 (config) # virtual IP_address [network_mask] tcp | udp [port_number | wsp-wtp | wsp-wtls | wsp-wtp-wtls] [service service_name] create a virtual server IP Address

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.