Need helpd configuring my C2 switch for internet access + VLANs

  • 0
  • 1
  • Question
  • Updated 3 years ago
  • Answered
Hello!
I would really appreciate your help.
I got a C2 switch from a friend, and this will be my DHCP/router

I already configured 2 VLANS
VLAN 10 = 192.168.10.0 255.255.255.0 / Router Interface IP 192.168.10.254
VLAN 20 = 192.168.20.0 255.255.255.0 / Router Interface IP 192.168.20.254
C2 Switch/Router IP 192.168.0.100 255.255.255.0 (gateway not set)

IPs from the DHCP VLAN 10 has the gateway (interface IP) 192.168.10.254
IPs from the DHCP VLAN 20 has the gateway (interface IP) 192.168.20.254

Now I want to set up internet access via my DSL modem (192.168.1.1)

How can I accomplish that?
I can't use my modem as a gateway for the switch ("IP address and gateway do not lie on the same subnet")

Thank you so much in advance for your help.
Tom
Photo of Traktuner

Traktuner

  • 100 Points 100 badge 2x thumb

Posted 3 years ago

  • 0
  • 1
Photo of mp2014

mp2014

  • 1,058 Points 1k badge 2x thumb
setup a vlan 30, put the dsl modem into that van, configure an interface for vlan 30 as e.g. 192.168.1.2, set a default route to 192.168.1.1
(Edited)
Photo of Traktuner

Traktuner

  • 100 Points 100 badge 2x thumb
Thank you for your help mp2014!

i made the vlan 30 and the ip route.
Do I need another route that the traffic from the internet gets back to the right vlan/destination computer, or should this work only with the route 0.0.0.0 0.0.0.0 192.168.1.1?

Thanks again!!
Photo of Andre K.

Andre K.

  • 356 Points 250 badge 2x thumb
You will not need additional routes, as the C2 will already know where to send the traffic for its directly connected networks.
Photo of Traktuner

Traktuner

  • 100 Points 100 badge 2x thumb
Thanks so much for your help!
Photo of Traktuner

Traktuner

  • 100 Points 100 badge 2x thumb
Hello!
Now I had finally the time to test the configuration with a functional DSL modem.

I have 3 interfaces: VLAN 10, 20 (Clients) and VLAN 30 (DSL modem).

But the problem is that I can not ping any internet-IPs.
DSL Modem has the IP 192.168.1.1 (added to VLAN 30 TAGGED, Interface IP 192.168.1.254)
On my notebook I get the correct DHCP IP 192.168.10.2 (Interface IP 192.168.10.254 which is also DNS and router IP)
Default route (router configuration mode) 0.0.0.0 0.0.0.0 192.168.1.1
But I always get a "no response" error when I ping for example 8.8.8.8
Did I miss something?
Internet access directly connected to the modem is OK.

Seems like the configured standard route to 192.168.1.1 is not working. But I can't figure out why.

Thanks again for the much appreciated help!
Photo of Christoph

Christoph

  • 1,812 Points 1k badge 2x thumb
try to ping from router context of the C2.
First the IP of your modem.
Secondly an Internet IP.
If you get an answer, than you probably forgot to set routes for vlan 10 and 20 on your modem.

If you get no answer check whether all interfaces of the C2 are up."show IP interface"