Inter-VLAN Routing.

Slides:



Advertisements
Similar presentations
Virtual Trunk Protocol
Advertisements

© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 4: Routing Concepts Routing Protocols.
11: IPv6 Routing Table and Static Routes
IP Routing Static Routing Information management 2 Groep T Leuven – Information department 2/14 The Router Router Interface is a physical.
© 2006 Cisco Systems, Inc. All rights reserved.Cisco PublicITE I Chapter 6 1 Implement Inter- VLAN Routing LAN Switching and Wireless – Chapter 6.
Virtual LANs.
Implementing Inter-VLAN Routing
Ver 1,12/09/2012Kode :CIJ 340,Jaringan Komputer Lanjut FASILKOM Routing Protocols and Concepts – Chapter 2 Static Routing CCNA.
Switching Topic 4 Inter-VLAN routing. Agenda Routing process Routing VLANs – Traditional model – Router-on-a-stick – Multilayer switches EtherChannel.
Cisco 3 - Switch Perrine. J Page 15/8/2015 Chapter 8 What happens to the member ports of a VLAN when the VLAN is deleted? 1.They become inactive. 2.They.
Instructor & Todd Lammle
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 W. Schulte Chapter 5: Inter-VLAN Routing Routing And Switching.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 5: Inter-VLAN Routing Routing & Switching.
1 Inter-VLAN routing Chapter 6 CCNA Exploration Semester 3 Modified by Profs. Ward and Cappellino.
LAN Switching and Wireless – Chapter 6 Sandra Coleman, CCNA, CCAI.
CCENT Study Guide Chapter 11 VLANs and Inter-VLAN Routing.
© 2008 Cisco Systems, Inc. All rights reserved.Cisco ConfidentialPresentation_ID 1 Chapter 5: Inter-VLAN Routing Routing And Switching.
© 2007 Cisco Systems, Inc. All rights reserved.Cisco Public 1 Version 4.0 Static Routing Routing Protocols and Concepts – Chapter 2.
© 2007 Cisco Systems, Inc. All rights reserved.ICND1 v1.0—5-1 WAN Connections Enabling Static Routing.
Implement Inter-VLAN Routing
Chapter review Chapter 5 test.
Instructor & Todd Lammle
The University of Bolton School of Business & Creative Technologies MWD1014 Computer Networks Virtual Local Area Networks (VLANs) Martin Stanhope
VLAN V irtual L ocal A rea N etwork VLAN Network performance is a key factor in the productivity of an organization. One of the technologies used to.
E /24 LAN /24LAN – / /8 S0 S /8 Head Office Branch Office E /16.
© 2002, Cisco Systems, Inc. All rights reserved..
Author: Bill Buchanan. 1. Broadcast: What is the MAC address of this network address? 2. Requested host: All the hosts read the broadcast and checks.
SW REVERSE JEOPARDY Chapter 1 CCNA2 SW Start-up Routing table Routing table Router parts Router parts Choosing a path Choosing a path Addressing Pot.
1 © 2003, Cisco Systems, Inc. All rights reserved. CCNA 3 v3.0 Module 8 Virtual LANs Cisco Networking Academy.
Switching Topic 2 VLANs.
 RIP — A distance vector interior routing protocol  IGRP — The Cisco distance vector interior routing protocol (not used nowadays)  OSPF — A link-state.
