Vswitch router configuration: Cisco Networking instance

Source: Internet
Author: User
Tags cisco 2950 cisco switch

I. Basic configurations of Cisco 2950 vswitches

 
 
  1. Switch>
  2.  
  3. Switch> enable
  4.  
  5. Switch #
  6.  
  7. Switch # vlan database (entering vlan maintenance mode)
  8.  
  9. Switch (vlan) # vlan 2 name vlan2 name vlan 2 vlan2)
  10.  
  11. Switch (vlan) # vlan 4 name vlan4 name vlan 4 vlan4)
  12.  
  13. Switch (vlan) # exit. Note that exit is valid only when exit is enabled. You cannot exit directly with ctrl + z or end because the configuration cannot take effect !)
  14.  
  15. Switch # show vlan (vlan1 is used by default to view vlan configurations)
  16.  
  17. Switch # configure terminal enters global configuration mode)
  18.  
  19. Switch (config) # interface f0/1 enters the fastethernet0/1 interface Configuration Mode)
  20.  
  21. Switch (config-if) # switchport mode access can be omitted)
  22.  
  23. Switch (config-if) # switchport access vlan 2 divides this interface into vlan2. Remember that there is a space between vlan2)
  24.  
  25. Switch (config-if) # no shutdown (activation port)
  26.  
  27. Switch (config-if) # exit
  28.  
  29. Switch (config) # interface f0/2
  30.  
  31. Switch (config-if) # switchport mode access
  32.  
  33. Switch (config-if) # switchport access vlan 4
  34.  
  35. Switch (config-if) # no shutdown
  36.  
  37. Switch (config-if) # exit
  38.  
  39. Switch (config) # interface f0/3
  40.  
  41. Switch (config-if) # switchport mode trunk sets this port to relay mode)
  42.  
  43. Switch (config-if) # no shutdown
  44.  
  45. Witch (config-if) # exit. You can directly use ctrl + z or end to exit the privileged mode)

2. Configure single-arm routing on vrocisco Cisco 2611)

 
 
  1. Router # configure terminal
  2.  
  3. Router (config) # interface f0/0.1 enters the subinterface Mode)
  4.  
  5. Router (config-subif) # encapsulation dot1q 2 sets the encapsulation type to dot1q, which is owned by Scott. In addition, there are isl encapsulation, depending on the device support is not supported. Number 2 is the vlan number)
  6.  
  7. Router (config-subif) # ip address 192.168.1.1 255.255.0
  8.  
  9. Router (config-subif) # exit
  10.  
  11. Router (config) # interface f0/0.2
  12.  
  13. Router (config-subif) # encapsulation dot1q 4
  14.  
  15. Router (config-subif) # ip address 192.168.3.1 255.255.255.0
  16.  
  17. Router (config-subif) # exit
  18.  
  19. Router (config) # interface f0/0
  20.  
  21. Router (config-if) # no shutdown
  22.  
  23. Router (config-if) # ^ z
  24.  
  25. Router # show running-config
  26.  
  27. Router # copy running-config startup-config

3. Set IP addresses for PC1 and PC2, and then use the ping command to test the IP address!

1. Configure the IP address

To be able to be managed by a network management switch, a management IP address must be identified for it. By default, VLAN 1 of a CISCO switch is a management VLAN, Which is configured with an IP address. Then the switch can be managed. The command is as follows:

A. Go to global mode: Switch # configure terminal

B. Enter VLAN 1 interface mode: Switch (config) # interface vlan 1

C. Configuration Management ip address: Switch (config-if) # ip address [A. B .C.D] [mask]

If the current VLAN is not a management VLAN, you only need to replace the vlan number in the command section B above with the number in the management VLAN.

2. Enable the SNMP protocol

A. Go to global mode: Switch # configure terminal

B. Configure the read-only Community. The default value of the product's read-only Community is public.

Switch (config) # snmp-server community public ro

C. Configure writable Community. The default product writable Community name is private.

Switch (config) # snmp-server community private rw

3. Change the SNMP Community password.

A. Group devices and enable various Supported SNMP versions

 
 
  1. Switch(config)#snmp-server group qycx123 v1  
  2.  
  3. Switch(config)#snmp-server group qycx 123 v2c  
  4.  
  5. Switch(config)#snmp-server group qycx123 v3 noauth 

B. Configure read-only and writable community respectively, for example:

 
 
  1. Switch(config)#snmp-server community qycx123 ro  
  2.  
  3. Switch(config)#snmp-server community qycx123 rw 

4. Save vswitch configurations

Switch # copy run start

If you do not understand common Switch configuration commands, read: Summary of common Cisco switch commands

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.