The Bryant Advantage Bulldog Blog

Chris Bryant's Facebook Fan Page

Join Me On Twitter For CCNA and CCNP Updates!

Over 500,000 Views On Our Video Training Channel!

Subscribe To My RSS Feed!

Network With Me On Linkedin!

 

 
 
 
 
 

 

CCNP SWITCH Exam 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 SWITCH exam, and 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.

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

Let's create those two SVIs...

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

Let's head to the next installment of this CCNP SWITCH exam tutorial on routed ports!