+ Routing Concepts 1 st semester Objectives  Describe the primary functions and features of a router.  Explain how routers use information.
ROUTING AND ROUTING TABLES 2 nd semester
1 2-Jul-16 Inter-VLAN routing CCNA Exploration Semester 3 Chapter 6.
Instructor Materials Chapter 2: Scaling VLANs
InterVLAN Routing 1. InterVLAN Routing 2. Multilayer Switching.
Chapter 4: Routing Concepts
Chapter 5: Inter-VLAN Routing
Instructor Materials Chapter 4: EtherChannel and HSRP
CCENT Study Guide Chapter 9 IP Routing.
STATIC ROUTING.
Routing and routing tables
Switching and VLANs.
Chapter 11 VLANs and Inter-VLAN Routing
Instructor & Todd Lammle
Switching and VLANs.
© 2002, Cisco Systems, Inc. All rights reserved.
Instructor Materials Chapter 6: VLANs
Chapter 4: Routing Concepts
Routing and routing tables
Chapter 5: Inter-VLAN Routing
Chapter 2: Static Routing
Chapter 6: Network Layer
Virtual LANs.
Chapter 2: Scaling VLANs
CIS 187 Multilayer Switched Networks
Instructor & Todd Lammle
CIS 187 CCNP SWITCH Multilayer Switched Networks Rick Graziani
Chapter 2: Static Routing
Enabling Static Routing
CIS 82 Routing and Switching Essentials Chapter 6 VLANs
Routing and Switching Essentials v6.0
CCNA Routing and Switching Routing and Switching Essentials v6.0
Switching and VLANs.
Chapter 2: Static Routing
Routing Protocols and Concepts – Chapter 2
Rick Graziani Cabrillo College
Chapter 2: Scaling VLANs
Static Routing For Multiple Routers
© 2002, Cisco Systems, Inc. All rights reserved.
Presentation transcript:

Inter-VLAN Routing

Objectives Describe the three primary options for enabling inter-VLAN routing. Configure legacy inter-VLAN routing. Configure router-on-a-stick inter-VLAN routing. Troubleshoot common inter-VLAN configuration issues. Troubleshoot common IP addressing issues in an inter-VLAN-routed environment. Configure inter-VLAN routing using Layer 3 switching. Troubleshoot inter-VLAN routing in a Layer 3-switched environment. Chapter 5 Objectives

Internetwork Communications C:>ping 172.16.30.100 172.16.10.100/24 172.16.20.100/24 172.16.30.100/24 Can two hosts on different subnets communicate without a router? No What would happen if a host tried to ping another host? They could not communicate. Would it send an ARP Request? Why or why not? The host would not send an ARP Request because there is no default-gateway. Even though hosts on different VLANs may be physically connected to the same switch, logically the are on separate networks. Remember, a host determines if it can communicate directly with another host by ANDing its own source IP address and subnet mask, determines its network address, and then ANDing the destination IP address of the packet and its own subnet mask.

Internetwork Communications Then Destination MAC Address is that of the same device as the Destination IP Address. Check ARP cache for entry of Destination IP Address and its MAC Address. If no entry, ARP Request Destination IP Address asking for MAC Address. Then Destination MAC Address is that of the same device as the Destination IP Address. Check ARP cache for entry of Destination IP Address and its MAC Address. If no entry, ARP Request Destination IP Address asking for MAC Address. Then Destination MAC Address will be that of the Default Gateway. Check ARP cache for entry of Default Gateway’s IP Address and its MAC Address. If no entry, ARP Request Default Gateway’s IP Address asking for MAC Address. Then Destination MAC Address will be that of the Default Gateway. Check ARP cache for entry of Default Gateway’s IP Address and its MAC Address. If no entry, ARP Request Default Gateway’s IP Address asking for MAC Address.

What is Inter-VLAN routing? Layer 2 switches cannot forward traffic between VLANs without the assistance of a router. Inter-VLAN routing is a process for forwarding network traffic from one VLAN to another, using a router. 5.1.1.1 What is Inter-VLAN routing? Legacy Inter-VLAN Routing Router-on-Stick Switch SVI Switch Routed Ports

Legacy Inter-VLAN Routing

Legacy Inter-VLAN Routing Routers used to route between VLANs. Each VLAN was connected to a different physical router interface. Packets would arrive on the router through one through interface, be routed and leave through another. Router interfaces connected to VLANs and have IP addresses from that specific VLAN. Large networks with large number of VLANs required many router interfaces.

