lab 6.4.1 intervlan routing

16
Lab 6.4.1: Basic Inter-VLAN Routing Topology Diagram All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 1 of 16

Upload: muhd-muizuddin

Post on 13-Apr-2017

132 views

Category:

Technology


6 download

TRANSCRIPT

Page 1: Lab 6.4.1 InterVLAN routing

Lab 6.4.1: Basic Inter-VLAN Routing

Topology Diagram

All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 1 of 14

Page 2: Lab 6.4.1 InterVLAN routing

CCNA ExplorationLAN Switching and Wireless: Inter-VLAN Routing Lab 6.4.1: Basic Inter-VLAN Routing

Addressing TableDevice

(Hostname) Interface IP Address Subnet Mask Default Gateway

S1 VLAN 99 172.17.99.11 255.255.255.0 172.17.99.1

S2 VLAN 99 172.17.99.12 255.255.255.0 172.17.99.1

S3 VLAN 99 172.17.99.13 255.255.255.0 172.17.99.1

R1 Fa 0/0 172.17.50.1 255.255.255.0 N/A

R1 Fa 0/1 See Interface Configuration Table N/A

PC1 NIC 172.17.10.21 255.255.255.0 172.17.10.1

PC2 NIC 172.17.20.22 255.255.255.0 172.17.20.1

PC3 NIC 172.17.30.23 255.255.255.0 172.17.30.1

Server NIC 172.17.50.254 255.255.255.0 172.17.50.1

Port Assignments – Switch 2 Ports Assignment Network

Fa0/1 – 0/5 802.1q Trunks (Native VLAN 99) 172.17.99.0 /24Fa0/6 – 0/10 VLAN 30 – Guest (Default) 172.17.30.0 /24Fa0/11 – 0/17 VLAN 10 – Faculty/Staff 172.17.10.0 /24Fa0/18 – 0/24 VLAN 20 - Students 172.17.20.0 /24

Interface Configuration Table – Router 1Interface Assignment IP Address

Fa0/1.1 VLAN1 172.17.1.1 /24Fa0/1.10 VLAN 10 172.17.10.1 /24Fa0/1.20 VLAN 20 172.17.20.1 /24Fa0/1.30 VLAN 30 172.17.30.1 /24Fa0/1.99 VLAN 99 172.17.99.1 /24

Learning Objectives Configuration of a switched LAN and router VLANs and VLAN Trunking Protocol (VTP) Router and 802.1q trunking on a Fast Ethernet interface Subinterfaces corresponding to the configured VLANs Inter-VLAN routing

All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 2 of 14

Page 3: Lab 6.4.1 InterVLAN routing

CCNA ExplorationLAN Switching and Wireless: Inter-VLAN Routing Lab 6.4.1: Basic Inter-VLAN Routing

Task 1: Prepare the Network

Step 1: Cable a network that is similar to the one in the topology diagram. The output shown in this lab is based on 2960 switches and an 1841 router.

Ethernet (10Mb) LAN interfaces on routers do not support trunking, and Cisco IOS software earlier than version 12.3 may not support trunking on Fast Ethernet router interfaces.

Step 2: Clear existing configurations on the switches.Clear NVRAM, delete the vlan.dat file, and reload the switches. After the reload is complete, use the show vlan command to confirm that only default VLANs exist and that all ports are assigned to VLAN 1.

Switch#show vlan

VLAN Name Status Ports---- -------------------------------- --------- -----------------------------1 default active Fa0/1, Fa0/2, Fa0/3, Fa0/4 Fa0/5, Fa0/6, Fa0/7, Fa0/8 Fa0/9, Fa0/10, Fa0/11, Fa0/12 Fa0/13, Fa0/14, Fa0/15,Fa0/16 Fa0/17, Fa0/18, Fa0/19,Fa0/20 Fa0/21, Fa0/22, Fa0/23,Fa0/24 Gig0/1, Gig0/21002 fddi-default active 1003 token-ring-default active 1004 fddinet-default active 1005 trnet-default active

Step 3: Disable all ports using the shutdown command.Use the interface range command. Repeat these commands on each switch in the topology.

interface range fa 0/1 - 24Switch(config)#interface range fa0/1-24Switch(config-if-range)#shutdownSwitch(config-if-range)#interface range gi0/1-2Switch(config-if-range)#shutdown

Task 2: Perform Basic Switch Configurations

