Switches, Hubs, and Modems
cancel
Showing results for 
Search instead for 
Did you mean: 

Multiple Vlans on a 2650

VLAD21
Occasional Advisor

Multiple Vlans on a 2650

Hello,
I have one 2650. I want to create multiple Vlans on it but at the same time the Gateways for those vlans are different.

This is what is my current config :

ip default-gateway 192.168.0.1
vlan 3
ip address 192.168.0.2 255.255.255.0
untagged 1-24
exit


Now i want to create a new Vlan (vlan 4)whose default gateway is 192.168.1.1

Can anybody help?
How can i assign different gateways for two different Vlans?

6 REPLIES
cenk sasmaztin
Honored Contributor

Re: Multiple Vlans on a 2650

yess it is possible

your
ip default-gateway 192.168.0.1
it's not vlan gateway address

each vlan address to be already users default gateway address

for example

vlan 3
ip address 192.168.0.2 255.255.255.0

vlan 3 member pc address
ip address 192.168.0.10
subnet mask 255.255.255.0
default gateway address 192.168.0.2!!!!!

so if you don't asign on vlan ip address and connect different router on vlan in this way router lan ip address msut have user default gateway address










cenk

Marco Wessel
Valued Contributor

Re: Multiple Vlans on a 2650

This can't be done in the switch because it doesn't support policy routing. You must set the gateway on the pcs, use a separate switch or get a router that does policy routing.
Drew Redman
Valued Contributor

Re: Multiple Vlans on a 2650

You can't assign multiple default gateway addresses to the switch. Moreover, the default gateway setting doesn't have any impact on routing. It is only used for management traffic from off-subnet addresses.

You can create multiple vlans on the switch, assign an IP to each vlan, and enable ip routing. Then, the IP of each vlan will serve as your default gateway for devices in those vlans. Is that what you're looking for?
VLAD21
Occasional Advisor

Re: Multiple Vlans on a 2650

yes guys, i get your point. I think then i dont need the default gateway.
Is the following config right?

vlan 3
ip address 192.168.0.2 255.255.255.0
untagged 1-24

vlan 4
ip address 192.168.1.2 255.255.255.0
untagged 25-48




Then i will assign default gateways as the IP addresses of the vlan.
Then i dont think that i need IP routing..
Drew Redman
Valued Contributor

Re: Multiple Vlans on a 2650

Yes, your config is correct.

You will still need to have ip routing enabled on the switch in order to route traffic between the vlans.

No additional routing configuration is necessary since the vlans are directly connected, except for a default route that points to your upstream router.

ip route 0.0.0.0/0

The upstream router will also need a route pointing back to the 2650.
The Kitchen Support
Occasional Visitor

Re: Multiple Vlans on a 2650

I have a question that goes along with this issue. Assume you have multiple Layer 2 switches that are all connected in sequence. They are VLAN enabled, and the last switch in the chain trunks "VLAN3" through each of the other switches into the LAN port on the firewall, which is also configured as the VLAN3 port.

Also assume the following:
LAN subnet = 192.168.11.xxx/24
LAN gateway = 192.168.11.254

VLAN3 subnet = 192.168.12.xxx/24
VLAN3 gateway = ???

What is the required gateway for hosts connected to VLAN3 in order to pass through to the firewall and be send out of the network?