Legacy Inter-VLAN Routing 192.168.20.1 255.255.255.0 Legacy Inter-VLAN Routing 192.168.10.1 255.255.255.0 A B C D 192.168.10.10 255.255.255.0 GW 192.168.10.1 192.168.10.11 255.255.255.0 GW 192.168.10.1 192.168.20.12 255.255.255.0 GW 192.168.20.1 192.168.20.13 255.255.255.0 GW 192.168.20.1 Router is required to connect (route) between subnets/VLANs

S1(config)# interface f0/11 S1(config-if)# switchport access vlan 10 S1(config)# vlan 10 S1(config-vlan)# vlan 30 S1(config-vlan)# exit S1(config)# interface f0/11 S1(config-if)# switchport access vlan 10 S1(config-if)# exit S1(config)# interface f0/4 S1(config)# interface f0/6 S1(config)# switchport access vlan 30 S1(config)# interface f0/5 S1(config-if)# switchport access vlan 30 5.1.2.2 Configure Legacy Inter-VLAN Routing: Switch Configuration

R1(config)# interface g0/0 R1(config-if)# ip address 172.17.10.1 255.255.255.0 R1(config-if)# no shutdown R1(config)# exit R1(config-if)# interface g0/1 R1(config-if)# ip address 172.17.30.1 255.255.255.0 5.1.2.2 Configure Legacy Inter-VLAN Routing: Switch Configuration

<output omitted> R1# show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B - BGP <output omitted> 172.17.0.0/16 is variably subnetted, 4 subnets, 2 masks C 172.17.10.0/24 is directly connected, GigabitEthernet0/0 L 172.17.10.1/32 is directly connected, GigabitEthernet0/0 C 172.17.30.0/24 is directly connected, GigabitEthernet0/1 L 172.17.30.1/32 is directly connected, GigabitEthernet0/1 5.1.2.2 Configure Legacy Inter-VLAN Routing: Switch Configuration

Router-on-a-Stick

Router-on-a-Stick The router-on-a-stick approach uses a different path to route between VLANs. One of the router’s physical interfaces is configured as a 802.1Q trunk port so it can understand VLAN tags. Logical subinterfaces are created; one subinterface per VLAN. Each subinterface is configured with an IP address from the VLAN it represents. VLAN members (hosts) are configured to use the subinterface address as a default gateway. Only one of the router’s physical interface is used.

S1(config)# vlan 10 S1(config-vlan)# vlan 30 S1(config-vlan)# exit S1(config)# interface f0/11 S1(config-if)# switchport access vlan 10 S1(config-if)# exit S1(config)# interface f0/6 S1(config)# switchport access vlan 30 S1(config-vlan)# interface f0/5 S1(config-if)# switchport mode trunk S1(config-if)#

R1(config)# interface g0/0.10 R1(config-subif)# encapsulation dot1q 10 R1(config-subif)# ip address 172.17.10.1 255.255.255.0 R1(config-subif)# exit R1(config)# interface g0/0.30 R1(config-subif)# encapsulation dot1q 30 R1(config-subif)# ip address 172.17.30.1 255.255.255.0 R1(config)# interface g0/0 R1(config-if)# no shutdown

R1# show vlans <output omitted> Virtual LAN ID: 10 (IEEE 802.1Q Encapsulation) vLAN Trunk Interface: GigabitEthernet0/0.10 Protocols Configured: Address: Received: Transmitted: IP 172.17.10.1 11 18 Virtual LAN ID: 30 (IEEE 802.1Q Encapsulation) vLAN Trunk Interface: GigabitEthernet0/0.30 IP 172.17.30.1 11 8

R1# show ip route Codes: L - local, C - connected, S - static, R - RIP, M - mobile, B – BGP <output omitted> 172.17.0.0/16 is variably subnetted, 4 subnets, 2 masks C 172.17.10.0/24 is directly connected, GigabitEthernet0/0.10 L 172.17.10.1/32 is directly connected, GigabitEthernet0/0.10 C 172.17.30.0/24 is directly connected, GigabitEthernet0/0.30 L 172.17.30.1/32 is directly connected, GigabitEthernet0/0.30

Verify Switch Configuration

Verify Switch Configuration

