Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

traffic of vlans to internet

Hi

i have 5 vlans configured and two links to internet (172.17.6.254 and 172.17.6.253) i need that vlan 2 and 3 go to internet through 172.17.6.254 and vlan 4 and 5 through 172.17.6.253 how can i do this?

1 ACCEPTED SOLUTION

Accepted Solutions
Hall of Fame Super Blue

Re: traffic of vlans to internet

Eduardo

Policy Based Routing will do this.

vlan 2 = 192.168.5.0/24

vlan 3 = 192.168.6.0/24

vlan 4 = 192.168.7.0/24

vlan 5 = 192.168.8.0/24

access-list 101 deny ip 192.168.5.0 0.0.0.255 192.168.6.0 0.0.0.255

access-list 101 deny ip 192.168.5.0 0.0.0.255 192.168.7.0 0.0.0.255

access-list 101 deny ip 192.168.5.0 0.0.0.255 192.168.8.0 0.0.0.255

access-list 101 deny ip 192.168.6.0 0.0.0.255 192.168.5.0 0.0.0.255

access-list 101 deny ip 192.168.6.0 0.0.0.255 192.168.7.0 0.0.0.255

access-list 101 deny ip 192.168.6.0 0.0.0.255 192.168.8.0 0.0.0.255

access-list 101 permit ip 192.168.5.0 0.0.0.255 any

access-list 101 permit ip 192.168.6.0 0.0.0.255 any

access-list 102 deny ip 192.168.7.0 0.0.0.255 192.168.5.0 0.0.0.255

access-list 102 deny ip 192.168.7.0 0.0.0.255 192.168.6.0 0.0.0.255

access-list 102 deny ip 192.168.7.0 0.0.0.255 192.168.8.0 0.0.0.255

access-list 102 deny ip 192.168.8.0 0.0.0.255 192.168.5.0 0.0.0.255

access-list 102 deny ip 192.168.8.0 0.0.0.255 192.168.6.0 0.0.0.255

access-list 102 deny ip 192.168.8.0 0.0.0.255 192.168.7.0 0.0.0.255

access-list 102 permit ip 192.168.7.0 0.0.0.255 any

access-list 102 permit ip 192.168.8.0 0.0.0.255 any

route-map PBR permit 10

match ip address 101

set ip next-hop 172.17.6.254

route-map PBR permit 20

match ip address 102

set ip next-hop 172.17.6.253

int vlan 2

ip policy route-map PBR

int vlan 3

ip policy route-map PBR

int vlan 4

ip policy route-map PBR

int vlan 5

ip policy route-map PBR

Jon

2 REPLIES
Hall of Fame Super Blue

Re: traffic of vlans to internet

Eduardo

Policy Based Routing will do this.

vlan 2 = 192.168.5.0/24

vlan 3 = 192.168.6.0/24

vlan 4 = 192.168.7.0/24

vlan 5 = 192.168.8.0/24

access-list 101 deny ip 192.168.5.0 0.0.0.255 192.168.6.0 0.0.0.255

access-list 101 deny ip 192.168.5.0 0.0.0.255 192.168.7.0 0.0.0.255

access-list 101 deny ip 192.168.5.0 0.0.0.255 192.168.8.0 0.0.0.255

access-list 101 deny ip 192.168.6.0 0.0.0.255 192.168.5.0 0.0.0.255

access-list 101 deny ip 192.168.6.0 0.0.0.255 192.168.7.0 0.0.0.255

access-list 101 deny ip 192.168.6.0 0.0.0.255 192.168.8.0 0.0.0.255

access-list 101 permit ip 192.168.5.0 0.0.0.255 any

access-list 101 permit ip 192.168.6.0 0.0.0.255 any

access-list 102 deny ip 192.168.7.0 0.0.0.255 192.168.5.0 0.0.0.255

access-list 102 deny ip 192.168.7.0 0.0.0.255 192.168.6.0 0.0.0.255

access-list 102 deny ip 192.168.7.0 0.0.0.255 192.168.8.0 0.0.0.255

access-list 102 deny ip 192.168.8.0 0.0.0.255 192.168.5.0 0.0.0.255

access-list 102 deny ip 192.168.8.0 0.0.0.255 192.168.6.0 0.0.0.255

access-list 102 deny ip 192.168.8.0 0.0.0.255 192.168.7.0 0.0.0.255

access-list 102 permit ip 192.168.7.0 0.0.0.255 any

access-list 102 permit ip 192.168.8.0 0.0.0.255 any

route-map PBR permit 10

match ip address 101

set ip next-hop 172.17.6.254

route-map PBR permit 20

match ip address 102

set ip next-hop 172.17.6.253

int vlan 2

ip policy route-map PBR

int vlan 3

ip policy route-map PBR

int vlan 4

ip policy route-map PBR

int vlan 5

ip policy route-map PBR

Jon

New Member

Re: traffic of vlans to internet

thanks Jon, now is working

129
Views
0
Helpful
2
Replies