Take the 2-minute tour ×
Server Fault is a question and answer site for system and network administrators. It's 100% free, no registration required.

I want to be able to route between two vlans that I have created and I am not sure how to go about it.

So I have created,

VLAN 5 with IP Address 192.168.5.1/24 and
VLAN 10 with IP Address 192.168.0.1/24  //main IP addresses that I use. 

How would I be able to get (for example) the IP Address 192.168.0.144 to see any ip addresses in 192.168.5.1/24?

Also do you have to set a default gateway for each VLAN or do you set the default gateway for the switch.

share|improve this question

1 Answer 1

up vote 1 down vote accepted

The hosts on each network would need to know that they should talk to the Switch's IP to route traffic to the other network. There's a variety of ways to do this, but the easiest are:

  1. Set the default gateway of machines on each subnet to be x.x.x.1 (the Switch's IP). And let the switch do all the routing. If you have a router to goes to the Internet then the switch needs to be aware of this route (as it's default) so that clients can still get to the Internet.

  2. Set a static route on the routers on each subnet so that traffic for the other subnet gets routed to the Switch. Say 192.168.0.0/24 has a router already at .254; on .254 configure a static route destination 192.168.5.0/24 by 192.168.0.1; and similarly for the other router(s).

  3. Set static routes on all hosts involved in the same way as #2 (just on every host instead of the default routers on each subnet).

These would be the most common ways. The first is likely the easiest, but with the least granular control of routing (without using ACLs or multiple routing tables).

share|improve this answer

Your Answer

 
discard

By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.