cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
1155
Views
3
Helpful
12
Replies

Layer 2 and layer 3 ether channel

shubhamtater
Level 1
Level 1

How to configure layer 2 and layer 3 ether channel at same core switch?

12 Replies 12

Hi

 Basically either it will be layer2 or layer3 and you need to create the port-channel with the command port-channel and number and the use the command no switchport to change it to layer3 and then add IP address

int port-channel 1

no switchport (layer3)

ip add 192.168.1.1 255.255.255.0

 

Layer2

int port-channel 1

switchport mode trunk (Layer2)

 

I know how to configure it I just want to know is it possible to configure both at same device. 

No. You need to decide between L2 or L3. 

What you can is create two port-channels and keep one L2 and the other L3.

Sure you can
SW1-PO-SW2-PO-Router
SW1 to SW2 L2 PO 
SW2 to Router L3 PO 

Can you please give me the configuration 

SW1 & SW2 
interface range  fa0/0-1
channel-group 1 mode active
switchport access vlan x
 
!
interface port-channel 1 
switchpoort access vlan x

SW2 
inteface range fa0/2-3
channel-group 2 mode ON 
no switchport 
!
interface port-channel 2 
no switchport 
ip add x.x.x.1 255.255.255.0

router 
inteface range fa0/0-1
channel-group 2 mode ON 
no switchport <<- this may not required in router since all interface are router port 
!
interface port-channel 2 
no switchport 
ip add x.x.x.2 255.255.255.0




There is one issue in this code which is if I configure VLAN with any IP address, in that case, port channel 2 will not be able to take IP address and one message we got while doing this VLAN overlap

shubhamtater_0-1686679887369.png

 

SORRY THIS IS PACKET TRACER, 
I can not help you in this task 
may be other can 
thanks 
MHM

Joseph W. Doherty
Hall of Fame
Hall of Fame

"How to configure layer 2 and layer 3 ether channel at same core switch?"

Configure either as shown by @Flavio Miranda - this assuming you want them separate, i.e. a L2 or a L3 port-channel.

As you can have more than one port-channel per device, you can have both L2 and L3 port-channels.

However, if you want a single port-channel to be both L2 and L3, that can be done too.  You define a L2 port-channel, and also use a SVI.

shubhamtater
Level 1
Level 1

hostname edge_core1

!

!

!

!

!

!

ip routing

!

!

!

!

!

!

!

!

!

!

!

!

!

!

!

spanning-tree mode pvst

!

!

!

!

!

!

interface Port-channel1

switchport trunk encapsulation dot1q

switchport mode trunk

!

interface Port-channel3

no switchport

no ip address

!

interface FastEthernet0/1

switchport trunk encapsulation dot1q

switchport mode trunk

channel-group 1 mode on

!

interface FastEthernet0/2

switchport trunk encapsulation dot1q

switchport mode trunk

channel-group 1 mode on

!

interface FastEthernet0/3

switchport trunk encapsulation dot1q

switchport mode trunk

channel-group 1 mode on

!

interface FastEthernet0/4

switchport trunk encapsulation dot1q

switchport mode trunk

channel-group 1 mode on

!

interface FastEthernet0/5

switchport trunk encapsulation dot1q

switchport mode trunk

channel-group 1 mode on

!

interface FastEthernet0/6

switchport trunk encapsulation dot1q

switchport mode trunk

channel-group 1 mode on

!

interface FastEthernet0/7

!

interface FastEthernet0/8

!

interface FastEthernet0/9

!

interface FastEthernet0/10

!

interface FastEthernet0/11

!

interface FastEthernet0/12

!

interface FastEthernet0/13

!

interface FastEthernet0/14

!

interface FastEthernet0/15

!

interface FastEthernet0/16

!

interface FastEthernet0/17

!

interface FastEthernet0/18

!

interface FastEthernet0/19

!

interface FastEthernet0/20

!

interface FastEthernet0/21

!

interface FastEthernet0/22

!

interface FastEthernet0/23

!

interface FastEthernet0/24

!

interface GigabitEthernet0/1

no switchport

no ip address

channel-group 3 mode on

duplex auto

speed auto

!

interface GigabitEthernet0/2

no switchport

no ip address

channel-group 3 mode on

duplex auto

speed auto

!

interface Vlan1

ip address 10.2.0.2 255.255.0.0

!

ip classless

!

ip flow-export version 9

!

!

!

!

!

!

!

!

line con 0

!

line aux 0

!

line vty 0 4

login

!

!

!

!

end

I have configured L2 with no issue now I want to configure L3 with a separate EtherChannel and thank you Joseph W. Doherty  I would like to know how to configure both at one EtherChannel if you can give me the configuration or any document. 

one EtherChannel <<- what you meaning one PO? you can not config both in same PO
instead you can use port-channel 1 and config SVI in both SW and this give L3 reachability over L2 PO

"I have configured L2 with no issue now I want to configure L3 with a separate EtherChannel and thank you Joseph W. Doherty  I would like to know how to configure both at one EtherChannel if you can give me the configuration or any document."

I believe that has already been answered by @Flavio Miranda and @MHM Cisco World.  Is what they provided unclear or confusing?

However, if you're trying to do configurations like these, on Packet Tracer, very likely you'll bump into the limitations of Packet Tracer.  Packet Tracer, generally, only offers a subset of the features that the corresponding real devices provide.

For software that truly emulates the actual devices, you need something like GNS3 which runs actual IOS software (although getting that software has its own issues) or like Cisco's CML (whose virtual devices seem to actual run a true IOS variant).

You might also ask @MHM Cisco World for config snippet examples from his GNS3 setup.  He does such examples, very well!

Review Cisco Networking for a $25 gift card