Switch virtual interface SVI configuration on gns3







A switch virtual interface (SVI) is a VLAN of switch ports represented by one interface to a routing or bridging system. There is no physical interface for the VLAN and the SVI provides the Layer 3 processing for packets from all switch ports associated with the VLAN.

How Switch virtual interface SVI  works:

This is much simpler than inter VLAN, but disadvantage is high cost of a layer-3 switch.
In SVI configuration we need a layer-3 switch, I use a 3640 router IOS and use the NM-16ESW module for layer-3 switching. The topology I used for switch virtual interface (SVI) is consist of one switch and two hosts one of them is in VLAN 10 and other is in VLAN 20. I have create two switch virtual interface s(SVI) on switch for VLAN 10 and 20, which are responsible for communicating these two VLANs.

 
Configuration for Switch:
SW#vlan database
SW(vlan)#vlan 10 name office1
SW(vlan)#vlan 20 name office2
SW(vlan)#exit
SW(config-if)#interface vlan 10
SW(config-if)#ip address 10.1.1.1 255.255.255.0
SW(config-if)#no shu
SW(config-if)#interface vlan 20
SW(config-if)#ip address 20.1.1.1 255.255.255.0
SW(config-if)#exit
SW(config)#ip routing
SW(config-if)#interface f0/0
SW(config-if)#no shutdown
SW(config-if)# switchport mode access
SW(config-if)# switchport access vlan 10
SW(config-if)#interface f0/1
SW(config-if)#no shutdown
SW(config-if)#switchport mode access
SW(config-if)# switchport access vlan 20

Configuration for Qemu1
tc@box:$ sudo su 
root@box:$ Ifconfig eth0 10.1.1.2 netmask 255.255.255.0
root@box:$ Route add default gw 10.1.1.1 eth0

Configuration for Qemu2
tc@box:$ sudo su 
root@box:$ Ifconfig eth0 20.1.1.2 netmask 255.255.255.0
root@box:$ Route add default gw 20.1.1.1 eth0

Results:
Ping from qemu1 to qemu2 is successful and voice versa.



Thanks. 

14 comments:

  1. hi i m your biggest fan... i like your blog..

    this is very informative .. appreciate.. Superb...

    and thanks again ..

    keep it up..

    ReplyDelete
  2. unable to ping qemu1 to qemu2 host

    ReplyDelete
  3. that's a good one so far do you have any switch topology for Juniper

    Thanks

    ReplyDelete
  4. @(unable to ping qemu1 to qemu2 host)

    Make sure u have completed above configuration and create SVI for yr VLANs .. thanks

    ReplyDelete
  5. @ (that's a good one so far do you have any switch topology for Juniper)

    thanks for visiting, i ll create such lab in near future..

    ReplyDelete
  6. hi author, i got through all the procedures you are showing here however, when i got to this point:
    SW(config-if)#interface f0/0
    SW(config-if)#no shutdown
    SW(config-if)# switchport mode access

    there is no such command as switchport...! i tried this SW(config-if)# ? and SW(config-if)#sw? but theres none. What have i done wrong, i used the same image for 3640 you specified in your ealier post. I would greatly appreciate your help. thanks

    ReplyDelete
    Replies
    1. please make sure you have use NM-16ESW module...!

      Delete
  7. you know i typed all the configurations, but till now the 2 pcs are not reachable

    ReplyDelete
  8. Replies
    1. u r surly missing something..kindly check again.

      Delete
  9. what if we used 2 switches, each vlan in different switch , how the configuration looks like?

    ReplyDelete
  10. Nice lab, I was able to ping GWs and hosts.

    Thx

    -DP

    ReplyDelete