Problem #1 S1(config)# interface fa0/4 VLAN 10 S1(config)# interface fa0/4 S1(config-if)# switchport access vlan 10

Problem #2 S1(config)# interface fa0/5 Trunk S1(config)# interface fa0/5 S1(config-if)# switchport mode trunk

Problem #3 S1(config)# interface fa0/5 Trunk VLAN 10 S1(config)# interface fa0/5 S1(config-if)# switchport mode trunk

Verify Router Configuration

Problem #4 R1(config)# interface g0/0 172.17.10.1/24 R1(config)# interface g0/0 R1(config-if)# ip address 172.17.10.1 255.255.255.0

Problem #5 172.17.10.21/24

Problem #6 172.17.10.21/24

Verifying IP Addressing

Multi-layer Switches and Inter-VLAN Routing

Routers vs Multilayer Switches Routers and multilayer switches both perform routing (connecting networks) Routers may have different types of interfaces (Ethernet, serial, ATM, etc.) while multilayer switches will only have Ethernet interfaces. While routers can be used to segment LAN devices, their major use is as WAN devices. Each devices does have its own advantages. Routers are: The backbone devices of large intranets and of the Internet They operate at Layer 3 (network layer) of the OSI model They make decisions based on network addresses (IPv4, IPv6).

Switched Network Design Core – Route/Switch packets quickly across between distribution multilayer switches. Distribution – Route between VLANs/Subnets, ACLs Access – Provide access to end devices and provide port security.

Multilayer Switch Inter-VLAN Routing Multilayer switches can perform Layer 2 and Layer 3 functions, replacing the need for dedicated routers. Multilayer switches support dynamic routing and inter-VLAN routing. A switch virtual interface (SVI) exists for VLAN 1 by default. On a multilayer switch, a logical (layer 3) interface can be configured for any VLAN. With a multilayer switch, traffic is routed internal to the switch device. This routing process is a suitable and scalable solution.

Configure Router On A Stick: 802.1Q Trunk Link interface GigabitEthernet 0/0 no shutdown ! Does not show in config ! interface GigabitEthernet 0/0.2 description VLAN 2 encapsulation dot1Q 2 native ip address 172.16.1.2 255.255.255.0 interface GigabitEthernet 0/0.10 description VLAN 10 encapsulation dot1Q 10 ip address 172.16.10.1 255.255.255.0 interface GigabitEthernet 0/0.20 description VLAN 20 encapsulation dot1Q 20 ip address 172.16.20.1 255.255.255.0 interface GigabitEthernet 0/0.30 description VLAN 30 encapsulation dot1Q 30 ip address 172.16.30.1 255.255.255.0 interface GigabitEthernet 0/0.40 description VLAN 40 encapsulation dot1Q 40 ip address 172.16.40.1 255.255.255.0 172.16.10.100/24 172.16.20.100/24 interface GigabitEthernet 1/1 switchport mode trunk Purpose: This figure shows the configuration of the router on a stick. Emphasize: Highlight the two different interconnecting networks, 10.1.1.0 and 10.2.2.0. Router on a stick is very simple to implement.

Routed Ports versus Switched Virtual Interfaces Routed Ports – Just like a router, the port has an IP address/mask that makes it a member of that subnet. SVI – The switch is a member of that IP subnet/VLAN. All switch ports that are a member of that VLAN can communicate with the switch

Multilayer Switch Interfaces Layer 2: Access or Trunk Ports Physical Interface Logical Interface (SVI) Performs both Layer 2 switching and interVLAN routing. Layer 2 Interface: Access or Trunk ports Layer 3 Interface: Has an IP address assigned to it. The Default Gateway for any hosts connected to that interface or VLAN. Physical interface Same as a router Aka “Routed Port” Example: interface gigabit 0/1 Logical Interface Represents an entire VLAN Switched Virtual Interface (SVI) Example: interface vlan 10

