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
Do you have to pay back leverage forex
If your Host asks you to cancel
Minooka Channahon Patch
Gomoviesmalayalam
Dew Acuity
25X11X10 Atv Tires Tractor Supply
Caroline Cps.powerschool.com
Is Csl Plasma Open On 4Th Of July
Mr Tire Rockland Maine
Progressbook Brunswick
Milk And Mocha GIFs | GIFDB.com
U.S. Nuclear Weapons Complex: Y-12 and Oak Ridge National Laboratory…
Erin Kate Dolan Twitter
Winterset Rants And Raves
Local Dog Boarding Kennels Near Me
Nhl Wikia
Sound Of Freedom Showtimes Near Cinelux Almaden Cafe & Lounge
R Cwbt
Obsidian Guard's Cutlass
Missouri Highway Patrol Crash
Self-Service ATMs: Accessibility, Limits, & Features
Homeaccess.stopandshop
Walmart Near South Lake Tahoe Ca
Great Clips Grandview Station Marion Reviews
Celina Powell Lil Meech Video: A Controversial Encounter Shakes Social Media - Video Reddit Trend
Times Narcos Lied To You About What Really Happened - Grunge
Summoners War Update Notes
Valley Craigslist
How often should you visit your Barber?
Devotion Showtimes Near The Grand 16 - Pier Park
Word Trip Level 359
3 Bedroom 1 Bath House For Sale
Vistatech Quadcopter Drone With Camera Reviews
NIST Special Publication (SP) 800-37 Rev. 2 (Withdrawn), Risk Management Framework for Information Systems and Organizations: A System Life Cycle Approach for Security and Privacy
Vip Lounge Odu
Tmka-19829
Manatee County Recorder Of Deeds
Sams La Habra Gas Price
450 Miles Away From Me
Craigslist Gigs Wichita Ks
Tyler Perry Marriage Counselor Play 123Movies
Clausen's Car Wash
Sams Gas Price Sanford Fl
Rage Of Harrogath Bugged
Vagicaine Walgreens
Cch Staffnet
Gw2 Support Specter
Sky Dental Cartersville
Contico Tuff Box Replacement Locks
Razor Edge Gotti Pitbull Price
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.