Step 1: Configure the S1, S2, and S3 switches.Use the addressing table and the following guidelines:

Configure the switch hostname.

Disable DNS lookup.

Configure an enable secret password of class.

Configure a password of cisco for console connections.

Configure a password of cisco for vty connections.

Configure the default gateway on each switch

All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 3 of 14

Page 4: Lab 6.4.1 InterVLAN routing

CCNA ExplorationLAN Switching and Wireless: Inter-VLAN Routing Lab 6.4.1: Basic Inter-VLAN Routing

Output for S1 shownSwitch>enableSwitch#configure terminalEnter configuration commands, one per line. End with CNTL/Z.Switch(config)#hostname S1S1(config)#enable secret classS1(config)#no ip domain-lookupS1(config)#ip default-gateway 172.17.99.1 S1(config)#line console 0S1(config-line)#password ciscoS1(config-line)#loginS1(config-line)#line vty 0 15S1(config-line)#password ciscoS1(config-line)#loginS1(config-line)#end%SYS-5-CONFIG_I: Configured from console by consoleS1#copy running-config startup-config Destination filename [startup-config]? [enter]Building configuration...

Step 2: Re-enable the active user ports on S2 in access mode.

S2(config)#interface fa0/6S2(config-if)#switchport mode accessS2(config-if)#no shutdownS2(config-if)#interface fa0/11S2(config-if)#switchport mode accessS2(config-if)#no shutdownS2(config-if)#interface fa0/18S2(config-if)#switchport mode accessS2(config-if)#no shutdown

Task 3: Configure the Ethernet Interfaces on the Host PCsConfigure the Ethernet interfaces of PC1, PC2, PC3 and the remote TFTP/Web Server with the IP addresses from the addressing table.

Task 4: Configure VTP on the Switches

Step 1: Configure VTP on the three switches using the following table. Remember that VTP domain names and passwords are case-sensitive.

Switch Name VTP Operating Mode VTP Domain VTP Password

S1 Server Lab6 cisco

S2 Client Lab6 cisco

S3 Client Lab6 cisco

All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 4 of 14

Page 5: Lab 6.4.1 InterVLAN routing

CCNA ExplorationLAN Switching and Wireless: Inter-VLAN Routing Lab 6.4.1: Basic Inter-VLAN Routing

S1:S1(config)#vtp mode serverDevice mode already VTP SERVER.S1(config)#vtp domain Lab6Changing VTP domain name from NULL to Lab6S1(config)#vtp password ciscoSetting device VLAN database password to ciscoS1(config)#end

S2:S2(config)#vtp mode client................................

S3:S3(config)#vtp mode client................................

Step 2: Configure trunking ports and designate the native VLAN for the trunks.Configure Fa0/1 through Fa0/5 as trunking ports, and designate VLAN 99 as the native VLAN for these trunks. Use the interface range command.

S1(config)#interface range fa0/1 - 5S1(config-if-range)#switchport mode trunkS1(config-if-range)#switchport trunk native vlan 99S1(config-if-range)#no shutdownS1(config-if-range)#end

S2(config)# interface range fa0/1 - 5......................................................................S3(config)# interface range fa0/1 - 5...........................................................................

Step 3: Configure VLANs on the VTP server. Configure the following VLANS on the VTP server:

VLAN VLAN NameVLAN 99 managementVLAN 10 staffVLAN 20 studentsVLAN 30 guest

All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 5 of 14

Page 6: Lab 6.4.1 InterVLAN routing

CCNA ExplorationLAN Switching and Wireless: Inter-VLAN Routing Lab 6.4.1: Basic Inter-VLAN Routing

S1(config)#vlan 99S1(config-vlan)#name managementS1(config-vlan)#exitS1(config)#vlan 10S1(config-vlan)#name staffS1(config-vlan)#exitS1(config)#vlan 20 S1(config-vlan)#name studentsS1(config-vlan)#exitS1(config)#vlan 30S1(config-vlan)#name guestS1(config-vlan)#end

Verify that the VLANs have been created on S1 with the show vlan brief command.

Step 4: Verify that the VLANs created on S1 have been distributed to S2 and S3.Use the show vlan brief command on S2 and S3 to verify that the four VLANs have been distributed to the client switches.

S2#show vlan brief

VLAN Name Status Ports

