ArtsAutosBooksBusinessEducationEntertainmentFamilyFashionFoodGamesGenderHealthHolidaysHomeHubPagesPersonal FinancePetsPoliticsReligionSportsTechnologyTravel

Basic Cisco Switch Configuration Commands

Updated on April 19, 2020

Basic Cisco Switch Configuration Commands

First of all, we can say that Cisco switches are the best because they possess many features such as,

  • Versatile
  • flexible
  • reliable
  • powerful
  • Parallel Performance by Cisco switch product line.

Now we are going to learn about the Cisco switch. We can say that it is a simpler network device when comparing with other devices(examples include firewalls and routers). The configuration of a Cisco Catalyst Switch may be a difficult thing for some users.

To enable features such as security, management, and some other important features, the Cisco switch needs some basic initial configuration. But other lower-class switch vendors don’t need this initial configuration, unlike the Cisco Switches.

Steps for the Cisco Switch configuration and setup :

Step 1: The very first step is to connect to the device through the console.

Here we use a terminal emulation software then the switch’s console is get connected. Now we get a command prompt. Now we type “enable” and then press the enter key. When typing this keyword, we will get into privileged EXEC mode. By typing “configure terminal” in the next line of the command prompt, we enter into a global configuration.

Step 2: We have to provide a particular hostname for each one to distinguish them in the network. This is done by using the following commands:

Hostname access-switch1

Step 3: Create a secret administration password. This password can be created by using the following command:

enable secret somestrongpass

We can enter into the Privileged EXEC mode as we already told in step 1 by using this password.

Step 4: After creating the administration password, we have to create a password for the telnet and console access.

For security purposes, it is a good thing to lock-down all access lines of a switch with a password. Configuring an external AAA server is also used for security reasons. Each access lines( in this example, VTY lines for telnet and console line) can be configured with the password by the following commands:

Configuring password for VTY lines:

#line vty 0 15

#password strongtelnetpass

#login

#exit

Configuring password for console line:

# line console 0

#password strongconsolepass

# login

# exit

Step 5: Now we are going to define the IP addresses which are allowed to access the switch through the Telnet.

This can be done by using the following lines commands:

# ip access-list standard TELNET-ACCESS

# permit 10.1.1.100

# permit 10.1.1.101

# exit

# line vty 0 15

# line vty 0 15

# exit

Step 6: Now, for switch management, we assign the IP address to the switch.

By default, the management IP is assigned to VLAN 1. This IP address assigning can be done by using the following commands:

# interface vlan 1

# ip address 10.1.1.200 255.255.255.0

# exit

Step 7: The seventh step is to assign the default gateway to the switch. The default gateway can be assigned by the following code:

# ip default-gateway 10.1.1.254

Step 8: Then we need to disable all the unneeded ports that occurred on the switch.

This step is not mandatory(that is, this step is optional), but this can be used for enhancing security. Consider an example, we have a 48-port switch, but we only need first 24 ports and the remaining ports, that is, port 25-48 are not needed, then it can be disabled by using the following commands:

# interface range fe 0/25-48

# shutdown

# exit

Step 9: In ninth step Layer 2 VLANs are configured and assign ports to each of them.

All the physical ports of the switch belong to VLAN 1, by default. The network can be segmented into multiple Layer 2 VLANs by the use of Ethernet Switch. For this segmentation followings, things need to perform

  • We have to create additional VLANs from the default VLAN 1
  • Assign physical ports to these new VLANs.

Consider an example, We are going to create two new VLANs namely VLAN2 and VLAN3, and then assign ports for each of them,

Creating the Layer 2 VLAN

# vlan 2

# name TEACHERS

# exit

# vlan 3

# name STUDENTS

# exit

Assigning ports: Ports 1-2 are assigned for VLAN 2 and ports 3-4 are assigned for VLAN 3

For VLAN 2,

# interface range fe 0/1-2

# switchport mode access

# switchport access vlan 2

# exit

For VLAN 2,

# interface range fe 0/3-4

# switchport mode access

# switchport access vlan 3

# exit

Step 10: The last and final step is to save the configuration.

This is done by the following command:

# exit

# wr




Some “Show” commands



  • show run – Display current running configuration
  • show interfaces –Display the configuration of all interface and their status
  • show VLAN – Display all VLAN numbers, ports, names, etc
  • show interface status - Display status of the interface, duplex, etc
  • show mac - address-table- Display current MAC address table.

