What is Nvio Cisco

What is Cisco Switch Virtual Interface (SVI) - Configuration Example and Explanation

Achieving convergence in computer networks is something that is controlled by both routers and switches in the network. The basic purpose of creating a computer network is to share resources and offer communication between hosts.

Local Area Network (LAN) communication deals with switches, while internetwork connectivity (i.e. between different LANs or WANs) requires the use of a router.

Layer 2 VLANs create what is known as a single broadcast domain, which simply means that when a broadcast message is sent within the same Layer2 VLAN, all the devices connected to that vlan (either on the same or separate switches) will receive the message.

Also, hosts connected in the same Layer 2 vlan can communicate with each other without any Layer 3 device required. However, devices that are not on the same VLAN cannot communicate with each other without some form of routing implemented.

This brings the need for network segmentation and inter-vlan communication, which can be achieved by using a router or a Layer 3 switch.

Using a router for network segmentation means each interface on the router becomes a network segment of its own, or what is known as a separate broadcast domain.

In order for this goal to be achieved using Layer 3 switches, multiple Layer 2 VLANs are created on the switch, which separate everything into multiple broadcast domains. Then, for each Layer2 vlan you need to create a corresponding Layer3 interface on the switch which will handle the routing functionality. This Layer3 interface is the SVI.

What is Switch Virtual Interface (SVI)?

Since each VLAN is an isolated network segment of it's own, layer 3 switches need to be configured in such a way to allow inter VLAN communication.

The modus operandi of SVIs is simple. You start by creating the Layer 2 VLAN on the switch, and then assign an IP address on the VLAN Layer3 interface (SVI), just as you would on a physical router interface.

The major difference here is that the SVI Layer 3 interface is virtual. This also means clients that are connected to that VLAN will make use of the SVI interface as their default gateway.

A default SVI is created on the layer 3 switches for VLAN 1 (default native vlan), which is meant for remote management of switches. This implies that an IP address can be assigned to this interface for the purpose of management.

SVI configuration example

Now let's see a brief configuration example for creating two SVIs on a layer 3 switch based on the network diagram above.

Keep in mind that the switch has to be a layer 3 switch, in order for this to be achieved.

The configuration example shown below assumes that you already know how to carry out basic switch configuration such as changing hostnames, going to global configuration mode, interface configuration mode, and assigning IP address on an interface.

VLAN 10

SWITCH (config) #vlan 10 <- first create the Layer2 VLAN 10
SWITCH (config) #interface vlan 10<- now create the SVI for VLAN 10
SWITCH (config-if) #description WORKSTATIONS
SWITCH (config-if) #ip address 10.0.0.1 255.255.255.0<- assign IP to the SVI

The first line in the example above creates the layer 2 VLAN 10. The following line creates an SVI for VLAN 10 (i.e. the Layer3 interface). Although the third line is OPTIONAL, it is recommended that you add an interface description, which will assist in understanding the purpose of the SVI. The last line assigns an IP address on the SVI created for VLAN 10 - in this case. Two SVIs are created for the Workstations and Server VLANS as shown in the configuration example here.

The following commands are the same as above for creating SVI for VLAN 20.

VLAN 20

SWITCH (config) #vlan 20 <- create Layer 2 VLAN 20
SWITCH (config) #interface vlan 20<- now create the SVI for VLAN 20
SWITCH (config-if) #description SERVERS
SWITCH (config-if) #ip address 10.0.1.1 255.255.255.0<- assign IP to the SVI

The need for SVIs

Having VLANs on a network simply means each VLAN is a different network segment with a different network address subnet.

Although inter VLAN communication can be achieved using a router with multiple interfaces, SVIs come with less complexities.

With the router configuration, all inter VLAN connections are handled either by a single physical router interface (“router-on-a-stick”), or multiple physical interfaces.

Sub-interfaces can also be created under a single physical interface of the router to hold the IP addresses of each VLAN.

On the other hand, using SVIs on Layer3 switches becomes more efficient in terms of achieving fast convergence on the network and also for simplifying network management and operation (all Layer2 and Layer3 functionality is handled by the same Layer3 switch).

Filed Under: Cisco Switches