Cisco internal VLAN setup with access to public network

ciscovlan

I have a Cisco 4948 switch that I'm dividing in half (half public, half private VLAN for NAS access). On the public side, Gi1/0 is the up-stream connection to the router, and G1/0-23 are configured in VLAN1 and designed for public access. Public IPs are xx.47.90.0/24, with a gateway of xx.47.90.1 (which lives on the router … and is assigned to a separate VLAN on the router)

Ports G1/24-48 are designed VLAN2 and setup for private access. The private network is defined as 10.1.40.0/24. I've added 10.1.40.1 to the VLAN2 interface, and am using it as the default gateway for servers only on the private network (as well as the management IP for the switch).

Everything works, as long as servers have two NICs, they can reach both networks. My issue is servers that are ONLY on the private the private VLAN can't reach the public network. So my question(s)

1) Should I be using 10.1.40.1 as the gateway for servers only on the private network? Or should I be using the public gateway (xx.47.90.1) even though the only IP assigned to the server is in the private range?
2) Is there a configuration needed on VLAN2 (private) to allow it to access the public network? All the documentation I've seen was written for routers where the public IP lived on the device. Basically what I want to do is route all traffic to the public gateway xx.47.90.1 except 10.1.40.0/24

Best Answer

Have you assigned an ip address to both the VLAN1 and VLAN2 interfaces on the switch? Have you enabled ip routing on the switch? If not, you need to.

http://www.cisco.com/c/en/us/support/docs/lan-switching/inter-vlan-routing/41860-howto-L3-intervlanrouting.html

If your goal is to allow hosts in VLAN1 and VLAN2 to communicate with each other and only for hosts in VLAN 1 to have internet access then you should only need to configure an appropriate ip address to the VLAN1 and VLAN2 interfaces and to enable ip routing on the switch.

If you also need hosts in VLAN2 to have internet access then there are a few more configurations needed on the switch and the router.