How to assign default gateway for specific vlans.

ziaulhuqueziaulhuque Registered Users Posts: 1 ■□□□□□□□□□
I want to create 3 vlans in a switching network. For that i'm having 3 internet connections. how to assign the default gateway to specific Vlans separately for internet access.
which means default gateway should be...
for vlan1 172.16.4.1
for vlan2 172.16.4.2
for vlan3 172.16.4.3

Can anyone help me.
please reply to MODERATED

Comments

  • BroadcastStormBroadcastStorm Member Posts: 496
    On a Layer 3 switching you can assign each VLAN a SVI IP address, ip routing has to be enabled, check this great read.

    How To Configure InterVLAN Routing on Layer 3 Switches - Cisco Systems

    As far as having 3 separate Internet connectivity for 3 vlans I am not sure how to answer this, since in my opinion it will not be efficient, if you think about it not all internet usage on 3 separate vlans will be equal, they have what they call fail-over, or separate internet access for branch offices connecting via private line, then there's also redundancy for which this scenario is best used, you'll need to elaborate on your question more :)
  • jojopramosjojopramos Member Posts: 415
    If you are configuring your VLAN and these VLANs will communicate with each other through a router or a leyare 3 switch, no need for 3 internet connections. Just create and encapsulate subinterface if you are using a router and include the VLAN network to route or if it is a layer 3 switch, create svi if layer 3 switch and enable routing.
  • Fugazi1000Fugazi1000 Member Posts: 145
    I think you're confusing Layer 2 and Layer 3.

    Your VLANs (Layer 2) need unique subnets assigned - then you can define a route to each via your multiple local gateways.

    HTH
  • ColbyGColbyG Member Posts: 1,264
    You could use PBR, but I don't think you fully understand what you're asking about.
  • Bl8ckr0uterBl8ckr0uter Inactive Imported Users Posts: 5,031 ■■■■■■■■□□
    ColbyG wrote: »
    You could use PBR, but I don't think you fully understand what you're asking about.

    I think he means router on a stick or something.
  • jojopramosjojopramos Member Posts: 415
    My advice, before implementing a vlan network, read and study interVLAN routing first. Or better, read todd lamle''s 6th ed and vid from cbt nuggets to have a better understanding on routing and switches.

    my 2 cents...
  • ColbyGColbyG Member Posts: 1,264
    knwminus wrote: »
    I think he means router on a stick or something.

    Hmm, maybe. The way I read it, he's asking how do route differently based on source VLAN (address). But maybe not. Now when I read it, I think he might be asking about something that could be solved by DHCP. So who knows with this one.
Sign In or Register to comment.