cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
4927
Views
3
Helpful
14
Replies

Not able to configure gi0/0 as switchport

nawas
Level 4
Level 4

Cisco 2851 with two integrated 10/100/1000 ports and im trying to configre them as switchport (switchport access vlan X) but I don't see an available command, does this switch not support gigabit ports to switchport? I'm able to configure other FastEthernet ports to switchport but not the gigabit port.

Thanks.

14 Replies 14

bathory0110
Level 1
Level 1

command : sw mod access

no that's doesn't work

Router(config-if)#sw mod access

^

% Invalid input detected at '^' marker.

Hi,

In order to let a layer 3 port to act as a Layer 2 port you must use the interface configuration command: switchport.

After this command you must use that interface as a Layer 2 interface.

I hope this helps.

Best regards.

Massimiliano.

i know that but it is not happening on this one

Hi Nawaz,

The 2851 is a Cisco router, and the integrated GE interfaces of Cisco routers doesn't support to be configured as switchports.

BR,

Mohammed Mahmoud.

16 years later and your reply helped me lol thank you.
I'm messing around with an old 2945 and I was testing some settings on the integrated port and the switchport command was not valid, but it works fine on the gig ports on the ehwic.

Yes it is a very old post, but the information is still helpful. The 2851 of the original post and the 2945 of your post are "routers" and the built in interfaces are dedicated layer 3 functions, so switchport is not supported on them. Your ehwic is more flexible, and switchport is reasonable for it.

HTH

Rick

glen.grant
VIP Alumni
VIP Alumni

these are built in router ports not a layer2/3 switch thus you cannot configure them as switchports. You would have to buy the optional 4, 8, 16 port switch modules to fit into one of the slots if you want this feature otherwise get a manageable switch and use the 2800 as a router on a stick for the routing.

zsgbrt4
Level 1
Level 1

@nawas wrote:

Cisco 2851 with two integrated 10/100/1000 ports and im trying to configre them as switchport (switchport access vlan X) but I don't see an available command, does this switch not support gigabit ports to switchport? I'm able to configure other FastEthernet ports to switchport but not the gigabit port. Favorite Music

Thanks.


The Cisco 2851 router does not natively support configuring its gigabit ports as switchports (e.g., switchport access vlan X). The gigabit ports on the 2851 are typically routed interfaces, not switchports. To use them as switchports, you would need to install a switch module or use a different device that supports Layer 2 switching on gigabit ports.

Joseph W. Doherty
Hall of Fame
Hall of Fame

Just want to add, that many router routed ports may support some L2 processing using a L2 bridging capability.  So, it's not necessarily true such ports only support L3.

Additional information: https://www.cisco.com/c/en/us/support/docs/lan-switching/integrated-routing-bridging-irb/200650-Understanding-Bridge-Virtual-Interface.html

BTW, I know @Richard Burts is aware of this capability, as he mentioned it years ago in another thread, but as it's NOT a direct substitute for switch port mode, I suspect he didn't see the need to mention it, but it's the kind of feature many might be unaware of.

Perhaps it is a matter of semantics. Joseph makes an interesting point that some layer 2 functionality (bridging) can be configured on the router interfaces. I am aware of that and did not mention it because I did not think it was part of the question in the original post. The OP specifically asked about configuring switchport on the router interface. I answered that specific question "The 2851 of the original post and the 2945 of your post are "routers" and the built in interfaces are dedicated layer 3 functions, so switchport is not supported on them" Joseph correctly answers a different question "can layer 2 functions be configured on the router interfaces". So we are both correct. I hope the original poster has learned helpful information from both of us.

HTH

Rick

BTW, @Richard Burts hopefully you didn't take my reply implying there was anything incorrect about your original reply, because there wasn't.

Your reply and a few others, specifically mentioned such ports couldn't be configured as switchports; also correct.

However, a couple of replies (not yours) also appeared to imply, or explicitly state, that such router ports could only be used as L3 ports, which is not always the case.  The latter is what prompted my reply.

As to OP's original question, he didn't go into detail what he wants to accomplish, besides using the switchport command.  So, possibly (doubtful, IMO) a bridged mode port might meet his need (or perhaps a routed interface with subinterfaces to match multiple VLANs).  (Personally, I'm curious what he actually does want to accomplish using a router port as a L2 port.)

@Joseph W. Doherty I appreciate the follow up. I did not take your reply as implying that my answer was incorrect. Both of our answers were correct in the context that they addressed. I specifically addressed the part of the discussion about configuring interfaces as switchport. You addressed (correctly) the suggestion that the interfaces have no layer 2 capability.

I agree that it is not clear why the OP wanted to configure the interface as a switchport. And if we knew what was the intention we would be able to give better advice.

HTH

Rick

vishalbhandari
Spotlight
Spotlight

The GigabitEthernet ports on the Cisco 2851 are routed ports by default and do not support the switchport command. They are intended for Layer 3 configurations, unlike the FastEthernet ports, which can be used as Layer 2 switchports. If you need switching capabilities, you'll need an external switch or a different router model that supports Layer 2 on Gigabit ports.