cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
397
Views
0
Helpful
4
Replies

Routing VLAN to switch connected port without direct router connection

Federico77
Level 1
Level 1

Hello gents,

I have the following topology: Cisco SG350 switch with a VLAN3 connected to another switch. This second switch is connected to a router. As an example, my VLAN3 on the Cisco switch has an addressing of 192.168.30.1/24 while the second switch offers the IP  192.168.1.160/24 and a default gw of 192.168.1.14.

What I would like to do is to route any device connected to the VLAN3 ports of the Cisco switch to the gateway provided by the other switch which is actually connected to the main router. Should be obvious at this point that I cannot configure trunking on the router nor on the switch directly connected to it.

As you may guess I failed so far although it seemed an innocent task.

What do you think?

To help you to further understand I have these configurations (snippets) on the Cisco:

interface vlan 3
name "Main Network"
ip address 192.168.3.1 255.255.255.0
!
interface GigabitEthernet1
ip address 192.168.1.160 255.255.255.0
no switchport
!
interface GigabitEthernet2
switchport access vlan 2
!
ip default-gateway 192.168.1.14

Otherwise said: GigabitEthernet2 connected device in my mind should be routed to 192.168.1.14 but this is not happening. Curiously enough sending a ping command from the Cisco switch works just fine both pinging public internet and anything else I might have connected to the VLAN.

Thank you very much for any help,

 

4 Replies 4

Hello,

A couple of things. What makes you think anything in VLAN 2 should be routed to the 1.14 DG? What’s the IP scheme of VLAN 2?

-Is the config snippet you provided from 1 CISCO switch or combination of both? If both please say which is which.

-The DG you provided in the switch is the switches DG and not generally individual devices connected to it in separate VLANs.

 

please provide the config of all 3 devices to better assist.

 

-David

Hello David and thanks for your reply.

I never referred to VLAN2 so I believe you are talking about the VLAN3 I described. If this is the case, VLAN3 is a 192.168.3.0/24 network.

The other generic switch is on 192.168.1.0/24 and, as per the example, it is offering a DHCP address of 192.168.1.160/24 and a gw of 192.168.1.14. This switch connection is available on gi1.

The third device is a simple PC connected on gi2 to the Cisco switch I am configuring. Its IP address is part of the VLAN3 network so something like 192.168.3.2.

To clarify, I don't have any access to the non Cisco switch configurations so the only thing I can do on those regards is to use what it is provinding on the RJ45 I connected to gi1.

Thank you,
Federico

Joseph W. Doherty
Hall of Fame
Hall of Fame

"Should be obvious at this point that I cannot configure trunking on the router nor on the switch directly connected to it."

Ah, perhaps not so obvious as we can configure trunking on Cisco routers, although on routers we don't call it a trunk but an interface with subinterfaces (one per VLAN).

What is a bit confusing is your usage of VLANs and networks.  Could you clarify or provide configurations for all three devices?

Hello Joseph, thanks for your support.

Let me clarify: the goal here is to be able to use the Cisco switch to reach an external network using the other "generic" switch connection I have available (connected to gi1 of the Cisco) while also having the option to use a different address range on the devices connected to the Cisco.

As said on another reply to David, the only device I can configure is the Cisco and the edge devices. I can't control the generic switch but only accept what is offering: a DHCP address in the range of 192.168.1.0/24 and a gw that is 192.168.1.14.

There is not much more that is useful than what I posted in the startup-config.

To sum up:
- I have a non manageable switch that offers 192.168.1.160/24 and gw 192.168.1.14 connected to gi1 port of the Cisco switch;
- gi1 of the Cisco is configured as "no switchport";
- gi2 of the Cisco is configured as part of VLAN3 with a 192.168.3.0/24 network. A simple PC is connected here;

All this given:
- the PC on gi2 can ping its gateway on VLAN3 (192.168.3.1) and can also ping the IP 192.168.1.160 but can't ping the 192.168.1.14 DG.
- the Cisco switch (from console) can ping everything including the DG and any external network routed through it.

I hope this is clearer...

Thank you very much,
Federico

Review Cisco Networking for a $25 gift card