1
I have a router that has 4 VLANs configured, with an interface on each vlan, the router serves as a gateway and provides internet access.
VLAN | Interface | Function --------------------------------------- 1 | 192.168.1.1/24 | DMZ 2 | 192.168.2.1/24 | Phones 3 | 192.168.3.1/24 | Work Stations 4 | 192.168.4.1/24 | Servers
The router has a single cable connecting it to a Cisco 3750 (Gi1/0/1), this connection is setup as an 802.11q trunk.
Other than the trunk port, the other ports on the switch are split among the 4 VLANs.
VLAN | Interface -------------------- 1 | Gi1/0/2-6 2 | Gi1/0/7-12 3 | Gi1/0/13-18 4 | Gi1/0/19-24
How can I set up the switch so that all VLANs have internet access, via there respective gateways on the router. While still allowing any required inter-vlan communication to occur on the switch itself?
The inter-vlan communication I require is as follows:
from | to -------------- 2 | 1 3 | 1 4 | 1
I would prefer to run the DHCP server on the Cisco switch, but if necessary I can run it on the router.
A switch is simply not a router. – Julie Pelletier – 2016-05-14T06:06:39.577
@JuliePelletier But it is a layer 3 switch: System image file is "flash:c3750-advipservicesk9-mz.122-35.SE5.bin" – James – 2016-05-14T06:10:55.577
I don't have access to such a switch to check it fully but I think http://www.cisco.com/c/en/us/td/docs/switches/lan/catalyst3750/software/release/12-2_55_se/configuration/guide/scg3750/swfallbk.html could help you.
– Julie Pelletier – 2016-05-14T06:15:58.367It's hard to give you a useful answer without understanding a lot more about your setup. For example, does the router that provides Internet access have routes to all these subnets? Can it NAT for them? And so on. – David Schwartz – 2016-05-14T06:30:41.497
@DavidSchwartz Yes the router can NAT for the subnet. It could provide full DHCP to the subnet, or I could add static routes as necessary. – James – 2016-05-14T06:35:29.750
@JamesG Then it sounds like there's really nothing special you need to do except configure DHCP. – David Schwartz – 2016-05-14T23:31:34.460
@DavidSchwartz But If I configure DHCP on the router then any inter-vlan traffic will pass through the router, I want the inter-vlan traffic to occur on the switch only. – James – 2016-05-16T00:44:28.473
@JamesG Where DHCP is configured has no effect on where the traffic goes. How DHCP is configured determines that. – David Schwartz – 2016-05-16T00:55:11.530
@DavidSchwartz So how can I configure the the DHCP on the router to achieve inter vlan routing on the switch while still routing each VLANs internet traffic via their respective gateways. I don't think it is possible, I think I the solution is to use Policy Based Routing, but I need to read up on it. – James – 2016-05-17T06:37:18.037
@JamesG No, you don't need policy based routing. Why do you think it makes any difference where the DHCP server runs? Just make sure that each DHCP offer includes the correct default gateway. (You will need a DHCP server in each VLAN, so if the router is only on VLAN, it can't be the DHCP server for the other VLANs, without proxying.) – David Schwartz – 2016-05-17T07:17:09.733
@DavidSchwartz But what I am trying to do is effectively have two default gateways for the PC. Use the switch as the gateway if the traffic is destined for another vlan, use the router for the default gateway when the destination is the internet. Obviously the DHCP can't be configured to serve up two default gateways, so the problem becomes, how can I have different routing rules per vlan? Set the default gateway to the switch, then use PBR to alter the routes according to VLAN? – James – 2016-05-17T20:19:57.717
@JamesG This is what ICMP redirects are for. Unless you break it, it will "just work". – David Schwartz – 2016-05-17T21:30:20.903
There is no such thing as 802.11q. I think you mean 802.1q. – Ron Maupin – 2016-06-15T22:42:07.877