Configuring a Cisco 3560G Layer 3 Switch for Dual Internet Access with VLANs, ACLs, and Policy Routing
This guide details how to set up a Cisco 3560G three‑layer switch to support two groups with separate internet exits by defining VLANs, assigning IP addresses, creating ACLs, configuring route‑maps, and applying policy routing to direct traffic through the appropriate upstream routers.
The environment consists of two groups (Group1 and Group2) that each need to access the Internet through separate external links. The core device is a Cisco 3560G three‑layer switch with four VLANs: VLAN10/VLAN20 for Group1 and VLAN30/VLAN40 for Group2. The two access routers have LAN IPs 10.10.10.254 (Group1) and 10.10.20.254 (Group2).
VLAN interfaces are created with the following IP subnets:
VLAN10 ip address 172.16.10.1/24VLAN20 ip address 172.16.20.1/24VLAN30 ip address 172.16.30.1/24VLAN40 ip address 172.16.40.1/24Layer‑3 (routed) ports are configured on the switch:
3560#conf t3560(config)#int g0/13560(config-if)#no switchport// define as routed port 3560(config-if)#ip address 10.10.10.1 255.255.255.0 // IP for Group1
3560(config-if)#int g0/23560(config-if)#no switchport3560(config-if)#ip address 10.10.20.1 255.255.255.0// IP for Group2
Extended ACLs are defined for each VLAN to block traffic destined for the internal 172.16.0.0/16 network and the opposite group's subnet, while permitting all other traffic. Example for VLAN10:
3560(config)#ip access-list extended vlan10acl2map3560(config-ext-nacl)#deny ip 172.16.10.0 0.0.0.255 172.16.0.0 0.0.255.2553560(config-ext-nacl)#deny ip 172.16.10.0 0.0.0.255 10.10.0.0 0.0.255.2553560(config-ext-nacl)#permit ip 172.16.10.0 0.0.0.255 anySimilar ACLs (vlan20acl2map, vlan30acl2map, vlan40acl2map) are created for the other VLANs.
Route‑maps are then defined to match the corresponding ACL and set the next‑hop address. For VLAN10 and VLAN20 the next hop is 10.10.10.254 (Group1’s router); for VLAN30 and VLAN40 the next hop is 10.10.20.254 (Group2’s router):
3560(config)#route-map vlan10map3560(config-route-map)#match ip address vlan10acl2map3560(config-route-map)#set ip next-hop 10.10.10.254... (similar commands for vlan20map, vlan30map, vlan40map) ...
Finally, policy routing is applied to each VLAN interface to bind the appropriate route‑map:
3560(config)#int vlan 103560(config-if)#ip policy route-map vlan10map3560(config)#int vlan 203560(config)#ip policy route-map vlan20map3560(config)#int vlan 303560(config)#ip policy route-map vlan30map3560(config)#int vlan 403560(config)#ip policy route-map vlan40mapThese configurations enable each group’s traffic to be routed out through its designated Internet gateway while keeping internal traffic isolated.
Signed-in readers can open the original source through BestHub's protected redirect.
This article has been distilled and summarized from source material, then republished for learning and reference. If you believe it infringes your rights, please contactand we will review it promptly.
How this landed with the community
Was this worth your time?
0 Comments
Thoughtful readers leave field notes, pushback, and hard-won operational detail here.