---- -------------------------------- --------- -----------------------------1 default active Fa0/1, Fa0/2, Fa0/4, Fa0/5 Fa0/6, Fa0/7, Fa0/8, Fa0/9 Fa0/10, Fa0/11, Fa0/12,Fa0/13 Fa0/14, Fa0/15, Fa0/16,Fa0/17 Fa0/18, Fa0/19, Fa0/20,Fa0/21 Fa0/22, Fa0/23, Fa0/24, Gi0/1 Gi0/210 staff active20 students active30 guest active99 management active

Step 5: Configure the management interface address on all three switches. S1(config)#interface vlan 99S1(config-if)#ip address 172.17.99.11 255.255.255.0S1(config-if)#end

S2(config)#interface vlan 99S2(config-if)#ip address 172.17.99.12 255.255.255.0S2(config-if)#end

S3(config)#interface vlan 99S3(config-if)#ip address 172.17.99.13 255.255.255.0S3(config-if)#end

Verify that the switches are correctly configured by pinging between them. From S1, ping the management interface on S2 and S3. From S2, ping the management interface on S3.

Were the pings successful?

All pings should be successful.If not, troubleshoot the switch configurations and try again.

All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 6 of 14

Page 7: Lab 6.4.1 InterVLAN routing

CCNA ExplorationLAN Switching and Wireless: Inter-VLAN Routing Lab 6.4.1: Basic Inter-VLAN Routing

Step 6: Assign switch ports to VLANs on S2.Refer to the port assignments table at the beginning of the lab to assign ports to VLANs on S2.

S2(config)#interface range fa0/6-10S2(config-if-range)#switchport access vlan 30S2(config-if-range)#interface range fa0/11-17S2(config-if-range)#switchport access vlan 10S2(config-if-range)#interface range fa0/18-24S2(config-if-range)#switchport access vlan 20S2(config-if-range)#endS2#copy running-config startup-configDestination filename [startup-config]? [enter]Building configuration...[OK]

Step 7: Check connectivity between VLANs.Ping from PC1 (172.17.10.21) to PC2 (172.17.20.22). Ping from PC2 to PC3 (172.17.30.23).

Are the pings successful?

These pings are not successful.If not, why do these pings fail?

Each host is in a different VLAN. Because each VLAN is in a separate Layer 3 domain, packets need to be routed at Layer 3 between VLANs. We have not yet configured the devices with L3 capability.

Task 5: Configure the Router and the Remote Server LAN

Step 1: Clear the configuration on the router and reload.Router#erase nvram:Erasing the nvram filesystem will remove all configuration files! Continue? [confirm]Erase of nvram: completeRouter#reloadSystem configuration has been modified. Save? [yes/no]: no

Step 2: Create a basic configuration on the router. Configure the router with hostname R1. Disable DNS lookup. Configure an EXEC mode password of cisco. Configure a password of cisco for console connections. Configure a password of cisco for vty connections.

Step 3: Configure the trunking interface on R1. Enter subinterface configuration mode Establish trunking encapsulation Associate a VLAN with the subinterface Assign an IP address from the VLAN to the subinterface

All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 7 of 14

Page 8: Lab 6.4.1 InterVLAN routing

CCNA ExplorationLAN Switching and Wireless: Inter-VLAN Routing Lab 6.4.1: Basic Inter-VLAN Routing

R1(config)#interface fastethernet 0/1 R1(config-if)#no shutdown

R1(config-if)#interface fastethernet 0/1.1 R1(config-subif)#encapsulation dot1q 1 R1(config-subif)#ip address 172.17.1.1 255.255.255.0

R1(config-if)#interface fastethernet 0/1.10R1(config-subif)#encapsulation dot1q 10 R1(config-subif)#ip address 172.17.10.1 255.255.255.0

R1(config-if)#interface fastethernet 0/1.20R1(config-subif)#encapsulation dot1q 20 R1(config-subif)#ip address 172.17.20.1 255.255.255.0

R1(config-if)#interface fastethernet 0/1.30R1(config-subif)#encapsulation dot1q 30 R1(config-subif)#ip address 172.17.30.1 255.255.255.0

R1(config-if)#interface fastethernet 0/1.99R1(config-subif)#encapsulation dot1q 99 nativeR1(config-subif)#ip address 172.17.99.1 255.255.255.0

Note the following points in this configuration: The physical interface is enabled using theno shutdowncommand, because router interfaces are down by