SVI VLAN 10 192.168.10.1 255.255.255.0 SVI VLAN 20 192.168.20.1 255.255.255.0 A B C D 192.168.10.10 255.255.255.0 GW 192.168.10.1 192.168.10.11 255.255.255.0 GW 192.168.10.1 192.168.20.12 255.255.255.0 GW 192.168.20.1 192.168.20.13 255.255.255.0 GW 192.168.20.1 Layer 3 functionality can also be enabled for an entire VLAN. The IP address is assigned to the logical interface – the VLAN. This is needed when routing is required between VLANs. SVI (Switched Virtual Interface) No physical connection VLANs must be created before the SVI can be used. The IP address associated of the VLAN interface is the default gateway of the workstation.

SVI VLAN 10 192.168.10.1 255.255.255.0 SVI VLAN 20 192.168.20.1 255.255.255.0 A B C D 192.168.10.10 255.255.255.0 GW 192.168.10.1 192.168.10.11 255.255.255.0 GW 192.168.10.1 192.168.20.12 255.255.255.0 GW 192.168.20.1 192.168.20.13 255.255.255.0 GW 192.168.20.1 <VLANs have been created or will be created when configured on the interface> S1(config)# interface range fastethernet 0/1 - 12 S1(config-if-range)# switchport mode access S1(config-if-range)# switchport access vlan 10 S1(config-if-range)# exit S1(config)# interface range fastethernet 0/12 - 24 S1(config-if-range)# switchport access vlan 20 S1(config-if-range)# end

SVI VLAN 10 192.168.10.1 255.255.255.0 SVI VLAN 20 192.168.20.1 255.255.255.0 A B C D 192.168.10.10 255.255.255.0 GW 192.168.10.1 192.168.10.11 255.255.255.0 GW 192.168.10.1 192.168.20.12 255.255.255.0 GW 192.168.20.1 192.168.20.13 255.255.255.0 GW 192.168.20.1 DLS1(config)# inter vlan 10 DLS1(config-if)# description Engineering VLAN DLS1(config-if)# ip address 192.168.10.1 255.255.255.0 DLS1(config-if)# no shutdown DLS1(config)# inter vlan 20 DLS1(config-if)# description IT VLAN DLS1(config-if)# ip address 192.168.20.1 255.255.255.0

Alternative Configuration SVI VLAN 10 192.168.10.1 255.255.255.0 SVI VLAN 20 192.168.20.1 255.255.255.0 A B C D 192.168.10.10 255.255.255.0 GW 192.168.10.1 192.168.10.11 255.255.255.0 GW 192.168.10.1 192.168.20.12 255.255.255.0 GW 192.168.20.1 192.168.20.13 255.255.255.0 GW 192.168.20.1 Alternative Configuration

A B C D Distribution Layer Switch Trunk Access Layer Switch SVI VLAN 10 192.168.10.1 255.255.255.0 SVI VLAN 20 192.168.20.1 255.255.255.0 Distribution Layer Switch Trunk Access Layer Switch A B C D 192.168.10.10 255.255.255.0 GW 192.168.10.1 192.168.10.11 255.255.255.0 GW 192.168.10.1 192.168.20.12 255.255.255.0 GW 192.168.20.1 192.168.20.13 255.255.255.0 GW 192.168.20.1 DLS1(config)# inter gig 0/2 DLS1(config-if)# switchport mode trunk ALS1(config)# inter fa 0/9 ALS1(config-if)# switchport mode trunk

Multilayer Switch Interfaces Layer 2: Access or Trunk Ports Physical Interface (L3) Logical Interface (SVI – L3) DLS1# show interface gig 0/2 switchport Name: Gig0/2 Switchport: Enabled <output omitted> Layer 2 or Layer 3 Interface? Is it a “switch” port? Default on most Catalyst switches: Layer 2 Default on Catalyst 6500: Layer 3 Verify mode: Switch# show interface type mod/num switchport Switchport: Think Layer 2 Enabled: Layer 2 Disabled: Layer 3

