Basic Commands for Switch on the interface level (2024)

Today I will be sharing some basic command which we can implement on the switch.

Let's say we have a switch and first we want to change the hostname of the switch from "Switch to TEST", then below is a command which we can use to change the hostname of the switch.

Go into the config mode :

Switch#config t

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

Switch(config)#hostname TEST

TEST(config)#

Now we can see that the name of the switch is a TEST.

Let's verify the interfaces of the switch and its status.

TEST#show ip interface brief

InterfaceIP-AddressOK? Method StatusProtocol

FastEthernet1unassignedYES unsetupup

TenGigabitEthernet1/1unassignedYES unsetdowndown

TenGigabitEthernet1/21 unassignedYES unsetdowndown

TenGigabitEthernet1/28 unassignedYES unsetdowndown

TenGigabitEthernet1/29 unassignedYES unsetupup

TenGigabitEthernet1/30 unassignedYES unsetdowndown

TenGigabitEthernet1/31 unassignedYES unsetupup

TenGigabitEthernet1/32 unassignedYES unsetupup

Vlan1unassignedYES unsetupup

Above we can see the interface as well as vlan along with the status. If we want to check the status of one particular interface then we can use the below-given command

TEST#show ip interface FastEthernet1 (where FastEthernet is nothing but my interface)

FastEthernet1 is up, line protocol is up

Internet protocol processing disabled.

WE CAN SEE THAT THE INTERNET PROTOCOL IS DISABLE, BECAUSE WE HAVE NOT to ASSIGN ANY IP ADDRESS TO THE INTERFACE TILL NOW.

TEST#show running-config interface fastEthernet1

Building configuration...

Current configuration : 95 bytes

!

interface FastEthernet1

vrf forwarding mgmtVrf

no ip address

speed auto

duplex auto

End

Now I would like to see whether the interfacefastEthernet1 is Layer 2 or Layer 3.

TEST#show interfaces fastEthernet1 switchport

% Fa1 is not a switchable port

From the above output, we can see that it is showing "% Fa1 is not a switchable port", it means no switch port. Now let's understand the difference between the switch port and no switchport.

"noswitchport" enabled L3 features on the port, you can give it an IP address, perform ip routing etc, which is usually seen on a Layer 3 switch."no switchport" changes the port from being a Layer 2 interface to a layer 3 interface. So a port with "no switchport" is not a member of any vlan, it is as you say a routed port and you can then configure an IP address on it.It changes the port from being a Layer 2 interface to a layer 3 interface.
On the other hand, The switch portis used to set port operation mode for VLAN access or trunking mode. A switch port can be in one of two modes:accessandtrunk.

Let's assign the IP address on the inteface fastEthernet1, we have already verified above that this is a layer3 interface.

TEST(config)#interface fastEthernet1

TEST(config-if)#ip address 10.197.218.244 255.255.255.248

I am assigning the IP address along with the subnet mask.

TEST(config-if)#no shutdown (to make the interface up)

TEST(config-if)#do wr mem (saving the config)

Building configuration...

Compressed configuration from 2205 bytes to 1098 bytes[OK]

Now let's verify the interface fastEthernet1 which we have configured just now.

TEST#show ip interface fastEthernet1

FastEthernet1 is up, line protocol is up

Internet address is 10.197.218.244/29

Broadcast address is 255.255.255.255

Address determined by setup command

MTU is 1500 bytes

Helper address is not set

Directed broadcast forwarding is disabled

Outgoing access list is not set

Inboundaccess list is not set

Proxy ARP is enabled

Local Proxy ARP is disabled

Security level is default

Split horizon is enabled

ICMP redirects are always sent

ICMP unreachables are always sent

ICMP mask replies are never sent

IP fast switching is enabled

IP Flow switching is disabled

IP CEF switching is enabled

IP CEF switching turbo vector

IP Null turbo vector

VPN Routing/Forwarding "mgmtVrf"

IP multicast fast switching is enabled

IP multicast distributed fast switching is disabled

IP route-cache flags are Fast, CEF

Router Discovery is disabled

IP output packet accounting is disabled

IP access violation accounting is disabled

TCP/IP header compression is disabled

RTP/IP header compression is disabled

Probe proxy name replies are disabled

Policy routing is disabled

Network address translation is disabled

BGP Policy Mapping is disabled

Input features: MCI Check

IPv4 WCCP Redirect outbound is disabled

IPv4 WCCP Redirect inbound is disabled

IPv4 WCCP Redirect exclude is disabled

