Thursday, March 31, 2011

Configure Layer 3 port-channel (EtherChannel) between Cisco Router and Switch

Router:

interface Port-channel1
ip address 10.4.4.2 255.255.255.252
!
interface GigabitEthernet0/0/0
no ip address
channel-group 1
no shutdown
!
interface GigabitEthernet0/0/1
no ip address
channel-group 1
no shutdown

Switch:

interface Port-channel1
no switchport
ip address 10.4.4.1 255.255.255.252
!
interface GigabitEthernet1/0/3
no switchport
no ip address
channel-group 1 mode on
no shutdown
!
interface GigabitEthernet2/0/3
no switchport
no ip address
channel-group 1 mode on
no shutdown

12 comments:

  1. Have you been able to combine an layer 2 etherchanel on a switch with a layer 3 etherchannel on a router ?

    ReplyDelete
  2. I'll try your script out, thank you for sharing it.
    us vpn

    ReplyDelete
  3. Thanks for sharing the layer-3 configuration of port channels. I think this will help a lot in fixing the network configuration.
    chicago data center

    ReplyDelete
  4. @Osvaldo:
    Yes is it possible:

    L2 part:
    interface Port-channel3
    description Link to strT00c
    switchport
    switchport trunk encapsulation dot1q
    switchport trunk native vlan 126
    switchport mode trunk
    end

    strS00#show etherchannel summary | i Po3
    3 Po3(SU) - Gi1/8/8(P) Gi2/8/8(P)
    strS00#

    interface GigabitEthernet1/8/8
    switchport
    switchport trunk encapsulation dot1q
    switchport trunk native vlan 126
    switchport mode trunk
    channel-group 3 mode on
    end



    L3 router part:
    interface Port-channel1
    ip address 172.24.126.126 255.255.255.0
    end

    interface GigabitEthernet0/1
    description strS00 Gi1/8/8 via V 221.1.12
    no ip address
    duplex auto
    speed auto
    channel-group 1
    end

    Don't know why, it does not worked for me if port on switch was set to switch-port access. Native vlan must be also set or you will get error like:
    Mar 22 14:12:59.587 CET: %EC-SW2_SP-5-CANNOT_BUNDLE2: Gi1/8/8 is not compatible with Po3 and will be suspended (dtp mode of Gi1/8/8 is on, Po3 is off)

    even if Po3 and Gi1/8/8 had same trunk settings.

    ReplyDelete
  5. Gi 1/1 Po1-------Po2 Gi2/1
    Gi 1/2 Po1-------P02 Gi2/2
    Vlan100 : ip address : 10.10.10.1/30 Vlan 100 ip address 10.10.10.2/30
    Po1 : switchport
    switchport trunk encapsulation dot1q
    switchport mode trunk
    int gi 1/1: switchport
    switchport trunk encapsulation dot1q
    switchport mode trunk
    channel-group 1 mode on
    int gi 1/2: switchport
    switchport trunk encapsulation dot1q
    switchport mode trunk
    channel-group 1 mode on
    ---------------------------------------------
    Po2 : switchport
    switchport trunk encapsulation dot1q
    switchport mode trunk
    int gi 2/1: switchport
    switchport trunk encapsulation dot1q
    switchport mode trunk
    channel-group 2 mode on
    int gi 2/2: switchport
    switchport trunk encapsulation dot1q
    switchport mode trunk
    channel-group 2 mode on
    --------------------------------------------
    Run ospf/EIGRP for L3 : ip ospf 100 | no passive interface vlan 100

    you have a now both L2/L3 port channel combine.

    ReplyDelete
  6. Just curious, but why do a layer 3 port channel? Is this better then assigning the port to a VLAN, and then with in the port-channel interface attaching it to a VLAN?

    just curious as to the differences...

    ReplyDelete
  7. Hi,just one query. Is it possible to create a L3 port channel if the two L3 switches (cisco6509) are located in 2 different sites which are connected over dark fiber. Pls let me know

    ReplyDelete
  8. Hi,

    I've come across this problem when creating a port-channel in Layer 3 in a 3560 Switch. I can set fa0/11-12 as Layer 3 but it wouldn't allow me to use both in 1 etherchannel with PagP Layer 3. Please help.

    DLS1(config)# interface range fastEthernet 0/11 - 12
    DLS1(config-if-range)# no switchport
    DLS1(config-if-range)# channel-group 3 mode desirable
    ^
    % Invalid input detected at '^' marker.

    DLS1(config-if-range)# interface port-channel 3
    DLS1(config-if)# no switchport
    % Incomplete command.
    DLS1(config-if)# ip address 10.0.0.1 255.255.255.0
    ^
    % Invalid input detected at '^' marker.

    ReplyDelete
    Replies
    1. Hi, Sascha!
      You couldn't use neither PAgP nor LACP in Layer 3 Etherchannel.

      https://www.cisco.com/en/US/prod/collateral/routers/ps5855/prod_white_paper0900aecd806f698a.pdf

      Delete
  9. Good Day.
    How do I get Layer 3 etherchannel to communicate with my Management VLAN 60 ? My etherchannel is Up Up, but my VLAN stays DOWN DOWN. I dont want to split physical port to be Layer 2
    Any help will be much appreciated……
    Here is a sample of my configs
    Core 6807 XL
    interface Port-channel50
    no switchport
    ip address 10.34.0.2 255.255.255.254
    ip ospf network point-to-point
    !
    !
    interface TenGigabitEthernet1/2/1
    description # Link to Distribution 0 West Wing #####
    no switchport
    no ip address
    ip ospf network point-to-point
    channel-group 50 mode on
    !
    !
    interface Vlan60
    description # Management VLAN #####
    ip address 10.34.1.1 255.255.255.224
    no ip route-cache
    !
    !
    router ospf 100
    router-id 10.34.0.129
    log-adjacency-changes
    nsf
    network 10.34.0.2 0.0.0.1 area 0
    network 10.34.0.129 0.0.0.0 area 0
    network 10.34.1.0 0.0.0.31 area 0
    !
    Distribution 4900
    !
    interface Port-channel50
    description # Uplink to Core Switch #####
    ip address 10.34.0.3 255.255.255.254
    ip ospf message-digest-key 10 md5 7 1104391103005A0E577E7C
    ip ospf network point-to-point
    flowcontrol receive on
    !
    !
    interface TenGigabitEthernet1/1
    description # Uplink to Core Switch #####
    no switchport
    no ip address
    ip ospf message-digest-key 10 md5 7 03097B1F121D704E1D5D4E
    ip ospf network point-to-point
    channel-group 50 mode on
    !
    !
    interface Vlan60
    description # Management VLAN #####
    ip address 10.34.1.34 255.255.255.224
    standby 60 ip 10.34.1.33
    standby 60 priority 108
    standby 60 preempt
    !
    !
    router ospf 100
    router-id 10.34.0.133
    log-adjacency-changes
    redistribute static subnets
    passive-interface default
    no passive-interface Port-channel50
    network 10.34.0.2 0.0.0.1 area 0
    network 10.34.0.133 0.0.0.0 area 0
    network 10.34.1.0 0.0.0.31 area 1

    ReplyDelete
  10. Set the Port-Channel as a subinterface with the IP address corresponding to the vlan (just like router on the stick).

    ReplyDelete
  11. Set the Port-Channel as a subinterface with the IP address corresponding to the vlan (just like router on the stick).

    ReplyDelete