Different vlans and default gateways

nb-nb- Member Posts: 40 ■■□□□□□□□□
Hi

I'm so confused.. I have the following topology:



Alright so if i were to use only vlan 1 throughout the entire network. I would give the router interface an ip address of 192.168.1.254 while the core switch would be 192.168.1.1 with an ip default-gateway pointing to 192.168.1.254. The three access switches would be 192.168.1.2/3/4 all three with an ip default-gateway pointing to the core switch on 192.168.1.1 - Everybody should now be able to ping the core switch, and further out the router interface cause they all belong to the same network right?

What if i have vlan 10, 20, 30? I know im not supposed to give all my access layer switches an ip address in all three vlans as they only need an address for management. But how would i go about seperating these vlans but making sure they can all ping the router interface and further out to the internet? I can only set one ip default-gateway, to me that seems like i can only have one vlan access the router unless i configure router-on-a-stick which im not interested in. Does it have to be a layer 3 switch in order for multiple vlans to cross the link between the core switch and router? if yes how is it setup?
top.jpg 44.1K

Comments

  • Jon_CiscoJon_Cisco Member Posts: 1,772 ■■■■■■■■□□
    Router on a stick uses a single router connection at a site which is how I read you diagram. A layer 3 switch connected to the router would be able to route between the vlans for you.

    What are you attempting to demonstrate with this diagram? That might help us understand the requirements for your setup.
  • Magic JohnsonMagic Johnson Member Posts: 414
    Yep, ROAS or L3 switch as the core switch chucking all internet traffic to the router, make the core switch the other device's default gateway so the router only has to route the internet traffic.
  • OfWolfAndManOfWolfAndMan Member Posts: 923 ■■■■□□□□□□
    You'd need a dedicated SVI for each VLAN on your L3 switch. Make sure IP routing is enabled first. Also, you need to make sure you have your IP default gateway set on your L2 switch
    :study:Reading: Lab Books, Ansible Documentation, Python Cookbook 2018 Goals: More Ansible/Python work for Automation, IPSpace Automation Course [X], Build Jenkins Framework for Network Automation []
  • nb-nb- Member Posts: 40 ■■□□□□□□□□
    Perfect, thank you guys! But how would the configuration look like if the core switch was replaced with a layer 3 switch? I know it would need to be the default gateway for all three vlans so vlan 10,20,30 would look like this on the core switch: Vlan 10: 192.168.10.1 vlan 20: 192.168.20.1 vlan 30: 192.168.30.1 - But how do the access layer switches knows their default gateway for the respective vlan? I cant add more than one ip default-gateway.

    And how would you go on about routing traffic from the core switch to the router? place a /30 network between the core switch and router and add a default static route like this?: ip route 0.0.0.0 0.0.0.0 <outgoing interface> ?
  • CodeBloxCodeBlox Member Posts: 1,363 ■■■■□□□□□□
    Proxy ARP could do part of what you're originally asking. You wouldn't need a default gateway and should be able to ping your routers interface from each VLAN. It wouldn't work for traffic to the internet though.
    Currently reading: Network Warrior, Unix Network Programming by Richard Stevens
Sign In or Register to comment.