Comments

    0 of 8192 characters used
    Post Comment

    No comments yet.

    working

    This website uses cookies

    As a user in the EEA, your approval is needed on a few things. To provide a better website experience, hubpages.com uses cookies (and other similar technologies) and may collect, process, and share personal data. Please choose which areas of our service you consent to our doing so.

    For more information on managing or withdrawing consents and how we handle data, visit our Privacy Policy at: https://maven.io/company/pages/privacy

    Show Details
    Necessary
    HubPages Device IDThis is used to identify particular browsers or devices when the access the service, and is used for security reasons.
    LoginThis is necessary to sign in to the HubPages Service.
    Google RecaptchaThis is used to prevent bots and spam. (Privacy Policy)
    AkismetThis is used to detect comment spam. (Privacy Policy)
    HubPages Google AnalyticsThis is used to provide data on traffic to our website, all personally identifyable data is anonymized. (Privacy Policy)
    HubPages Traffic PixelThis is used to collect data on traffic to articles and other pages on our site. Unless you are signed in to a HubPages account, all personally identifiable information is anonymized.
    Amazon Web ServicesThis is a cloud services platform that we used to host our service. (Privacy Policy)
    CloudflareThis is a cloud CDN service that we use to efficiently deliver files required for our service to operate such as javascript, cascading style sheets, images, and videos. (Privacy Policy)
    Google Hosted LibrariesJavascript software libraries such as jQuery are loaded at endpoints on the googleapis.com or gstatic.com domains, for performance and efficiency reasons. (Privacy Policy)
    Features
    Google Custom SearchThis is feature allows you to search the site. (Privacy Policy)
    Google MapsSome articles have Google Maps embedded in them. (Privacy Policy)
    Google ChartsThis is used to display charts and graphs on articles and the author center. (Privacy Policy)
    Google AdSense Host APIThis service allows you to sign up for or associate a Google AdSense account with HubPages, so that you can earn money from ads on your articles. No data is shared unless you engage with this feature. (Privacy Policy)
    Google YouTubeSome articles have YouTube videos embedded in them. (Privacy Policy)
    VimeoSome articles have Vimeo videos embedded in them. (Privacy Policy)
    PaypalThis is used for a registered author who enrolls in the HubPages Earnings program and requests to be paid via PayPal. No data is shared with Paypal unless you engage with this feature. (Privacy Policy)
    Facebook LoginYou can use this to streamline signing up for, or signing in to your Hubpages account. No data is shared with Facebook unless you engage with this feature. (Privacy Policy)
    MavenThis supports the Maven widget and search functionality. (Privacy Policy)
    Marketing
    Google AdSenseThis is an ad network. (Privacy Policy)
    Google DoubleClickGoogle provides ad serving technology and runs an ad network. (Privacy Policy)
    Index ExchangeThis is an ad network. (Privacy Policy)
    SovrnThis is an ad network. (Privacy Policy)
    Facebook AdsThis is an ad network. (Privacy Policy)
    Amazon Unified Ad MarketplaceThis is an ad network. (Privacy Policy)
    AppNexusThis is an ad network. (Privacy Policy)
    OpenxThis is an ad network. (Privacy Policy)
    Rubicon ProjectThis is an ad network. (Privacy Policy)
    TripleLiftThis is an ad network. (Privacy Policy)
    Say MediaWe partner with Say Media to deliver ad campaigns on our sites. (Privacy Policy)
    Remarketing PixelsWe may use remarketing pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to advertise the HubPages Service to people that have visited our sites.
    Conversion Tracking PixelsWe may use conversion tracking pixels from advertising networks such as Google AdWords, Bing Ads, and Facebook in order to identify when an advertisement has successfully resulted in the desired action, such as signing up for the HubPages Service or publishing an article on the HubPages Service.
    Statistics
    Author Google AnalyticsThis is used to provide traffic data and reports to the authors of articles on the HubPages Service. (Privacy Policy)
    ComscoreComScore is a media measurement and analytics company providing marketing data and analytics to enterprises, media and advertising agencies, and publishers. Non-consent will result in ComScore only processing obfuscated personal data. (Privacy Policy)
    Amazon Tracking PixelSome articles display amazon products as part of the Amazon Affiliate program, this pixel provides traffic statistics for those products (Privacy Policy)
    ClickscoThis is a data management platform studying reader behavior (Privacy Policy)