default. The virtual interfaces are up by default. The subinterfacecan useany number that can be described with 32 bits, but it is good practice to assign the

number of the VLAN as the interfacenumber, as has been done here. The native VLAN is specified on the L3 deviceso that it is consistent with the switches. Otherwise, VLAN 1

wouldbe the native VLAN by default, and there would be no communication between the router and the management VLAN on the switches.

Confirm creation and status of the subinterfaceswith the show ip interface briefcommand:

R1#show ip interface briefInterface IP-Address OK? Method Status ProtocolFastEthernet0/0 unassigned YES unset administratively down downFastEthernet0/1 unassigned YES unset up upFastEthernet0/1.1 172.17.1.1 YES manual up upFastEthernet0/1.10 172.17.10.1 YES manual up upFastEthernet0/1.20 172.17.20.1 YES manual up upFastEthernet0/1.30 172.17.30.1 YES manual up upFastEthernet0/1.99 172.17.99.1 YES manual up up

Step 4: Configure the server LAN interface on R1.R1(config)# interface FastEthernet0/0R1(config-if)#ip address 172.17.50.1 255.255.255.0R1(config-if)#description server interfaceR1(config-if)#no shutdownR1(config-if)#end

All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 8 of 14

Page 9: Lab 6.4.1 InterVLAN routing

CCNA ExplorationLAN Switching and Wireless: Inter-VLAN Routing Lab 6.4.1: Basic Inter-VLAN Routing

There are now six networks configured. Verify that you can route packets to all six by checking the routing table on R1.

R1#show ip route<output omitted>

Gateway of last resort is not set

172.17.0.0/24 is subnetted, 6 subnetsC 172.17.50.0 is directly connected, FastEthernet0/0C 172.17.30.0 is directly connected, FastEthernet0/1.30C 172.17.20.0 is directly connected, FastEthernet0/1.20C 172.17.10.0 is directly connected, FastEthernet0/1.10C 172.17.1.0 is directly connected, FastEthernet0/1.1C 172.17.99.0 is directly connected, FastEthernet0/1.99

If your routing table does not show all six networks, troubleshoot your configuration.

Step 5: Verify Inter-VLAN routing.From PC1, verify that you can ping the remote server (172.17.50.254) and the other two hosts (172.17.20.22 and 172.17.30.23). It may take a couple of pings before the end-to-end path is established..

Are the pings successful?

These pings should be successful.If not, troubleshoot your configuration.

Task 6: ReflectionIn Task 5, it was recommended that you configure VLAN 99 as the native VLAN in the router Fa0/0.99 interface configuration. Why would packets from the router or hosts fail when trying to reach the switch management interfaces if the native VLAN were left in default?

The native VLAN is untagged. If the VLAN 99 traffic to the router is untagged (as it would be because that is native on the switches), the router cannot interpret the data because there is no VLAN information in the header as expected. In turn, the router tags all VLAN 99 traffic outbound, and leaves VLAN 1 data untagged, so the switches are unable to correctly interpret either. VLAN traffic to the other VLANs should not be affected by the assignment of the native VLAN.

All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 9 of 14

Page 10: Lab 6.4.1 InterVLAN routing

CCNA ExplorationLAN Switching and Wireless: Inter-VLAN Routing Lab 6.4.1: Basic Inter-VLAN Routing

Final ConfigurationsRouter 1 hostname R1!enable secret class!no ip domain lookup!interface FastEthernet0/0 ip address 172.17.50.1 255.255.255.0 no shutdown!interface FastEthernet0/1 no shutdown!interface FastEthernet0/1.1 encapsulation dot1Q 1 ip address 172.17.1.1 255.255.255.0!interface FastEthernet0/1.10 encapsulation dot1Q 10 ip address 172.17.10.1 255.255.255.0!interface FastEthernet0/1.20 encapsulation dot1Q 20 ip address 172.17.20.1 255.255.255.0!interface FastEthernet0/1.30 encapsulation dot1Q 30 ip address 172.17.30.1 255.255.255.0!interface FastEthernet0/1.99 encapsulation dot1Q 99 native ip address 172.17.99.1 255.255.255.0!<output omitted - serial interfaces not configured>!line con 0line aux 0line vty 0 4 login password cisco!

Switch 1 !hostname S1!enable secret class!no ip domain lookup!interface FastEthernet0/1 switchport trunk native vlan 99 switchport mode trunk!interface FastEthernet0/2 switchport trunk native vlan 99All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 10 of 14

