07-10-2012 12:39 PM - edited 03-04-2019 04:55 PM
Dear boss
I have cisco 3845 router and 4507 & 2960 switch. I have 4 Vlans on 4507 and connected to router on four ports. Its working fine.
Now i want to create another vlan ( vlan 15 ) that trunk with vlan 20 and router port f0/0/1. i.e router F 0/0/1 ports belongs only two vlan(15,20) and need to intervlan routing. My conf. given below. but it is not working.
Switch conf:
interface GigabitEthernet3/1
description ## to router##
switchport trunk encapsulation dot1q
switchport trunk allowed vlan 15-21
switchport mode trunk
interface Vlan15
ip address 192.168.3.250 255.255.255.0
!
interface Vlan20
ip address 192.168.0.250 255.255.255.0
interface GigabitEthernet3/2
description ## To local lan-15 ##
switchport acc vlan 15
interface GigabitEthernet3/3
description ## To Local lan-20 ##
switch port acc vlan 20
ip route 0.0.0.0 0.0.0.0 192.168.0.252
Router conf:
interface FastEthernet0/0/1
ip address 192.168.0.252 255.255.255.0
ip flow ingress
ip flow egress
ip nat outside
ip virtual-reassembly
duplex auto
speed auto
ntp broadcast
standby 4 ip 192.168.0.254
standby 4 priority 140
standby 4 preempt
standby 4 track GigabitEthernet0/1
standby 4 track FastEthernet0/0/0
standby 4 track GigabitEthernet0/0
!
interface FastEthernet0/0/1.2
encapsulation dot1Q 15
ip address 192.168.3.252 255.255.255.0
How can i do intervlan routing as ping from vlan 15 to 20.
shahid
Solved! Go to Solution.
07-10-2012 01:05 PM
Configure some router subinterface for encapsulation dot1Q 20
Anyway since you have a layer3 switch, it is better to configure inter-vlan routing there and not on the router.
07-10-2012 01:17 PM
HI Shahid,
I am agree with Paolo.
you have to configure subinterfaces for encapsulation.
see the example:If you are configuring on Router
Create sub-interfaces, set 802.1Q trunking protocol and ip address on each sub-interface
Router(config)#interface f0/0
Router(config-if)#no shutdown
(Note: The main interface f0/0 doesn’t need an IP address but it must be turned on)
Router(config)#interface f0/0.0
Router(config-subif)#encapsulation dot1q 15
Router(config-subif)#ip address 192.168.15.1 255.255.255.0
Router(config-subif)#interface f0/0.1
Router(config-subif)#encapsulation dot11 20
Router(config-subif)#ip address 192.168.20.1 255.255.255.0
(Note: In the “encapsulation dot1q 15″ command, 15 is the VLAN ID this interface operates in)
Configure VLAN
Switch(config)#vlan 15
Switch(config-vlan)#name SALES
Switch(config-vlan)#vlan 20
Switch(config-vlan)#name TECH
Set ports to access mode & assign ports to VLAN
Switch(config)#interface range fa0/1
Switch(config-if)#no shutdown
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 15
Switch(config-if)#interface range fa0/3
Switch(config-if)#no shutdown
Switch(config-if)#switchport mode access
Switch(config-if)# switchport access vlan 20
see the example:If you are configuring on layer 3 switch:
ip routing
!
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 20
switchport mode access
interface Vlan15
ip address 192.168.15.1 255.255.255.0
!
interface Vlan20
ip address 192.168.20.1 255.255.255.0
And on hosts just assign IP addresses and default gateways (to the corresponding interface VLANs) -> hosts in different VLANs can communicate.
Regards
Please rate if it helps
07-10-2012 01:05 PM
Configure some router subinterface for encapsulation dot1Q 20
Anyway since you have a layer3 switch, it is better to configure inter-vlan routing there and not on the router.
07-10-2012 01:17 PM
HI Shahid,
I am agree with Paolo.
you have to configure subinterfaces for encapsulation.
see the example:If you are configuring on Router
Create sub-interfaces, set 802.1Q trunking protocol and ip address on each sub-interface
Router(config)#interface f0/0
Router(config-if)#no shutdown
(Note: The main interface f0/0 doesn’t need an IP address but it must be turned on)
Router(config)#interface f0/0.0
Router(config-subif)#encapsulation dot1q 15
Router(config-subif)#ip address 192.168.15.1 255.255.255.0
Router(config-subif)#interface f0/0.1
Router(config-subif)#encapsulation dot11 20
Router(config-subif)#ip address 192.168.20.1 255.255.255.0
(Note: In the “encapsulation dot1q 15″ command, 15 is the VLAN ID this interface operates in)
Configure VLAN
Switch(config)#vlan 15
Switch(config-vlan)#name SALES
Switch(config-vlan)#vlan 20
Switch(config-vlan)#name TECH
Set ports to access mode & assign ports to VLAN
Switch(config)#interface range fa0/1
Switch(config-if)#no shutdown
Switch(config-if)# switchport mode access
Switch(config-if)# switchport access vlan 15
Switch(config-if)#interface range fa0/3
Switch(config-if)#no shutdown
Switch(config-if)#switchport mode access
Switch(config-if)# switchport access vlan 20
see the example:If you are configuring on layer 3 switch:
ip routing
!
interface FastEthernet0/1
switchport access vlan 10
switchport mode access
!
interface FastEthernet0/3
switchport access vlan 20
switchport mode access
interface Vlan15
ip address 192.168.15.1 255.255.255.0
!
interface Vlan20
ip address 192.168.20.1 255.255.255.0
And on hosts just assign IP addresses and default gateways (to the corresponding interface VLANs) -> hosts in different VLANs can communicate.
Regards
Please rate if it helps
07-10-2012 01:38 PM
Mr. Sandeep
Thank you very much for such clear concept with example.
shahid
07-10-2012 01:12 PM
Hi Shahid,
Agree with Paolo, from ur post i have this impression that u r mostly using Gigabit switched interfaces, doing intervlan routing on a "Router on a stick" fashion with Fastethernet interfaces could seriously slow down ur network. use the Layer 3 Capability.
Hope it Helps,
Soroush.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide