Thursday, December 13, 2012

Multilayer Switching- Routed Ports


In this lab I will configured a multilayer switch port to be a routed port. On the router I configured an ip address that goes is directly connected to the l3 switch.

Router#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#int fa 0/1
Router(config-if)#ip add 210.1.1.1 255.255.255.0

On the l3 switch I configured an SVI for vlan 11 and 33.

Switch(config)#ip routing
Switch(config)#int vlan 11
Switch(config-if)#ip add 201.1.1.254 255.255.255.0

Switch(config)#int fa 0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 11

%LINK-5-CHANGED: Interface Vlan11, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan11, changed state to up
% Access VLAN does not exist. Creating vlan 11

Switch(config-if)#int vlan 33
Switch(config-if)#ip add 30.1.1.254 255.255.255.0
Switch(config-if)#int fa 0/3
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 33

%LINK-5-CHANGED: Interface Vlan33, changed state to up

For the port directly connected to the router I turn off layer2 switching with the no switch port command and then assign an ip address to the interface just like I would a router.

Switch(config)#int fa 0/1
Switch(config-if)#no switchport

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up

Switch(config-if)#ip add 210.1.1.2 255.255.255.0

I confirmed connectivity with the router by pinging its interface.

Switch#ping 210.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 210.1.1.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2

From the host I can ping the switch routed interface but not the router's. The reason for this is that the router doesn't know how to get to those VLANs.

PC>ping 210.1.1.2

Pinging 210.1.1.2 with 32 bytes of data:

Reply from 210.1.1.2: bytes=32 time=27ms TTL=255
Reply from 210.1.1.2: bytes=32 time=4ms TTL=255
Reply from 210.1.1.2: bytes=32 time=4ms TTL=255
Reply from 210.1.1.2: bytes=32 time=3ms TTL=255

Ping statistics for 210.1.1.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 3ms, Maximum = 27ms, Average = 9ms

PC>ping 210.1.1.1

Pinging 210.1.1.1 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 210.1.1.1:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

Router has no entries for 20.1.1.0 or 30.1.1.0 networks, a dynamic protocol can be used to solve this problem or static routes.

Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

C    210.1.1.0/24 is directly connected, FastEthernet0/0

I configured EIGRP on both the router and the l3 switch so that they can exchange routing tables.

Router(config)#router eigrp 100
Router(config-router)#no auto-summary
Router(config-router)#network 210.1.1.0 0.0.0.255



Switch#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#router eigrp 100
Switch(config-router)#no auto
Switch(config-router)#network 210.1.1.0 0.0.0.255
Switch(config-router)#
%DUAL-5-NBRCHANGE: IP-EIGRP 100: Neighbor 210.1.1.1 (FastEthernet0/1) is up: new adjacency

Switch(config-router)# network 20.1.1.0 0.0.0.255
Switch(config-router)# network 30.1.1.0 0.0.0.255


The router now knows how to reach all networks in this topology.

Router#show ip route eigrp
     20.0.0.0/24 is subnetted, 1 subnets
D       20.1.1.0 [90/25628160] via 210.1.1.2, 00:00:34, FastEthernet0/0
     30.0.0.0/24 is subnetted, 1 subnets
D       30.1.1.0 [90/25628160] via 210.1.1.2, 00:02:28, FastEthern

The ping is successful from the host now.

PC>ping 210.1.1.1

Pinging 210.1.1.1 with 32 bytes of data:

Reply from 210.1.1.1: bytes=32 time=9ms TTL=254
Reply from 210.1.1.1: bytes=32 time=11ms TTL=254
Reply from 210.1.1.1: bytes=32 time=8ms TTL=254
Reply from 210.1.1.1: bytes=32 time=9ms TTL=254

Ping statistics for 210.1.1.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 8ms, Maximum = 11ms, Average = 9ms









Tuesday, December 11, 2012

Multilayer Switching- SVIs



In this lab I created two switch virtual interfaces (SVIs) on int vlan 10 and vlan 192. I assigned fa0/1 with vlan access 10 and fa0/2 with clan access 192.

Switch#config t
Switch(config)#int vlan 10
Switch(config-if)#
%LINK-5-CHANGED: Interface Vlan10, changed state to up

Switch(config-if)#ip add 10.1.1.1 255.255.255.0
Switch(config-if)#exit
Switch(config)#int vlan 192
Switch(config-if)#ip add 192.168.1.1 255.255.255.0


Switch(config)#int fa 0/1
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 10


