Layer 3 Etherchannel

Hi, can someone please say if this etherchannel configuration between a 3560 and 3750 switch is correct, thanks.

3560

int range fa0/11 - 12
description ETHER CHANNEL TRUNK LINK TO S3750
switchport trunk encapsulation dot1q 
switchport mode trunk
switchport trunk native vlan 2
switchport trunk allowed vlan 1-20
no switchport
channel-group 1 mode on
no shut
exit
int po1
description ETHER CHANNEL TRUNK LINK TO S3750
switchport trunk encapsulation dot1q 
switchport mode trunk
switchport trunk native vlan 2
switchport trunk allowed vlan 1-20
ip address 192.168.2.49 255.255.255.252
no shut
exit

Hi Dinesh,

If you want a L3 Etherchannel then you don’t need any of the “switchport” commands (except the no switchport command).

Access/Trunk mode and VLANs are only for L2 interfaces.

Rene

Hi Rene, thanks for your reply. I was concerned about having the etherchannel in trunk mode to carry all vlans, but I guess after using the “no switchport” command, the etherchannel will automatically go in trunk mode. Can I specify the native and allowed vlan, as was stated, or can you say if the commands below is correct, thanks.

int range fa0/11 - 12
description ETHER CHANNEL TRUNK LINK TO S3750
switchport trunk native vlan 2
switchport trunk allowed vlan all
no switchport
channel-group 1 mode on
exit

int po1
description ETHER CHANNEL TRUNK LINK TO S3750
ip address 192.168.2.49 255.255.255.252
no shut
exit

Hi Dinesh,

Once you use “no switchport” then the interface has no idea what trunks or VLANs are anymore…those are L2 and the interface will be running in L3:

SW1(config)#interface GigabitEthernet 0/1
SW1(config-if)#no switchport 
SW1(config-if)#switchport mode trunk
Command rejected: Gi0/1 is not a switching port.

You can put an IP address on it but that’s it. The interface is now the same as a router’s interface.

Rene

Ok thanks Rene

I have two 3850 switches connected to each other.

There is a layer 3 port channel and a layer 2 port channel created between SW1 and SW2. I am trying to understand why they setup a L2 and L3 on the switches…one for trunking and one for routing? Wouldn’t it be easier to keep it simple with one port channel and it would be layer 2 ? Is there a best practice ?

ROUTER ------SW1=======SW2

Hello Matt

The set up you are indicating is somewhat unconventional, but it is not unheard of. These types of setups are usually created when you want to employ something for which you don’t really have the required hardware, so you’re trying to find solutions with what you have.

Without knowing more about the rest of the topology, it may be that SW2 is set up to function as a default gateway for various subnets/VLANs connected to it, and traffic from those subnets are to be routed to the router in your diagram. At the same time, there may be other VLANs which are common to both SW1 and SW2 for which you require a L2 portchannel to share those VLANs. You can come up with many scenarios where this would “solve” a problem, but the fact remains that this should never be employed as a best practice for your networks.

I hope this has been helpful!

Laz

1 Like

Hello Laz,
Thanks for your reply. There is not much more to the diagram…There are users sharing the same VLANs on SW1 and SW2. There are servers on SW2 and there are users on SW1, and there is nothing hanging off of SW2 network related. If SW2 is only connected to SW1 because they have a lack of fiber then I guess it makes sense.

A simpler/best practice setup would be SW1 holds the VLANs and SW1 and SW2 have a layer 2 etherchannel?

Thanks,

M

Hello Matt

If the VLANs are distributed between both switches, then yes, a L2 etherchannel would be preferable, even with 3 or 4 or more links, if bandwidth is an issue. The only reason you’d need an L3 etherchannel is if you were performing routing on SW2 as well.

To look at the issue more simply, let’s get rid of etherchannel all together. Imagine you have a L3 link between the two switches (that is, you create routed ports on the switches using the no switchport command on both devices) and you have a second link between them using an L2 connection, possibly a trunk. The trunk would distribute all VLANs to both switches, but the L3 link will obligate SW2 to do routing as well, depending on the source and destination of the particular packets being sent. Like I said before, it’s not a good design, and you can expect trouble on the network at some point…

Yes absolutely!

I hope this has been helpful!

Laz

1 Like

Laz,

Thanks for clearing that up. Your explanations are always terrific and it clears up the confusion as well. There are some routing issues that I have seen already. I will be fixing this but I am finding a lot of “jobs” that are done with “just getting it working” attitude and then issues arise. I really appreciate you breaking it down like you did.

Thanks

M

1 Like