Multilayer Switch Interfaces Is it a “switch” port? DLS1(config)# interface gig 0/2 DLS1(config-if)# no switchport DLS1(config-if)# end DLS1# show interface gig 0/2 switchport Name: Gig0/2 Switchport: Disabled <output omitted> DLS1# config t DLS1(config-if)# switchport Switchport: Enabled Converts interface to Layer 3 Layer 3 Converts interface to Layer 2 Layer 2 If in Layer 3 mode switchport interface command puts the port into Layer 2 mode.

SVI Interfaces - Logical Interfaces Switch(config)# vlan vlan-number Switch(config-vlan)# name vlan-name SwitchA(config)# interface vlan vlan-number SwitchA(config-if)# ip address ip-address mask SwitchA(config-if)# no shutdown The Catalyst multilayer switches support three different types of Layer 3 interfaces: Routed port— A pure Layer 3 interface similar to a routed port on a Cisco IOS router. Switch virtual interface (SVI)— A virtual VLAN interface for inter-VLAN routing. In other words, SVIs are the virtual routed VLAN interfaces. Bridge virtual interface (BVI)— A Layer 3 virtual bridging interface. (Not discussed) Layer 3 functionality can also be enabled for an entire VLAN. The IP address is assigned to the logical interface – the VLAN. This is needed when routing is required between VLANs. SVI (Switched Virtual Interface) No physical connection VLANs must be created before the SVI can be used. The IP address associated of the VLAN interface is the default gateway of the workstation.

Creating VLANs DLS1: Create and name the user VLANs: 10, 11, 20 and 21. DLS1: Create and name a Management VLAN (used to telnet into switches) DLS1: Create and name a NATIVE VLAN other than VLAN 1 (default) DLS1: Create and name a Garbage VLAN (assigned to all unused ports.) All ports that are not used (trunks and access) will be assigned as an access port to this VLAN. DLS1 vlan 2 name NATIVE vlan 10 name Engineering vlan 11 name IT vlan 20 name Sales vlan 21 name Administration vlan 99 name ManagementVLAN vlan 222 name GarbageVLAN

Management VLAN (SVI) For each device in the network we configured it to be a member of the management VLAN. On each switch Switch(config)# inter vlan 99 Switch(config-if)# description Management VLAN Switch(config-if)# ip address 172.16.99.x 255.255.255.0 Switch(config-if)# no shutdown Switch(config-if)# exit If you want to reach the management VLAN from other VLANs, assign this address to one of the multilayer switches (DLS1 and DLS2): DLS1(config)# ip default-gateway 172.16.99.1

Default Gateway (SVI) Configure DLS1 to be the default gateway for VLANs 10 and 11. All hosts on these VLANs will use these addresses as their default gateway addresses. DLS1(config)# inter vlan 99 DLS1(config-if)# description Management VLAN DLS1(config-if)# ip address 172.16.99.1 255.255.255.0 DLS1(config-if)# no shutdown DLS1(config)# inter vlan 10 DLS1(config-if)# description Engineering VLAN DLS1(config-if)# ip address 172.16.10.1 255.255.255.0 DLS1(config)# inter vlan 11 DLS1(config-if)# description IT VLAN DLS1(config-if)# ip address 172.16.11.1 255.255.255.0

Default Gateway (SVI) Configure DLS2 to be the default gateway for VLANs 20 and 21. All hosts on these VLANs will use these addresses as their default gateway addresses. DLS2(config)# inter vlan 20 DLS2(config-if)# description Sales VLAN DLS2(config-if)# ip address 172.16.20.1 255.255.255.0 DLS2(config-if)# no shut DLS2(config)# inter vlan 21 DLS2(config-if)# description Administration VLAN DLS2(config-if)# ip address 172.16.21.1 255.255.255.0

Default Gateway (SVI) 172.16.10.10 255.255.255.0 Statically or Dynamically assigned 172.16.10.1

