---
# System prepended metadata

title: Cisco - switched virtual interface
tags: [cisco, network]

---

# Cisco - switched virtual interface

###### tags: `cisco` `network`

When setup VLAN in Cisco layer 3 switch, you need to create switched virtual interface (SVI) so that the host in different VLAN are able to communicate each other.

In Cisco, the VLAN interface is the "switched virtual interface".

Configuration example:
```
1. create two vlan
vlan database
vlan1
vlan2

2. assign gi0/1-gi0/6 to vlan1
interface range gi0/1 - gi0/6
switchport mode access
switchport access vlan1

3. assign gi0/7-gi012 to vlan2
interface range gi0/7 - gi0/12
switchport mode access
switchport access vlan2

4. setup IP to SVI
interface vlan1
ip address <interface IP> <subnet mask>
interface vlan2
ip address <interface IP> <subnet mask>

5. add routing between VLAN
ip route <net_ip> <subnet_mask> <gateway_ip>
```