Page 11: Lab 6.4.1 InterVLAN routing

CCNA ExplorationLAN Switching and Wireless: Inter-VLAN Routing Lab 6.4.1: Basic Inter-VLAN Routing

switchport mode trunk!interface FastEthernet0/3 switchport trunk native vlan 99 switchport mode trunk!interface FastEthernet0/4 switchport trunk native vlan 99 switchport mode trunk!interface FastEthernet0/5 switchport trunk native vlan 99 switchport mode trunk!<output omitted - all remaining ports in shutdown>!interface Vlan1 no ip address no ip route-cache!interface Vlan99 ip address 172.17.99.11 255.255.255.0 no shutdown!ip default-gateway 172.17.99.1ip http server!line con 0 logging synchronousline vty 0 4 login password ciscoline vty 5 15 login password ciscoSwitch 2 !hostname S2!enable secret class!no ip domain lookup!interface FastEthernet0/1 switchport trunk native vlan 99 switchport mode trunk!interface FastEthernet0/2 switchport trunk native vlan 99 switchport mode trunk!interface FastEthernet0/3 switchport trunk native vlan 99 switchport mode trunk!interface FastEthernet0/4 switchport trunk native vlan 99 switchport mode trunk!

All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 11 of 14

Page 12: Lab 6.4.1 InterVLAN routing

CCNA ExplorationLAN Switching and Wireless: Inter-VLAN Routing Lab 6.4.1: Basic Inter-VLAN Routing

interface FastEthernet0/5 switchport trunk native vlan 99 switchport mode trunk! interface FastEthernet0/6 switchport access vlan 30 switchport mode access!interface FastEthernet0/7 switchport access vlan 30!interface FastEthernet0/8 switchport access vlan 30!interface FastEthernet0/9 switchport access vlan 30!interface FastEthernet0/10 switchport access vlan 30!interface FastEthernet0/11 switchport access vlan 10 switchport mode access!interface FastEthernet0/12 switchport access vlan 10!interface FastEthernet0/13 switchport access vlan 10!interface FastEthernet0/14 switchport access vlan 10!interface FastEthernet0/15 switchport access vlan 10!interface FastEthernet0/16 switchport access vlan 10!interface FastEthernet0/17 switchport access vlan 10!interface FastEthernet0/18 switchport access vlan 20!interface FastEthernet0/19 switchport access vlan 20!interface FastEthernet0/20 switchport access vlan 20!interface FastEthernet0/21 switchport access vlan 20!interface FastEthernet0/22 switchport access vlan 20!interface FastEthernet0/23 switchport access vlan 20

All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 12 of 14

Page 13: Lab 6.4.1 InterVLAN routing

CCNA ExplorationLAN Switching and Wireless: Inter-VLAN Routing Lab 6.4.1: Basic Inter-VLAN Routing

!interface FastEthernet0/24 switchport access vlan 20!interface Vlan1 no ip address no ip route-cache!interface Vlan99 ip address 172.17.99.12 255.255.255.0 no shutdown!ip default-gateway 172.17.99.1ip http server!line con 0 password cisco logging synchronous loginline vty 0 4 password cisco loginline vty 5 15 password cisco login!end

Switch 3 !hostname S3!enable secret class!no ip domain lookup!interface FastEthernet0/1 switchport trunk native vlan 99 switchport mode trunk!interface FastEthernet0/2 switchport trunk native vlan 99 switchport mode trunk!interface FastEthernet0/3 switchport trunk native vlan 99 switchport mode trunk!interface FastEthernet0/4 switchport trunk native vlan 99 switchport mode trunk!interface FastEthernet0/5 switchport trunk native vlan 99 switchport mode trunk!<output omitted - all remaining ports in shutdown>!

All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 13 of 14

Page 14: Lab 6.4.1 InterVLAN routing

CCNA ExplorationLAN Switching and Wireless: Inter-VLAN Routing Lab 6.4.1: Basic Inter-VLAN Routing

interface Vlan99 ip address 172.17.99.13 255.255.255.0 no shutdown!ip default-gateway 172.17.99.1ip http server!control-plane!line con 0 password cisco loginline vty 0 4 password cisco loginline vty 5 15 password cisco login!end

All contents are Copyright © 1992–2007 Cisco Systems, Inc. All rights reserved. This document is Cisco Public Information. Page 14 of 14