Layer 3 Port Configuration – Physical Interfaces DLS1(config)# interface gig 0/1 DLS1(config-if)# no switchport DLS1(config-if)# ip address 192.168.1.1 255.255.255.252 DLS2(config)# interface gig 0/1 DLS2(config-if)# no switchport DLS2(config-if)# ip address 192.168.1.2 255.255.255.252 Physical switch ports can operate as Layer 3 interfaces using the interface command: Switch(config)# interface type mod/num Switch(config-if)# no switchport Switch(config-if)# ip address ip-address mask

Switched Network Design Core – Route/Switch packets quickly across between distribution multilayer switches. Distribution – Route between VLANs/Subnets, ACLs Access – Provide access to end devices and provide port security. L3 = Routed Ports, over IP, separate subnets L2 = SVI, VLANs over Trunks OR individual VLANs

Verifying Verify IP addresses DLS1#show ip inter brief Interface IP-Address OK? Method Status Protocol FastEthernet0/1 192.168.4.6 YES manual up up GigabitEthernet0/1 192.168.1.1 YES manual up up Vlan10 172.16.10.1 YES manual up up Vlan11 172.16.11.1 YES manual up up

InterVLAN Routing External Router No VLANs External Router VLANs Router on a stick VLANs or No VLANs VLANs 1, 2, 3 Trunk VLAN 1 VLAN 2 Multilayer Switch VLAN 3 Trunk Multilayer Switch

SDM

Cisco Switch Database Manager (SDM) A Catalyst 2960 switch can function as a Layer 3 device and route between VLANs and a limited number of static routes. The Cisco Switch Database Manager (SDM) provides multiple templates for the 2960 switch. The templates can be enabled to support specific roles depending on how the switch is used in the network. For example, the sdm lanbase-routing template can be enabled to allow the switch to route between VLANs and to support static routing.

Switch Database Manager Template show sdm prefer command applies the default template Default does not support static routing. If IPv6 addressing has been enabled, the template will be dual-ipv4-and-ipv6 default. S1# show sdm prefer The current template is "default" template. The selected template optimizes the resources in the switch to support this level of features for 0 routed interfaces and 255 VLANs. number of unicast mac addresses: 8K number of IPv4 IGMP groups: 0.25K number of IPv4/MAC qos aces: 0.125k number of IPv4/MAC security aces: 0.375k

SDM Template sdm prefer to change the template Switch must be reloaded for the new template to take effect. SDM Template S1# configure terminal Enter configuration commands, one per line. End with CNTL/Z. S1(config)# sdm prefer ? default Default bias dual-ipv4-and-ipv6 Support both IPv4 and IPv6 lanbase-routing Supports both IPv4 and IPv6 Static Routing qos QoS bias S1(config)# sdm prefer lanbase-routing Changes to the running SDM preferences have been stored, but cannot take effect until the next reload. Use 'show sdm prefer' to see what SDM preference is currently active. Switch(config)# do reload System configuration has been modified. Save? [yes/no]: yes Building configuration... [OK] Proceed with reload? [confirm] *Mar 20 00:10:24.557: %SYS-5-RELOAD: Reload requested by console. Reload Reason: Reload command. Media Description: Lab: Configuring Basic DHCPv4 on a Switch (from Switching, Chapter 7, Lab B) Reference: Switch and Router Output.docx

2960 Static Route Support lanbase-routing template is active on S1. With this template, static routing is supported for up to 750 static routes. Switch# show sdm prefer The current template is "lanbase-routing" template. The selected template optimizes the resources in the switch to support this level of features for 0 routed interfaces and 255 VLANs. number of unicast mac addresses: 4K number of IPv4 IGMP groups + multicast routes: 0.25K number of IPv4 unicast routes: 0.75K number of directly-connected IPv4 hosts: 0.75K number of indirect IPv4 routes: 16 number of IPv6 multicast groups: 0.375k number of directly-connected IPv6 addresses: 0.75K number of indirect IPv6 unicast routes: 16 number of IPv4 policy based routing aces: 0 number of IPv4/MAC qos aces: 0.125k number of IPv4/MAC security aces: 0.375k number of IPv6 policy based routing aces: 0 number of IPv6 qos aces: 0.375k number of IPv6 security aces: 127 Media Description: Lab: Configuring Basic DHCPv4 on a Switch (from Switching, Chapter 7, Lab B) Reference: Switch and Router Output.docx