Switch(config-if)#int fa 0/2
Switch(config-if)#switchport mode access
Switch(config-if)#switchport access vlan 192

Here I tested that the switch could see the hosts which were configured according to the diagram and with the SVI as the default gateway.


Switch#ping 10.1.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.1.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 3/5/7 ms





Switch#ping 192.168.1.2

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/4/4 ms

Next I tried to ping from host 10.1.1.2 to host 192.168.1.2 but it failed. The reason it did was because my default ip routing is disabled on multilayer switches.



PC>ping 192.168.1.2

Pinging 192.168.1.2 with 32 bytes of data:

Request timed out.
Request timed out.
Request timed out.
Request timed out.

Ping statistics for 192.168.1.2:
    Packets: Sent = 4, Received = 0, Lost = 4 (100% loss),

Here I enabled ip routing and verified with show ip route that connected route when in the routing table.


Switch#config t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#ip routing
Switch(config)#do show run
Building configuration...

Current configuration : 1295 bytes
!
version 12.2
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
!
!
ip routing
!
!


Switch#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

     10.0.0.0/24 is subnetted, 1 subnets
C       10.1.1.0 is directly connected, Vlan10
C    192.168.1.0/24 is directly connected, Vlan192


Now the ping is successful once routing was enabled.


PC>ping 192.168.1.2

Pinging 192.168.1.2 with 32 bytes of data:

Reply from 192.168.1.2: bytes=32 time=5ms TTL=127
Reply from 192.168.1.2: bytes=32 time=5ms TTL=127
Reply from 192.168.1.2: bytes=32 time=10ms TTL=127
Reply from 192.168.1.2: bytes=32 time=7ms TTL=127

Ping statistics for 192.168.1.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 5ms, Maximum = 10ms, Average = 6ms





Configuring EtherChannel (PAgP, LACP)



No trunks are currently set between DLS1 and any other switch, I will setup port 7 through 12 to trunk and do the same for the rest of the switches.

DLS1#show int trunk
DLS1#
DLS1#config t
Enter configuration commands, one per line.  End with CNTL/Z.
DLS1(config)#int range fast 0/7- 12

DLS1(config-if-range)#switchport trunk encap dot1q
DLS1(config-if-range)#switchport mode trunk


DLS2  ports directly connected to DLS1 became trunks after I setup DLS1 port 0/11 ,0/12 to trunk because DLS2 ports are in dynamic auto by default.

DLS2#show int trunk
Port        Mode         Encapsulation  Status        Native vlan
Fa0/11      auto         n-802.1q       trunking      1
Fa0/12      auto         n-802.1q       trunking      1

Port        Vlans allowed on trunk
Fa0/11      1-1005
Fa0/12      1-1005

Port        Vlans allowed and active in management domain
Fa0/11      1
Fa0/12      1

Port        Vlans in spanning tree forwarding state and not pruned
Fa0/11      1
Fa0/12      1



DLS2#show interfaces fastEthernet 0/11 switchport
Name: Fa0/11
Switchport: Enabled
Administrative Mode: dynamic auto


..............................................


DLS2(config)#int range fastEthernet 0/7- 12
DLS2(config-if-range)#switchport trunk encap dot1q
DLS2(config-if-range)#switchport mode trunk

I like to make them trunk manually. 

On ALS1 we have the same story dynamic auto is on and once I changed DLS1 to trunk interfaces they dynamically became trunks.

ALS1# show int fast 0/7 switchport 
Name: Fa0/7
Switchport: Enabled
Administrative Mode: dynamic auto
Operational Mode: trunk


ALS1#show int trunk
Port        Mode         Encapsulation  Status        Native vlan
Fa0/7       auto         n-802.1q       trunking      1
Fa0/8       auto         n-802.1q       trunking      1
Fa0/9       auto         n-802.1q       trunking      1
Fa0/10      auto         n-802.1q       trunking      1

Port        Vlans allowed on trunk
Fa0/7       1-1005
Fa0/8       1-1005
Fa0/9       1-1005
Fa0/10      1-1005

Port        Vlans allowed and active in management domain
Fa0/7       1,100,110,120
Fa0/8       1,100,110,120
Fa0/9       1,100,110,120
Fa0/10      1,100,110,120

Port        Vlans in spanning tree forwarding state and not pruned
Fa0/7       100,110,120
Fa0/8       100,110,120
Fa0/9       1,100,110,120
Fa0/10      100,110,120

Ports 0/11 and Port 0/12 aren't trunks because connections with ALS1 and ALS2 are both setup as dynamic auto. ALS1 and ALS2 IOS only supports dot1q so encapsulation doesn't need to be specified.

