Presentation is loading. Please wait.

Presentation is loading. Please wait.

Inter-VLAN Routing.

Similar presentations


Presentation on theme: "Inter-VLAN Routing."— Presentation transcript:

1 Inter-VLAN Routing

2 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

3 Internetwork Communications
C:>ping /24 /24 /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.

4 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.

5 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. What is Inter-VLAN routing? Legacy Inter-VLAN Routing Router-on-Stick Switch SVI Switch Routed Ports

6 Legacy Inter-VLAN Routing

7 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.

8 Legacy Inter-VLAN Routing
Legacy Inter-VLAN Routing A B C D GW GW GW GW Router is required to connect (route) between subnets/VLANs

9 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 Configure Legacy Inter-VLAN Routing: Switch Configuration

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

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

12 Router-on-a-Stick

13 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.

14 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)#

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

16 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 Virtual LAN ID: 30 (IEEE 802.1Q Encapsulation) vLAN Trunk Interface: GigabitEthernet0/0.30 IP

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

18 Verify Switch Configuration

19 Verify Switch Configuration

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

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

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

23 Verify Router Configuration

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

25 Problem #5 /24

26 Problem #6 /24

27 Verifying IP Addressing

28 Multi-layer Switches and Inter-VLAN Routing

29 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).

30 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.

31 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.

32 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 interface GigabitEthernet 0/0.10 description VLAN 10 encapsulation dot1Q 10 ip address interface GigabitEthernet 0/0.20 description VLAN 20 encapsulation dot1Q 20 ip address interface GigabitEthernet 0/0.30 description VLAN 30 encapsulation dot1Q 30 ip address interface GigabitEthernet 0/0.40 description VLAN 40 encapsulation dot1Q 40 ip address /24 /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, and Router on a stick is very simple to implement.

33 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

34 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

35 SVI VLAN 10 SVI VLAN 20 A B C D GW GW GW GW 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.

36 SVI VLAN 10 SVI VLAN 20 A B C D GW GW GW GW <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/ S1(config-if-range)# switchport access vlan 20 S1(config-if-range)# end

37 SVI VLAN 10 SVI VLAN 20 A B C D GW GW GW GW DLS1(config)# inter vlan 10 DLS1(config-if)# description Engineering VLAN DLS1(config-if)# ip address DLS1(config-if)# no shutdown DLS1(config)# inter vlan 20 DLS1(config-if)# description IT VLAN DLS1(config-if)# ip address

38 Alternative Configuration
SVI VLAN 10 SVI VLAN 20 A B C D GW GW GW GW Alternative Configuration

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

40 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

41 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.

42 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.

43 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

44 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 x 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

45 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 DLS1(config-if)# no shutdown DLS1(config)# inter vlan 10 DLS1(config-if)# description Engineering VLAN DLS1(config-if)# ip address DLS1(config)# inter vlan 11 DLS1(config-if)# description IT VLAN DLS1(config-if)# ip address

46 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 DLS2(config-if)# no shut DLS2(config)# inter vlan 21 DLS2(config-if)# description Administration VLAN DLS2(config-if)# ip address

47 Default Gateway (SVI) Statically or Dynamically assigned

48 Layer 3 Port Configuration – Physical Interfaces
DLS1(config)# interface gig 0/1 DLS1(config-if)# no switchport DLS1(config-if)# ip address DLS2(config)# interface gig 0/1 DLS2(config-if)# no switchport DLS2(config-if)# ip address 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

49 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

50 Verifying Verify IP addresses DLS1#show ip inter brief
Interface IP-Address OK? Method Status Protocol FastEthernet0/ YES manual up up GigabitEthernet0/ YES manual up up Vlan YES manual up up Vlan YES manual up up

51 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

52 SDM

53 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.

54 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: K number of IPv4 IGMP groups: K number of IPv4/MAC qos aces: k number of IPv4/MAC security aces: k

55 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

56 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: K number of IPv4 IGMP groups + multicast routes: K number of IPv4 unicast routes: K number of directly-connected IPv4 hosts: K number of indirect IPv4 routes: number of IPv6 multicast groups: k number of directly-connected IPv6 addresses: K number of indirect IPv6 unicast routes: number of IPv4 policy based routing aces: number of IPv4/MAC qos aces: k number of IPv4/MAC security aces: k number of IPv6 policy based routing aces: number of IPv6 qos aces: k number of IPv6 security aces: Media Description: Lab: Configuring Basic DHCPv4 on a Switch (from Switching, Chapter 7, Lab B) Reference: Switch and Router Output.docx

57 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 /24 and /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 S1(config-if)# interface vlan 2 S1(config-if)# ip address 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 /24 is variably subnetted, 2 subnets, 2 masks C /24 is directly connected, Vlan1 L /32 is directly connected, Vlan1 /24 is variably subnetted, 2 subnets, 2 masks C /24 is directly connected, Vlan2 L /32 is directly connected, Vlan2

58 Router Participating in
Routing with a Switch R1 has two IPv4 networks configured: Interface G0/1 has IP address /24 loopback interface Lo0 has IP address /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 /24 is variably subnetted, 2 subnets, 2 masks C /24 is directly connected, GigabitEthernet0/1 L /32 is directly connected, GigabitEthernet0/1 /24 is variably subnetted, 2 subnets, 2 masks C /27 is directly connected, Loopback0 L /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

59 Configuring a Static Route on a 2960
A default route is configured on S1 S1(config)# ip route 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 to network S* /0 [1/0] via /24 is variably subnetted, 2 subnets, 2 masks C /24 is directly connected, Vlan1 L /32 is directly connected, Vlan1 /24 is variably subnetted, 2 subnets, 2 masks C /24 is directly connected, Vlan2 L /32 is directly connected, Vlan2

60 Final Routing Table on Router
A static route to the remote network /24 (VLAN 2) is configured on R1 R1(config)# ip route 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 /24 is variably subnetted, 2 subnets, 2 masks C /24 is directly connected, GigabitEthernet0/1 L /32 is directly connected, GigabitEthernet0/1 S /24 is directly connected, GigabitEthernet0/1 /24 is variably subnetted, 2 subnets, 2 masks C /27 is directly connected, Loopback0 L /32 is directly connected, Loopback0

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


Download ppt "Inter-VLAN Routing."

Similar presentations


Ads by Google