- Inter vlan
- Switch virtual interface SVI
How inter VLAN works:
Inter VLAN communicate different VLANs via sub interfaces that we have create on router for each VLANs. When Host A in VLAN 10 needs to communicate with Host B in VLAN 10, it sends a packet addressed to that host. Switch A forwards the packet directly to Host B, without sending it to the router.
When Host A in VLAN 10 sends a packet to Host B in VLAN 20, Switch forwards the packet to the router, which receives the traffic on the VLAN 10 interface sub interface and forwards this to sub interface for VLAN 20.
To implement interVLAN on gns3 I use the follow simple topology. In which R1 have two sub interfaces int f0/0.10 and int f0/0.20 for VLANs 10 and 20 respectively. And we use only two PC, one belong to VLAN 10 and other to 20.
Configuration for Router R1:
R2(config)#interface f0/0
R2(config-if)#no shutdown
R2(config-subif)#interface f0/0.20
R2(config-subif)#encapsulation dot1Q 20
R2(config-subif)#ip address 20.1.1.1 255.255.255.0
R2(config-subif)#interface f0/0.10
R2(config-subif)#encapsulation dot1Q 10
R2(config-subif)#ip address 10.1.1.1 255.255.255.0
Configuration for Switch:
SW#vlan database
SW(vlan)#vlan 10 name office1
SW(vlan)#vlan 20 name office2
SW(vlan)#exit
SW(config)#interface f1/0
SW(config-if)#no shutdown
SW(config-if)#switchport mode trunk
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:$ 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:$ 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 versaRouter on stick in Packet Tracer
Heloo after configuring vlans, i do a 'show vlans' and it says no vlans configured
ReplyDeletehelp!!!!
ReplyDeletetry "show vlan-switch" instead of show vlan....
ReplyDeleteThanks Waqas
ReplyDeletewelcome :)
ReplyDeleteI sometimes prefer a VLAN configuration since it can save space in the office.
ReplyDeleteHi, I´m trying to configure the above scenario but when I get to the f1/0 link between switch and router there is no switchport command available to set it up. Did i miss anything ? btw I´m using the 3640 ios for switch.
ReplyDeleteI was trying to configure VLAN with switch and Router. I have used VLAN 1 and 2 and successfully configured VLAN in switch. But I can't configure VLAN in Router.
ReplyDelete"interface fastethernet 0/1.1
^
%invalid inpute detected"
IP address of VPCs - 192.168.1.1/24 and 192.168.2.1/24
Hi, I´m trying to make this scenario on GNS3 1.4 but when drag switch and connect cable to pc from switch and from switch to router then i make ping from pc to router doesn't work
ReplyDeleteI am facing the same problem
ReplyDeleteHi, I´m trying to configure the above scenario but when I get to the f1/0 link between switch and router there is no switchport command available to set it up. Did i miss anything ? btw I´m using the 3640 ios for switch. anyone resolved it?
Interressant
ReplyDelete