Now let's check the other interface TenGigabitEthernet1

TEST#show interfaces TenGigabitEthernet1/31 switchport

Name: Te1/31

Switchport: Enabled

We can see that the switch port is enabled that means this is a layer 2 interface, let's try to assign an IP address to this and see what will be the outcome for it

TEST(config-if)#interface TenGigabitEthernet1/31

TEST(config-if)#ip address ?

% Unrecognized command

We can see from the above output it is showing "% Unrecognized command", beacuse it is layer 2 interface and we can not assign the IP address to it. If you want to assign the IP address to it, then follow the below command:

GO into the config mode, then in the interface :

TEST(config)#interface TenGigabitEthernet1/31

TEST(config-if)#no switchport (I am using this command "no switchport" to convert the interface from layer 2 to layer 3)

TEST(config-if)#ip add

TEST(config-if)#ip address 10.1.1.10 255.255.255.0

TEST(config-if)#do wr mem

Building configuration...

Compressed configuration from 2256 bytes to 1125 bytes[OK]

Now we can see from the above output that after converting the interface into the layer 3 interface we are able to assign the IP address.

In my next article, I would be talking about the other basic command related to the switch.

Happy Weekend!!!!!

Basic Commands for Switch on the interface level (2024)
Top Articles
14 Ways to Make Time Go by Faster - wikiHow
WHAT IS A TOOLKIT?
Great Clips Mount Airy Nc
Garrison Blacksmith Bench
5 Bijwerkingen van zwemmen in een zwembad met te veel chloor - Bereik uw gezondheidsdoelen met praktische hulpmiddelen voor eten en fitness, deskundige bronnen en een betrokken gemeenschap.
Think Of As Similar Crossword
More Apt To Complain Crossword
Tribune Seymour
Es.cvs.com/Otchs/Devoted
Truck Toppers For Sale Craigslist
Shreveport Active 911
Suffix With Pent Crossword Clue
Vanessawest.tripod.com Bundy
Golden Abyss - Chapter 5 - Lunar_Angel
Effingham Bookings Florence Sc
Morristown Daily Record Obituary
Walmart Car Department Phone Number
Hewn New Bedford
Raw Manga 1000
When Does Subway Open And Close
Danielle Ranslow Obituary
Koninklijk Theater Tuschinski
BJ 이름 찾는다 꼭 도와줘라 | 짤방 | 일베저장소
The 15 Best Sites to Watch Movies for Free (Legally!)
Water Temperature Robert Moses
Miles City Montana Craigslist
Spectrum Outage in Queens, New York
Intel K vs KF vs F CPUs: What's the Difference?
Craigslist Brandon Vt
Shiny Flower Belinda
Cinema | Düsseldorfer Filmkunstkinos
Rainfall Map Oklahoma
Rush County Busted Newspaper
APUSH Unit 6 Practice DBQ Prompt Answers & Feedback | AP US History Class Notes | Fiveable
Duke Energy Anderson Operations Center
Wisconsin Volleyball Team Leaked Uncovered
Roch Hodech Nissan 2023
Federal Student Aid
Colorado Parks And Wildlife Reissue List
Vanessa West Tripod Jeffrey Dahmer
#1 | Rottweiler Puppies For Sale In New York | Uptown
The Vélodrome d'Hiver (Vél d'Hiv) Roundup
Lcwc 911 Live Incident List Live Status
Unblocked Games Gun Games
Ghareeb Nawaz Texas Menu
Expendables 4 Showtimes Near Malco Tupelo Commons Cinema Grill
Vérificateur De Billet Loto-Québec
Keci News
How to Find Mugshots: 11 Steps (with Pictures) - wikiHow
Pilot Travel Center Portersville Photos
Peugeot-dealer Hedin Automotive: alles onder één dak | Hedin
Immobiliare di Felice| Appartamento | Appartamento in vendita Porto San
Latest Posts
Article information

Author: Jamar Nader

Last Updated:

Views: 5292

Rating: 4.4 / 5 (55 voted)

Reviews: 94% of readers found this page helpful

Author information

Name: Jamar Nader

Birthday: 1995-02-28

Address: Apt. 536 6162 Reichel Greens, Port Zackaryside, CT 22682-9804

Phone: +9958384818317

Job: IT Representative

Hobby: Scrapbooking, Hiking, Hunting, Kite flying, Blacksmithing, Video gaming, Foraging

Introduction: My name is Jamar Nader, I am a fine, shiny, colorful, bright, nice, perfect, curious person who loves writing and wants to share my knowledge and understanding with you.