1

I am trying to create 2 vlans- 10 and 20 where 10 is for user and 20 is for DMZ. vlan 30 created is to link between vlans 10 and 20.

Right now I'm only able to ping user from vlan to their switch and not to the opposite switch below are my config. Any help is much appreciated! 2 l3 switch topo

Switch1:

vlan 10
name user

vlan 20
name dmz

vlan 30
name link

interface Vlan10
 ip address 10.100.20.1 255.255.255.0

interface Vlan30
 ip address 192.168.30.1 255.255.255.252

ip route 155.140.254.0 255.255.255.0 192.168.30.2 


interface FastEthernet0/1

switchport access vlan 10

switchport mode access


interface FastEthernet0/2

switchport trunk allowed vlan 30

switchport trunk encapsulation dot1q

switchport mode trunk

Switch2:

vlan 10
name user

vlan 20
name dmz

vlan 30
name link

interface Vlan20
 ip address 155.140.254.1 255.255.255.0

interface Vlan30
 ip address 192.168.30.2 255.255.255.252


interface FastEthernet0/1

switchport access vlan 20

switchport mode access


interface FastEthernet0/2

switchport trunk allowed vlan 30

switchport trunk encapsulation dot1q

switchport mode trunk



ip route 10.100.20.0 255.255.255.0 192.168.30.1 

My IP Route for switch 1:

     10.0.0.0/24 is subnetted, 1 subnets    
C       10.100.20.0 is directly connected, Vlan10    
     155.140.0.0/24 is subnetted, 1 subnets    
S       155.140.254.0 [1/0] via 192.168.30.2    
     192.168.30.0/30 is subnetted, 1 subnets    
C       192.168.30.0 is directly connected, Vlan30

switch 2:

     10.0.0.0/24 is subnetted, 1 subnets    
S       10.100.20.0 [1/0] via 192.168.30.1    
     155.140.0.0/24 is subnetted, 1 subnets    
C       155.140.254.0 is directly connected, Vlan20    
     192.168.30.0/30 is subnetted, 1 subnets    
C       192.168.30.0 is directly connected, Vlan30

I have configured both with ip routing. Are my routes correct?

1
  • Did any answer help you? If so, you should accept the answer so that the question doesn't keep popping up forever, looking for an answer. Alternatively, you could provide and accept your own answer.
    – Ron Maupin
    Commented Aug 15, 2017 at 5:33

4 Answers 4

1

Your setup with a routed link between the switches should work fine, but you need to check two more points:

  1. Make sure you have enabled interVLAN routing on both switches:

    switch(config)# ip routing

  2. Make sure you have set a default gateway on each PC (10.100.20.1 for PC2, 155.140.254.1 for PC3).

You can check whether your switches are routing properly by checking the routing table:

switch# show ip route

The routing table on both switches must include routes to the 10.100.20.0, 192.168.30.0, and 155.140.254.0 networks.

1
  • added my ip route in my thread.
    – Wen Qi
    Commented Nov 21, 2016 at 8:12
1

Get rid of VLAN 30 called "link". It's not necessary and is complicating your config.

Normally, one does inter-VLAN routing on the main/core switch only. In such a topology, you configure interface VLAN 10 and VLAN 20 on the main switch, each having an IP address which is the default gateway for each subnet. Done. Disable IP routing on the other switch but put an IP address on it for management purposes only.

If you insist on doing interVLAN routing on both switches, you need to configure HSRP or VRRP so that interVLAN routing works if a single switch fails.

0

If you are routing on your layer-3 switches, I would advise that you not use a VLAN as a point-to-point link between the switches. Treat these as a pair of routers:

Switch 1:

no interface Vlan30
!
interface FastEthernet0/2
 no switchport
 ip address 192.168.30.1 255.255.255.252

Switch 2:

no interface Vlan30
!
interface FastEthernet0/2
 no switchport
 ip address 192.168.30.2 255.255.255.252
0

Ron, the routes on your switches look fine. As RobinG said:

Make sure you have set a default gateway on each PC (10.100.20.1 for PC2, 155.140.254.1 for PC3).

I think that is likely the issue.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.