ALS1(config)#int range fast 0/7- 12
ALS1(config-if-range)#switch mode trunk

ALS2(config)#int range fast 0/7- 12
ALS2(config-if-range)#switch mode trunk

I want to create an etherchannel with ALS1 and ALS2 using Cisco's PAgP. There are some rules I must follow before I combine ports into an etherchannel. They must be the same type of port (trunk,port) , same duplex, same speed , same allowed VLANs and native VLAN.  Here both 11 and 12 are trunks with the same port and VLAN settings.


ALS1(config)#int range fast 0/11- 12
ALS1(config-if-range)#channel-group 1 mode desirable 

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/12, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/12, changed state to up






ALS2(config)#int range fast 0/11- 12
ALS2(config-if-range)#channel-group 1 mode desirable 

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/11, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/12, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/12, changed state to up
ALS2(config-if-range)#
%LINK-5-CHANGED: Interface Port-channel 1, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 1, changed state to up

The etherchannel is now a logical interface named po1.

ALS1(config)#int port-channel 1
ALS1(config-if)#switchport mode trunk

ALS2(config)#int po1
ALS2(config-if)#switchport mode trunk

ALS1#show int trunk
Port        Mode         Encapsulation  Status        Native vlan
Fa0/7       on           802.1q         trunking      1
Fa0/8       on           802.1q         trunking      1
Fa0/9       on           802.1q         trunking      1
Fa0/10      on           802.1q         trunking      1
Fa0/11      on           802.1q         trunking      1
Fa0/12      on           802.1q         trunking      1
Po1         on           802.1q         trunking      1

To make sure the etherchannel is up and running , I run the show etherchannel summary command. I can see the ports are layer 2 and in use with PAgP and that 11 and 12 are in the bundle. 

ALS1#show etherchannel summary 
Flags:  D - down        P - in port-channel
        I - stand-alone s - suspended
        H - Hot-standby (LACP only)
        R - Layer3      S - Layer2
        U - in use      f - failed to allocate aggregator
        u - unsuitable for bundling
        w - waiting to be aggregated
        d - default port


Number of channel-groups in use: 1
Number of aggregators:           1

Group  Port-channel  Protocol    Ports
------+-------------+-----------+----------------------------------------------

1      Po1(SU)           PAgP   Fa0/11(P) Fa0/12(P) 
ALS1# 

Now I want to create a LACP etherchannel on ports 7 &8 at ALS1 and DLS1.

ALS1(config)#int range fast 0/7- 8
ALS1(config-if-range)#channel-group 2 mode ?
  active     Enable LACP unconditionally
  auto       Enable PAgP only if a PAgP device is detected
  desirable  Enable PAgP unconditionally
  on         Enable Etherchannel only
  passive    Enable LACP only if a LACP device is detected
ALS1(config-if-range)#channel-group 2 mode active

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to up
ALS1(config-if-range)#


DLS1(config)#int range fast 0/7- 8
DLS1(config-if-range)#channel-group 2 mode active

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/7, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to down

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/8, changed state to up

DLS1(config-if-range)#
%LINK-5-CHANGED: Interface Port-channel 2, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface Port-channel 2, changed state to up

ALS1(config)#int po2
ALS1(config-if)#switchport mode trunk

DLS1(config)#int po2
DLS1(config-if)#switchport mode trunk

ALS1#show int trunk
Port        Mode         Encapsulation  Status        Native vlan
Fa0/7       on           802.1q         trunking      1
Fa0/8       on           802.1q         trunking      1
Fa0/9       on           802.1q         trunking      1
Fa0/10      on           802.1q         trunking      1
Fa0/11      on           802.1q         trunking      1
Fa0/12      on           802.1q         trunking      1
Po1         on           802.1q         trunking      1
Po2         on           802.1q         trunking      1

ALS1#show etherchannel summary 
Flags:  D - down        P - in port-channel
        I - stand-alone s - suspended
        H - Hot-standby (LACP only)
        R - Layer3      S - Layer2
        U - in use      f - failed to allocate aggregator
        u - unsuitable for bundling
        w - waiting to be aggregated
        d - default port


Number of channel-groups in use: 2
Number of aggregators:           2

Group  Port-channel  Protocol    Ports
------+-------------+-----------+----------------------------------------------

1      Po1(SU)           PAgP   Fa0/11(P) Fa0/12(P) 
2      Po2(SU)           LACP   Fa0/7(P) Fa0/8(P)