1

I'm trying to establish inter vlan connectivity, but I can't figure out how to do this in my network. I'd be glad if someone could advice me what should I do. Below I depicted my network topology:

HOST_A (VLAN 100, 1/0/2)            HOST_B (VLAN 100, 1/0/2)
10.0.0.2/25                         10.0.0.3/25
10.0.0.130/25                       10.0.0.131/25
            SWITCH_L3_A <-> SWITCH_L3_B 
                                    HOST_C (VLAN 101, 1/0/3)
                                    10.0.1.2/24

My configuration looks, more or less, like this:

SWITCH_L3_A:

ip routing
vlan 100
 name my-vlan
!
interface vlan 100
 ip address 10.0.0.1 255.255.255.0
!
interface GigabitEthernet1/0/2
 switchport access vlan 100
 switchport mode access
!

interface GigabitEthernet1/0/24
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 100, 101 (and some other vlans)
 switchport mode trunk
!

SWITCH_L3_B:

ip routing
vlan 100
 name my-vlan-100
!
vlan 101
 name my-vlan-101
!
interface Vlan101
 ip address 10.0.1.1 255.255.255.0
!
interface GigabitEthernet1/0/2
 switchport access vlan 100
 switchport mode access
!
interface GigabitEthernet1/0/3
 switchport access vlan 101
 switchport mode access
!
interface GigabitEthernet1/0/24
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 100 (and some other vlans)
 switchport mode trunk
!

I want to ping from HOST_B 10.0.0.131 to HOST_C 10.0.1.2 but I'm not able to do that.

--- Edited on 02-05-2016, 15:10 ---

Is there any other solution than mentioned by JFL? I'd like to keep both switches to serve as L3.

3
  • You should not cross post to multiple SE sites, Pick one and delete the others.
    – Ron Maupin
    May 2 '16 at 13:12
  • I edited my answer for a solution to keep both switches as L3.
    – JFL
    May 2 '16 at 20:06
  • 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
    Aug 14 '17 at 2:14
1

You have at least 2 issues here :

  • VLAN 101 is not allowed on switch B trunk port (interface GigabitEthernet1/02/24)

  • you use 2 routers (layer 3 switchs) each one having an IP address in only one VLAN

For a router to route packet between two networks, it must be connected to both networks.

Basic configuration
For a simple configuration do the following

On switch A set:

interface Vlan101
 ip address 10.0.1.1 255.255.255.0

On switch B :

no ip routing
!
interface VLAN101  
  no ip address
!
interface GigabitEthernet1/0/24  
 switchport trunk allowed vlan 100, 101 (and some other vlans)

The result will be that the switch A will route between VLANs 100 & 101.

Advanced Configuration
If you want to keep both switch as Layer 3 and use switch A as gateway for VLAN 100 and switch B as gatewat for VLAN 101, then you need to add a network between switch A and B

In the example below I add a VLAN 1001 with a /30 network that will be used to route between both switches, then I add a static route on each switch so it knows where to find the other network.

Switch A

ip routing  

interface Vlan100  
 ip address 10.0.0.1 255.255.255.0  

interface vlan1001  
 ip address 172.16.1.1 255.255.255.252

interface GigabitEthernet1/0/24
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 100, 101,1001
 switchport mode trunk

ip route 10.0.1.0 255.255.255.0 172.16.1.2

Switch B

ip routing  

interface Vlan101  
 ip address 10.0.1.1 255.255.255.0  

interface vlan1001  
 ip address 172.16.1.2 255.255.255.252

interface GigabitEthernet1/0/24
 switchport trunk encapsulation dot1q
 switchport trunk allowed vlan 100, 101,1001
 switchport mode trunk

ip route 10.0.0.0 255.255.255.0 172.16.1.1

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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