cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
167
Views
5
Helpful
7
Replies
Beginner

Inter-VLAN Routing query

Hi all,

I created 2 different VLANS(vlan 30 and vlan 40) on a layer 3 switch.  Layer 3 is being connected to the router via trunk port. Allowed vlan 30 and vlan 40.

I have enabled dot1q command on my router for both this vlans defining the default gateway. Please take note, I have already defined the same default gateway in the layer 3 switch too, in the SVI. (int vlan 30 and int vlan 40).

I dont understand why am not able to ping from my vlan 30 to vlan 40. I understand it works if we enable ip routing in layer 3 switch.

On my attached diagram you can see, I have created vlan 10 and vlan 20 on a layer 2 switch. Inter vlan routing happens as long as I have defined the gateway in the router using dot1q command

This really confuses me. Can somebody help me to clarify this?
 iv.PNG

Thank You.

Regards,
Fyaz

7 REPLIES 7
Highlighted
Beginner

Re: Inter-VLAN Routing query

Hi, can you clarify where do you configure the SVI? In the L3 Switch or in the router? Can you share the configuration of the devices with the trouble?

Beginner

Re: Inter-VLAN Routing query

Hi Eduard,

I configured the SVI in layer 3 switch. Is there a need to define SVI in router? since I have already created a sub interface and defined the dot1q command with the default gateway of each VLANs.


Layer 3 Switch Config:

interface FastEthernet0/1
switchport access vlan 30
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/2
switchport access vlan 40
switchport mode access
switchport nonegotiate
!
interface FastEthernet0/3
switchport trunk allowed vlan 30,40
switchport mode trunk
switchport nonegotiate
!
!
!
!
interface Vlan1
no ip address
shutdown
!
interface Vlan30
mac-address 0009.7c39.5201
ip address 192.168.30.1 255.255.255.0
!
interface Vlan40
mac-address 0009.7c39.5202
ip address 192.168.40.1 255.255.255.0
!
!
!
end

Router Config:
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
!
interface GigabitEthernet0/0.1
encapsulation dot1Q 30
ip address 192.168.30.1 255.255.255.0
!
interface GigabitEthernet0/0.2
encapsulation dot1Q 40
ip address 192.168.40.1 255.255.255.0
!
!
!
end


Please advise and help.

Thanks,
Fyaz

Beginner

Re: Inter-VLAN Routing query

You have duplicated IP addresses on switch and router. In your design, which device is gonna make the routing? the switch or the router? 

Beginner

Re: Inter-VLAN Routing query

Hi Eduard,

Just figured out there are duplicate IP address. I would like my switch to do the routing. so in that case, i will remove the dot1q command on router? and enable ip routing in layer 3 switch?

And is there any way, I can perform routing between my router 0(on left hand side) directly to layer 3 switch? The only purpose I created router, is for the serial port.

Please advise.

Thanks,
Fyaz 

Beginner

Re: Inter-VLAN Routing query

Yes, you can connect the router directly to the L3 switch, the easiest way (imho) is to make anothe subinterface with 802.1q on the router, asign one IP to the router and other to the switch in the same network, and make the proper static routes.

Beginner

Re: Inter-VLAN Routing query

Great! thanks alot Eduard for all the advice! :)
VIP Expert

Re: Inter-VLAN Routing query

Hi,

Since the switches on the left side are 2960s and they only support layer-2, the simplest design for the scenario is to use the switches on the left and on the right as layer-2 only.  Than have a trunk from each switch to the router, configure sub-interfaces on each router for the proper vlans, and a /30 subnet between the 2 routers.  You can then use static routes on the routers or run a dynamic routing protocol.

For this design, static routes are sufficant. You also need an IP address on each switch for management.

So, you creat an SVI for one of the vlans on the switch and give it an IP address (not the same ip as the router).  This way you can use that IP to manage the switches via telnet or SSH.

HTH

CreatePlease to create content
Content for Community-Ad
July's Community Spotlight Awards