Get My Exclusive FREE 7-Part Report,
"How To Pass The CCNA", Daily FREE
Cisco And CompTIA Exam Questions,
And All The Latest Certification News
In My Daily Newsletter!

Privacy Policy

Name:
Email:
  More Testimonials >
Visit my blog for free daily Cisco CCNA and CCNP certification questions, my latest free articles and tutorials, and more!


 

Cisco CCNP Certification Tutorial:

Multilayer Switching, SVIs, and Inter-VLAN Communication

By Chris Bryant, CCIE #12933

The use of switched virtual interfaces (SVIs) is an important topic on the CCNP BCMSN exam, but SVIs are becoming more and more common in today's networks - so it's a good idea for all of us to know how they're used and how to configure them, even if we're not studying for a certification exam. Let's take a look at how SVIs allow inter-VLAN communication without the use of a separate L3 device.

Multilayer switches allow us to create a logical interface that represents the VLAN. Remember that the L2 switches you've worked with that have an "interface VLAN1" by default? That's actually a switched virtual interface (SVI).

An SVI exists for VLAN 1 by default, but that's the only VLAN that has a "pre-created" SVI. On a multilayer switch, such a logical interface can be configured for any VLAN.

MLS(config)#interface vlan 10

MLS(config-if)#ip address 10.1.1.1 255.255.255.0

Let's put SVIs to work with a basic interVLAN routing configuration.

 

Switched Virtual Interface (SVI)

 

To allow these two hosts to communicate, you know that we've got to have an L3 device - and now we have a different kind of L3 device than you've used before. This L3 switch will allow interVLAN communication without involving a router.

Before we begin configuring, we'll send pings between the two hosts. (In this example, I'm using Cisco routers for hosts, but there are no routes of any kind on them.)

HOST_1#ping 30.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 30.1.1.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

HOST_3#ping 20.1.1.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 20.1.1.1, timeout is 2 seconds:
.....
Success rate is 0 percent (0/5)

As expected, neither host can ping the other. Let's fix that!

To get started, we'll put the port leading to Host 1 into VLAN 11, and the port leading to Host 3 in VLAN 33.

SW1(config)#int fast 0/1
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 11

SW1(config-if)#int fast 0/3
SW1(config-if)#switchport mode access
SW1(config-if)#switchport access vlan 33

We're going to create two SVIs on the switch, one representing VLAN 11 and the other representing VLAN 33. Note that both SVIs show as up/up immediately after creation. Some Cisco and non-Cisco documentation mentions that you should open the SVIs after creating them, but that's not necessarily the case in the real world. Couldn't hurt, though. :)

SW1(config)#int vlan11

01:30:04: %LINK-3-UPDOWN: Interface Vlan11, changed state to up01:30:05: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan11, changed state to up

SW1(config-if)#ip address 20.1.1.11 255.255.255.0

SW1(config-if)#int vlan33

01:30:11: %LINK-3-UPDOWN: Interface Vlan33, changed state to up

01:30:12: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan33, changed state to up

SW1(config-if)#ip address 30.1.1.11 255.255.255.0

Verify the SVIs with show interface vlan. I'll only show the top three rows of output for each SVI.

SW1#show int vlan11
Vlan11 is up, line protocol is up
Hardware is EtherSVI, address is 0012.7f02.4b41 (bia 0012.7f02.4b41)
Internet address is 20.1.1.11/24

SW1#show int vlan33
Vlan33 is up, line protocol is up
Hardware is EtherSVI, address is 0012.7f02.4b42 (bia 0012.7f02.4b42)
Internet address is 30.1.1.11/24

Note the hardware for those interfaces - "EtherSVI".

Now let's check that routing table...

SW1# show ip route
Default gateway is not set

Host Gateway Last Use Total Uses Interface
ICMP redirect cache is empty

Hmm, that's not good. We don't have one! There's a simple reason, though - on L3 switches, we need to enable IP routing, because it's off by default!

Step One In L3 Switch Troubleshooting: Make Sure IP Routing Is On!

SW1(config)#ip routing
SW1(config)#^Z

SW1#show ip route
Codes: 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, E - EGP
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

Gateway of last resort is not set

20.0.0.0/24 is subnetted, 1 subnets
C 20.1.1.0 is directly connected, Vlan11
30.0.0.0/24 is subnetted, 1 subnets
C 30.1.1.0 is directly connected, Vlan33

Now that looks like the routing table we've come to know and love! In this particular case, there's no need to configuring a routing protocol. You recall from your CCNA studies that when router-on-a-stick is configured, the IP address assigned to the router's subinterfaces should be the default gateway setting on the hosts.

When SVIs are in use, the default gateway set on the hosts should be the IP address assigned to the SVI that represents that host's VLAN. After setting this default gateway on the hosts, the hosts can now successfully communicate.

Since we're using routers for hosts, we'll use the ip route command to set the default gateway.

HOST_1(config)#ip route 0.0.0.0 0.0.0.0 20.1.1.11

HOST_3(config)#ip route 0.0.0.0 0.0.0.0 30.1.1.11

Can the hosts now communicate, even though they're in different VLANs?

HOST_1#ping 30.1.1.1

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

HOST_3#ping 20.1.1.1

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

Yes, they can! We now have hosts in different VLANs communicating without a router involved - all thanks to multilayer switches and SVIs.

Ports on multilayer switches can also be configured as routing ports, and have IP addresses assigned directly to them. Click that link to be taken to the second part of my exclusive "Introduction To Mulilayer Switching" series!

To your success,

Chris Bryant

CCIE #12933

chris@thebryantadvantage.com

 

 

The Ultimate CCNA Study Package | The Ultimate CCNA Study Guide

Binary Math And Subnetting Mastery

Cisco Rack Rentals

CCNP BSCI Exam Study Package

CCNP BCMSN Exam Study Package

CCNP BCRAN Exam Study Package

CCNP CIT Exam Study Package | CCNP BSCI Exam Study Guide

CCNA CBT Video Boot Camp | CCNP BSCI Video Boot Camp

Cisco Training Tutorials And Cisco Certification Articles

CCNP CBT BCMSN Video Boot Camp | CCNP CBT BCRAN Video Boot Camp

CompTIA Network+ Exam Study Package

CompTIA Security+ Exam Study Package

CompTIA A + Certification Exam Study Package

CCNA Training Store | CCNP Certification Training Store

CompTIA Certification Training Store

Cisco Lab Router And Switch Home Lab Help

Site Map | Home Page | Testimonials

Microsoft Windows Vista Certification Updates And News

The Bryant Advantage Blog | About Chris Bryant, CCIE #12933