0

How can I change a switched port into a routed port?

Compared to IOS, is there an equivalent of no switchport? If there is none, is there a workaround?

1
  • 1
    It depends on the device, IOS version/capabilities, and the hardware (module). Some switch interfaces can be set to routed mode. It's hard to say without actually trying it.
    – Ricky
    Commented Jul 27, 2016 at 20:04

2 Answers 2

1

Sx300 Series Switches Common Operation Guide

6.6 Switching an Interface to Layer 3 Mode

Change the working mode of GE1/0/1 from Layer 2 mode to Layer 3 mode.

<Quidway> system-view
[Quidway] interface gigabitethernet 1/0/1
[Quidway-GigabitEthernet1/0/1] undo portswitch
[Quidway-GigabitEthernet1/0/1] ip address 10.10.10.10 255.255.255.0 
0

If you are asking how to turn an interface on a switch back to factory defaults, where you can hook up a cable and it will connect to the Native VLAN with no problems or issues, use the switchport mode access command to put the switch port into access mode. Access mode will negate any configured VLAN assignments and port security setup on it. To assign the switchport to a VLAN use switchport access vlan x command which of course will assign that port to whatever VLAN you replace with X.

If you are asking about something on a router then the switchport command doesn't really apply as you can't have switchport enabled on a router interface.

1
  • Thank you for your effort. My reference to IOS does not relate to VLAN configuration. It relates to the difference between interfaces that have an IP address (routed) and interfaces that do not have any IP configuration (switched). Switched interfaces offer IP connectivity by being mapped to a virtual interface such as SVI or BVI in IOS. On VRP switches, there is the Vlanif. Commented Jul 27, 2016 at 16:06

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.