cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
40553
Views
15
Helpful
7
Replies

Difference between "no switchport" and "switchport mode access" (old IOS)

wsanders1
Level 1
Level 1

Running 12.2(22) IP services base on an old 3550. At the interface config level, if I type "no switchport" I get a config that reads "no switchport", if I type "no switchport mode" I get "switchport mode dynamic desirable" (the default for this particular HW/SW), and if I type "switchport mode access" I get a config that reads "switchport mode access".

I don't have any networks on VLAN1 available to me for test, to see if the port in "no switchport" mode will participate in switching, but my guess is that, since I can't assign an IP address to the interface unless it is in "no switchport" mode, and can't assign a VLAN to it until I have issued the "switchport" command, is that in "no switchport" the port doesn't participate in any switching, even VLAN 1. Basically this command turns the port into a IP router port.

Is that an accurate way to describe it? Thanks in advance.

7 Replies 7

Jon Marshall
Hall of Fame
Hall of Fame

Wiley

"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.

Hope this answers your question.

Jon

Thanks for confirming my observations.

Baratheon
Level 1
Level 1

 

I'm sorry, but I also ask questions,
Regarding the issue of static routing, I also have questions and want to ask,
I simulated static routing of three L3 switches on packet tracert,
Now, PC1 and PC2 can be connected to PC0, but PC1 and PC2 cannot be connected.
I would like to ask you if there is any way to achieve this through the static route setting of the switch?
Thank you in advance for your assistance.

20221029 static routing L3 switch.png

Hello,

on the left (Multilayer Switch2) you need to add:

ip route 192.168.20.0 255.255.255.0 192.168.200.1

and on the right (Multilayer Switch1) you need to add:

ip route 192.168.30.0 255.255.255.0 192.168.100.1

Hi Georg Pauwen,There is a successful answer to the question.

I am very thankful that you reply me quickly.

擷取.PNG

 Thanks for the help! May I ask you a question?

The problem encountered in configuring the Trunk+Etherchannel group is that PC1 and PC2 are on different network segments, but I want PC1 to be able to successfully interconnect with PC2 (ping is successful), how should I configure it? I would really appreciate your help!

Hi Wsanders , 

The no switchport  command puts the interface in L3 mode (known as "routed port") and makes it operate more like a router interface rather than a switch port.  Routed ports can be configured with a Layer 3 routing protocol,

  •  does not support VLAN subinterfaces.
  •  does not support Layer 2 protocols, such as DTP and STP.
  • It is supported only on switches running the IP base or IP services image.

 

 

Spooster IT Services Team
Review Cisco Networking for a $25 gift card