Enabling IPv4 Routing Functionality on a 2960 Interface F0/6 on S1 is assigned to VLAN 2. The SVIs for VLANs 1 and 2 are also configured with IP addresses 192.168.1.1/24 and 192.168.2.1/24, respectively. IP routing is enabled with the ip routing global configuration mode command. Enabling IPv4 Routing Functionality on a 2960 S1(config)# interface f0/6 S1(config-if)# switchport access vlan 2 S1(config-if)# interface vlan 1 S1(config-if)# ip address 192.168.1.1 255.255.255.0 S1(config-if)# interface vlan 2 S1(config-if)# ip address 192.168.2.1 255.255.255.0 S1(config-if)# no shutdown Mar 20 01:00:25.021: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan2, changed state to up S1(config)# ip routing S1(config)# do show ip route Codes: L - local, C - connected, S - static, 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 i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP + - replicated route, % - next hop override Gateway of last resort is not set 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.1.0/24 is directly connected, Vlan1 L 192.168.1.1/32 is directly connected, Vlan1 192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.2.0/24 is directly connected, Vlan2 L 192.168.2.1/32 is directly connected, Vlan2

Router Participating in Routing with a Switch R1 has two IPv4 networks configured: Interface G0/1 has IP address 192.168.1.10/24 loopback interface Lo0 has IP address 209.165.200.225/27 R1# show ip route Codes: L - local, C - connected, S - static, 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 i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP + - replicated route, % - next hop override Gateway of last resort is not set 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.1.0/24 is directly connected, GigabitEthernet0/1 L 192.168.1.10/32 is directly connected, GigabitEthernet0/1 209.165.200.0/24 is variably subnetted, 2 subnets, 2 masks C 209.165.200.224/27 is directly connected, Loopback0 L 209.165.200.225/32 is directly connected, Loopback0 Media Description: Lab: Configuring Basic DHCPv4 on a Switch (from Switching, Chapter 7, Lab B) Reference: Switch and Router Output.docx

Configuring a Static Route on a 2960 A default route is configured on S1 S1(config)# ip route 0.0.0.0 0.0.0.0 192.168.1.10 S1(config)# do show ip route Codes: L - local, C - connected, S - static, 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 i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP + - replicated route, % - next hop override Gateway of last resort is 192.168.1.10 to network 0.0.0.0 S* 0.0.0.0/0 [1/0] via 192.168.1.10 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.1.0/24 is directly connected, Vlan1 L 192.168.1.1/32 is directly connected, Vlan1 192.168.2.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.2.0/24 is directly connected, Vlan2 L 192.168.2.1/32 is directly connected, Vlan2

Final Routing Table on Router A static route to the remote network 192.168.2.0/24 (VLAN 2) is configured on R1 R1(config)# ip route 192.168.2.0 255.255.255.0 g0/1 R1(config)# do show ip route Codes: L - local, C - connected, S - static, 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 i - IS-IS, su - IS-IS summary, 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, H - NHRP, l - LISP + - replicated route, % - next hop override Gateway of last resort is not set 192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks C 192.168.1.0/24 is directly connected, GigabitEthernet0/1 L 192.168.1.10/32 is directly connected, GigabitEthernet0/1 S 192.168.2.0/24 is directly connected, GigabitEthernet0/1 209.165.200.0/24 is variably subnetted, 2 subnets, 2 masks C 209.165.200.224/27 is directly connected, Loopback0 L 209.165.200.225/32 is directly connected, Loopback0

Host Connectivity 209.165.200.225/27 PC-A is configured with IP address 192.168.2.2/24 in VLAN 2 PC-B is configured with IP address 192.168.1.2/24 in VLAN 1. PC-B is able to ping both PC-B and the loopback interface on R1. 192.168.2.2/24 VLAN 2 192.168.1.2/24 VLAN 1