Is It Routing or Is It Layer 3 Switching? YES! Learn It and Use It Cisco Networking Academy, US/Canada Pete Anderson Steve Stiles Assistant Professor Davenport University Instructor James A Rhodes State College © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 1 • Introductions – 5 minutes • What is Layer 3 Switching?– 5 minutes • How does it relate to Network Design? – 5 minutes • Comparison Routers/L3 Switches – 5 minutes • Technologies – 35 minutes • Hands-On Labs - 35 minutes Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 2 Introductions What is Layer 3 Switching? • Layer 3 switching speeds approximate that of Layer 2 switches • Hardware-based routing using Application-Specific Integrated Circuits (ASICs) • Make use of TCAM (Ternary Content Addressable Memory) for routing, ACL lookups, policy etc. • Make use of CEF (Cisco Express Forwarding) • RIP, OSPF, and EIGRP are supported • Future: Pure Layer 3 environment leveraging inexpensive L3 access layer switches Cisco Networking Academy, US/Canada • Layer 4 switching enables load balancing based on Layer 4 port number • Layer 7 switching uses Network-Based Application Recognition (NBAR) to permit or deny traffic based on data passed by an application © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 5 CEF uses special strategies to switch data packets to their destinations expediently. It caches the information generated by the Layer 3 routing engine even before the switch encounters any data flows. CEF caches routing information in one table (FIB) and caches Layer 2 next-hop addresses and frame header rewrite information for all FIB entries in another table, called the adjacency table (AT). Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 6 How does it relate to Network Design? • Layer 3 switches usually have packet-switching throughputs in the millions of packets per second (pps) • Traditional general-purpose routers provide packet switching in the range of 100,000 pps to over 1 million pps Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 8 • Aggregates distribution layer switches. • Implements scalable protocols and technologies and load balancing. • High-speed layer 3 switching using 10-Gigabit Ethernet. • Uses redundant L3 links. For small networks, a core layer is not needed. In this case, the distribution layer switches need to be fully meshed. Recommended practice is to deploy a dedicated core layer to connect 3 or more physical segments or 4 or more pairs of building distribution switches. Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 9 • High availability, fast path recovery, load balancing, QoS, and security • Route summarization and packet manipulation • Redistribution point between routing domains • Packet filtering and policy routing to implement policy-based connectivity • Terminate VLANs • First Hop Redundancy Protocol Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 10 • Convergence – provides inline Power over Ethernet (PoE) to support IP telephony and wireless access points. • Security – includes port security, DHCP snooping, Dynamic ARP inspection, IP source guard. Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 11 Comparison Routers/L3 Switches Similarities Differences Both routers and multilayer switches use routing protocols or static routes to maintain information about reachability and direction to network destinations (prefixes) and record this information in a routing table. Cisco Networking Academy, US/Canada Routers connect heterogeneous networks and support a wide variety of media and interfaces. Multilayer switches typically connect homogenous networks. Nowadays LAN switches are mostly Ethernet only. © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 13 Similarities Differences Perform the same functional packet switching actions: Multilayer switches use specialized hardware to achieve wire-speed Ethernet-to-Ethernet packet switching. 1. Receive a frame and strip off the Layer 2 header. 2. Perform a Layer 3 lookup to determine the outbound interface and next hop. 3. Encapsulate the packet in a new Layer 2 frame and transmit the frame. Cisco Networking Academy, US/Canada Low- to mid-range routers use multipurpose hardware to perform the packet-switching process. On average, the packetswitching throughput of routers is lower than the packet-switching throughput of multilayer switches. © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 14 Similarities Differences Routers usually support a wider range of features, mainly because switches need specialized hardware to be able to support certain data plane features or protocols. On routers, you can often add features through a software update. Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 15 Technologies A Logical Demonstration of a Multilayer Switch: Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 17 SVIs Switched Virtual Interfaces • Configured on multilayer switches, one per VLAN. • The management interface on an L2 switch is an SVI, but an L2 switch is limited to one active SVI. • An SVI associates with an L2 VLAN – a switch must have an active L2 instance of a VLAN in order for an (L3) SVI to function. Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 19 Switch(config)# ip routing Switch(config)# router rip Switch(config-router)# network 10.0.0.0 Switch(config)# interface vlan 10 Switch(config-if)# ip address 10.10.1.1 255.0.0.0 Switch(config-if)# no shutdown Switch(config-if)# interface vlan 20 Switch(config-if)# ip address 10.20.1.1 255.255.255.0 Switch(config-if)# no shutdown Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 20 Layer 2 Etherchannels • Up to 8 physical links can be bundled into a single logical EtherChannel link. • Usually EtherChannel is used for trunk links. • Configuration applied to port channel interface affects all physical interfaces assigned to the port channel. • Load balancing takes place between the physical links in an EtherChannel. Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 22 • Port Aggregation Protocol (PAgP) is a Cisco-proprietary protocol that aids in the automatic creation of Fast EtherChannel links. • Link Aggregation Control Protocol (LACP) is part of an IEEE specification (802.3ad) that also enables several physical ports to be bundled together to form an EtherChannel. Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 23 Mode Purpose Auto Places an interface in a passive negotiating state in which the interface responds to the PAgP packets that it receives but does not initiate PAgP negotiation (default). Desirable Places an interface in an active negotiating state in which the interface initiates negotiations with other interfaces by sending PAgP packets. Interfaces configured in the “on” mode do not exchange PAgP packets. On Forces the interface to channel without PAgP. Non-silent If a switch is connected to a partner that is PAgP-capable, configure the switch interface for non-silent operation. The non-silent keyword is always used with the auto or desirable mode. If you do not specify non-silent with the auto or desirable mode, silent is assumed. The silent setting is for connections to file servers or packet analyzers; this setting enables PAgP to operate, to attach the interface to a channel group, and to use the interface for transmission. Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 24 Mode Purpose Passive Places a port in a passive negotiating state. In this state, the port responds to the LACP packets that it receives but does not initiate LACP packet negotiation (default). Active Places a port in an active negotiating state. In this state, the port initiates negotiations with other ports by sending LACP packets. On Forces the interface to the channel without PAgP or LACP. Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 25 Switch(config)# interface fastethernet 0/23 Switch(config-if)# channel-group 2 mode active Switch(config)# interface fastethernet 0/24 Switch(config-if)# channel-group 2 mode active Switch(config)# interface port-channel 2 Switch(config-if)# switchport mode trunk Switch(config-if)# switchport trunk native VLAN 99 Switch(config-if)# switchport trunk allowed VLAN 2,3,99 Remote Switch configuration RSwitch(config)# interface fastethernet 0/23 RSwitch(config-if)# channel-group 5 mode on RSwitch(config)# interface fastethernet 0/24 RSwitch(config-if)# channel-group 5 mode on RSwitch(config)# interface port-channel 5 RSwitch(config-if)# switchport mode trunk RSwitch(config-if)# switchport trunk native VLAN 99 Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 26 • When several port-channel interfaces are configured on the same device, the show etherchannel summary command is useful for displaying one-line information per port-channel. • Layer 2 EtherChannels are all in use (SU next to the port-channel number). Switch# show etherchannel summary Flags: D - down P - bundled 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 M - not in use, minimum links not met 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 ------+-------------+-----------+-------------------------------------------2 Po2(SU) LACP g0/49(P) g0/50(P) g0/51(P) g0/52(P) 7 Po7(SU) LACP g0/47(P) g0/48(P) 9 Po9(SU) PAgP g0/8(P) g0/9(P) Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 27 Routed Ports • Use the no switchport command to configure a physical switch port as a routed port. (3560) • Routed ports are used in conjunction with SVI’s. • Routed ports connect point- to-point (L3) links between distribution layer and core layer switches. • A 48-port L3 switch can be configured as a 48-port router. Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 29 Switch(config)# interface GigabitEthernet 1/1 Switch(config-if)# no switchport Switch(config-if)# ip address 10.10.1.1 255.255.255.252 Switch(config-if)# exit ** Switch will let us know when we get forgetful ** Switch(config)# interface GigabitEthernet 1/2 Switch(config-if)# ip address 10.20.1.254 255.255.255.252 % IP addresses may not be configured on L2 links. Switch(config-if)# no switchport Switch(config-if)# ip address 10.20.1.254 255.255.255.252 Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 30 Layer 3 Etherchannels • Just as with physical interfaces on multilayer switches, bundles of interfaces (port channels) can be configured as routed ports. • Port channels configured as routed ports are called L3 EtherChannels. • L2 EtherChannels are normally used only when connecting from an access layer switch. Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 32 Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 33 Cisco Networking Academy, US/Canada © 2012 Cisco Systems, Inc. All rights reserved. Cisco confidential. 34