113.xx.xx.1220.xx.xx.1system-view
# WAN1
interface GigabitEthernet 0/1
ip address 113.xx.xx.xx 255.255.255.0
nat outbound
quit
# WAN2
interface GigabitEthernet 0/2
ip address 220.xx.xx.xx 255.255.255.0
nat outbound
quit
# 默认路由(所有流量先走WAN1)
ip route-static 0.0.0.0 0.0.0.0 113.xx.xx.1 preference 60
# WAN2 做备份
ip route-static 0.0.0.0 0.0.0.0 220.xx.xx.1 preference 70
vlan 1
port GigabitEthernet 0/4 to 0/5 # 2台电脑在VLAN1
quit
interface Vlan-interface 1
ip address 192.168.1.1 255.255.255.0
quit
vlan 2
port GigabitEthernet 0/6 to 0/8 # 4台电脑在VLAN2
quit
interface Vlan-interface 2
ip address 192.168.2.1 255.255.255.0
quit
# 1. 定义ACL:匹配VLAN2网段
acl number 3001
rule permit ip source 192.168.2.0 0.0.0.255
quit
# 2. 建策略路由:让ACL3001的流量走WAN2
policy-based-route PBR_VLAN2 permit node 10
if-match acl 3001
apply next-hop 220.xx.xx.1 # WAN2网关
quit
# 3. 在VLAN2接口上应用策略路由
interface Vlan-interface 2
ip policy-based-route PBR_VLAN2
quit
save
暂无评论
亲~登录后才可以操作哦!
确定你的邮箱还未认证,请认证邮箱或绑定手机后进行当前操作
举报
×
侵犯我的权益
×
侵犯了我企业的权益
×
抄袭了我的内容
×
原文链接或出处
诽谤我
×
对根叔社区有害的内容
×
不规范转载
×
举报说明
暂无评论