F1050双线物理断线自动切及PBR应用---多VLAN多出口线路实用
[F1050-acl-adv-3000]dis cur
#
version 7.1.054, Ess 9308P05
#
sysname F1050
#
context Admin id 1
#
telnet server enable
#
irf mac-address persistent timer
irf auto-update enable
undo irf link-delay
irf member 1 priority 1
#
ip unreachables enable
ip ttl-expires enable
#
dhcp enable
#
password-recovery enable
#
vlan 1
#
dhcp server ip-pool Lan
gateway-list 192.168.1.1
network 192.168.1.0 mask 255.255.255.0
dns-list 202.99.166.4 222.222.222.222
forbidden-ip 192.168.1.1
#PBR的使用有三步:
policy-based-route toDianXin permit node 10---(2)定义PBR:哪些机器(ACL)从哪走
if-match acl 3000
apply next-hop 172.16.12.254
#
interface NULL0
#
interface GigabitEthernet1/0/0
port link-mode route
ip address 192.168.0.1 255.255.255.0
#
interface GigabitEthernet1/0/1
port link-mode route
#
interface GigabitEthernet1/0/2
port link-mode route
description toLianTong
ip address 172.16.11.11 255.255.255.0
nat outbound
#
interface GigabitEthernet1/0/3
port link-mode route
description toDianXin
ip address 172.16.12.12 255.255.255.0
nat outbound
#
interface GigabitEthernet1/0/4
port link-mode route
#
interface GigabitEthernet1/0/5
port link-mode route
#
interface GigabitEthernet1/0/6---(3)应用上面定义的PBR,在此分流,如果多VLAN更有效,此只是单网段实验而已
port link-mode route
description toLan and apply PBR
ip address 192.168.1.1 255.255.255.0
ip policy-based-route toDianXin
#
interface GigabitEthernet1/0/7
port link-mode route
#
interface GigabitEthernet1/0/8
port link-mode route
#
interface GigabitEthernet1/0/9
port link-mode route
#
interface GigabitEthernet1/0/10
port link-mode route
#
interface GigabitEthernet1/0/11
port link-mode route
#
interface GigabitEthernet1/0/12
port link-mode route
#
interface GigabitEthernet1/0/13
port link-mode route
#
interface GigabitEthernet1/0/14
port link-mode route
#
interface GigabitEthernet1/0/15
port link-mode route
#
interface GigabitEthernet1/0/16
port link-mode route
#
interface GigabitEthernet1/0/17
port link-mode route
#
interface GigabitEthernet1/0/18
port link-mode route
#
interface GigabitEthernet1/0/19
port link-mode route
#
interface GigabitEthernet1/0/20
port link-mode route
#
interface GigabitEthernet1/0/21
port link-mode route
#
interface GigabitEthernet1/0/22
port link-mode route
#
interface GigabitEthernet1/0/23
port link-mode route
#
object-policy ip Local-trust
rule 0 pass
#
object-policy ip Local-untrust
rule 0 pass
#
object-policy ip trust-Local
rule 0 pass
#
object-policy ip trust-untrust
rule 0 pass
#
object-policy ip untrust-trust
rule 0 pass
#
security-zone name Local
#
security-zone name Trust
import interface GigabitEthernet1/0/6
#
security-zone name DMZ
#
security-zone name Untrust---自建的区域,其它区域默认就有,只需要加端口
import interface GigabitEthernet1/0/2
import interface GigabitEthernet1/0/3
#
zone-pair security source Local destination Trust
object-policy apply ip Local-trust
#
zone-pair security source Local destination Untrust
object-policy apply ip Local-untrust
#
zone-pair security source Trust destination Local
object-policy apply ip trust-Local
#
zone-pair security source Trust destination Untrust
object-policy apply ip trust-untrust
#
scheduler logfile size 16
#
line class aux
user-role network-operator
#
line class console
user-role network-admin
#
line class vty
user-role network-operator
#
line aux 0
user-role network-admin
#
line con 0
user-role network-admin
#
line vty 0 4
authentication-mode scheme
user-role network-admin
#
line vty 5 63
user-role network-operator
#
ip route-static 0.0.0.0 0 172.16.11.254 track 1
ip route-static 0.0.0.0 0 172.16.12.254 track 2 preference 80
#
undo info-center enable
#
undo ssh server compatible-ssh1x enable
#
acl number 3000-------------(1)定义ACL 被定义PBR时引用,匹配哪些机器走那个下一跳
description match PBR's IP
rule 10 permit ip source 192.168.1.0 0.0.0.255
#
domain system
#
aaa session-limit ftp 16
aaa session-limit telnet 16
aaa session-limit ssh 16
domain default enable system
#
role name level-0
description Predefined level-0 role
#
role name level-1
description Predefined level-1 role
#
role name level-2
description Predefined level-2 role
#
role name level-3
description Predefined level-3 role
#
role name level-4
description Predefined level-4 role
#
role name level-5
description Predefined level-5 role
#
role name level-6
description Predefined level-6 role
#
role name level-7
description Predefined level-7 role
#
role name level-8
description Predefined level-8 role
#
role name level-9
description Predefined level-9 role
#
role name level-10
description Predefined level-10 role
#
role name level-11
description Predefined level-11 role
#
role name level-12
description Predefined level-12 role
#
role name level-13
description Predefined level-13 role
#
role name level-14
description Predefined level-14 role
#
user-group system
#
local-user admin class manage
password hash $h$6$UbIhNnPevyKUwfpm$LqR3+yg1IjNct39MkOR0H0iQXLkYB3jMqM4vbAeoXOhbabIIFnjJPEGR00YiYA1Sz4LiY3FmEdru2fOLMb1shQ==
service-type telnet terminal http
authorization-attribute user-role level-3
authorization-attribute user-role network-admin
authorization-attribute user-role network-operator
#
ip http enable
ip https enable
#
return