Switch virtual interfaces
A switch virtual interface (or SVI) is a logical interface that is associated with a VLAN and supports routing and switching protocols.
You can assign an IP address to the SVI to enable routing between VLANs. For example, SVIs can route between two different VLANs connected to a switch (no need to connect through a layer-3 router).
Configuring a switch virtual interface
Using the GUI:
- Go to System > Network > Interface > VLAN.
- Select Add VLAN.
- Enter a name for the interface.
- Select internal from the Interface drop-down list.
- Enter a VLAN identifier in the VLAN ID field.
- Select Static for the mode and enter an IP address and netmask in the IP/Netmask field.
- Select the administration status.
- Select PING, SSH, and TELNET for the Access options.
- Select Add.
Using the CLI:
Create a system interface. Give it an IP subnet and an associated VLAN:
config system interface
edit <system interface name>
set ip <IP address and mask>
set vlanid <vlan>
set allowaccess ping ssh telnet
Example SVI configuration
The following is an example CLI configuration for SVI static routing.
In this configuration, Server-1 is connected to switch Port1, and Server-2 is connected to switch Port2. Port1 is a member of VLAN 4000, and Port2 is a member of VLAN 2. Port1 is the gateway for Server-1, and port2 is the gateway for Server-2.
NOTE: For simplicity, assume that both port1 and port are on same switch.
- Configure the native VLANs for Port 1 and Port 2:
config switch interface
edit port1
set native-vlan 4000
edit port2
set native-vlan 2
end
- Create L3 system interfaces that correspond to Port 1 (VLAN 4000) and Port 2 (VLAN 2):
config system interface
edit vlan4000
set ip 192.168.11.1/24
set vlanid 4000
set allowaccess ping ssh telnet
next
edit vlan2
set ip 192.168.10.1/24
set vlanid 2
set allowaccess ping ssh telnet
end
Viewing the SVI configuration
Display the status of SVI configuration using following command:
show system interface [ <system interface name> ]