Basic configurations of Cisco switches

Source: Internet
Author: User

Basic configurations of Cisco switches

One vswitch and two PCs can communicate with each other and allow login to the vswitch terminal.

Command Configuration:

SW1 # vlan database // enter the vlan database

% Warning: It is recommended to configure VLAN from config mode,

As VLAN database mode is being deprecated. Please consult user

Documentation for associating ing VTP/VLAN in config mode.

SW1 (vlan) # vlan 10 // create VLAN10

VLAN 10 added:

Name: VLAN0010

SW1 (vlan) # vlan 20 // create a vlan20 and save it and exit.

VLAN 20 added:

Name: VLAN0020

SW1 (vlan) # exit

APPLY completed.

Exiting ....

SW1 #

SW1 # config terminal

Enter configuration commands, one per line. End with CNTL/Z.

SW1 (config) # enable password 123456 // set the plaintext password

SW1 (config) # line vty 0 4 // enable 5 ports

SW1 (config-line) # password 123456 // set the password

SW1 (config-line) # login // Allow Logon

SW1 (config-line) # exit

SW1 (config) # int f1/1 entry port

SW1 (config-if) # switchport mode access // access mode

SW1 (config-if) # switchport access vlan 10 // vlan10 adds the access Mode

SW1 (config-if) # int f1/2

SW1 (config-if) # switchport mode access

SW1 (config-if) # switchport access vlan 20 // vlan20 adds the access Mode

SW1 (config-if) # exit

SW1 (config) # int vlan 10 // set an IP address for vlan10

SW1 (config-if) # ip address 192.168.10.1 255.255.255.0

SW1 (config-if) # no sh

SW1 (config-if) # int vlan 20

SW1 (config-if) # ip address 192.168.20.1 255.255.255.0

SW1 (config-if) # no sh

SW1 (config-if )#

SW1 # sh ip int br // view the port status

Interface IP-Address OK? Method Status Protocol

FastEthernet0/0 unassigned YES unset administratively down

FastEthernet0/1 unassigned YES unset administratively down

FastEthernet1/0 unassigned YES unset up down

FastEthernet1/1 unassigned YES unset up

FastEthernet1/2 unassigned YES unset up

FastEthernet1/3 unassigned YES unset up down

FastEthernet1/4 unassigned YES unset up down

FastEthernet1/5 unassigned YES unset up down

FastEthernet1/6 unassigned YES unset up down

FastEthernet1/7 unassigned YES unset up down

FastEthernet1/8 unassigned YES unset up down

FastEthernet1/9 unassigned YES unset up down

FastEthernet1/10 unassigned YES unset up down

FastEthernet1/11 unassigned YES unset up down

FastEthernet1/12 unassigned YES unset up down

FastEthernet1/13 unassigned YES unset up down

FastEthernet1/14 unassigned YES unset up down

FastEthernet1/15 unassigned YES unset up down

Vlan1 unassigned YES unset up down

Vlan10 192.168.10.1 YES manual up

Vlan20 192.168.20.1 YES manual up

SW1 #

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.