route-policy实例应用_Time

R1:

<r1>display current-configuration  

[V200R003C00]

#

sysname r1

#

snmp-agent local-engineid 800007DB03000000000000

snmp-agent  

#

clock timezone China-Standard-Time minus 08:00:00

#

portal local-server load portalpage.zip

#

drop illegal-mac alarm

#

set cpu-usage threshold 80 restore 75

#

aaa  

authentication-scheme default

authorization-scheme default

accounting-scheme default

domain default  

domain default_admin  

local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$

local-user admin service-type http

#

firewall zone Local

priority 15

#

interface GigabitEthernet0/0/0

ip address 12.1.1.1 255.255.255.0  

#

interface GigabitEthernet0/0/1

#

interface GigabitEthernet0/0/2

#

interface NULL0

#

interface LoopBack0

ip address 1.1.1.1 255.255.255.0  

#

ospf 1 router-id 1.1.1.1  

area 0.0.0.0  

 network 12.1.1.0 0.0.0.255  

#

user-interface con 0

authentication-mode password

idle-timeout 0 0

user-interface vty 0 4

user-interface vty 16 20

#

wlan ac

#

return

<r1>

R2:

<r2>display current-configuration  

[V200R003C00]

#

sysname r2

#

snmp-agent local-engineid 800007DB03000000000000

snmp-agent  

#

clock timezone China-Standard-Time minus 08:00:00

#

portal local-server load portalpage.zip

#

drop illegal-mac alarm

#

set cpu-usage threshold 80 restore 75

#

aaa  

authentication-scheme default

authorization-scheme default

accounting-scheme default

domain default  

domain default_admin  

local-user admin password cipher %$%$K8m.Nt84DZ}e#<0`8bmE3Uw}%$%$

local-user admin service-type http

#

firewall zone Local

priority 15

#

interface GigabitEthernet0/0/0

ip address 12.1.1.2 255.255.255.0  

#

interface GigabitEthernet0/0/1

ip address 10.1.1.1 255.255.255.0  

#

interface GigabitEthernet0/0/2

ip address 20.1.1.1 255.255.255.0  

#

interface NULL0

#

interface LoopBack0

ip address 2.2.2.2 255.255.255.255  

#

ospf 1 router-id 2.2.2.2  

import-route direct route-policy rouer1

area 0.0.0.0  

 network 12.1.1.0 0.0.0.255  

#

route-policy rouer1 permit node 10  

if-match ip-prefix control1  

#

route-policy rouer1 deny node 9999  

#

ip ip-prefix control1 index 10 permit 10.1.1.0 24 greater-equal 24 less-equal 32

#

user-interface con 0

authentication-mode password

idle-timeout 0 0

user-interface vty 0 4

user-interface vty 16 20

#

wlan ac

#

return

<r2>

注意:

1、前缀列表:前缀列表可以应用于进程中,不能应用于接口之上

ip ip-prefix control1 index 10 permit 10.1.1.0 24 greater-equal 24 less-equal 32

2、配置route-policy

route-policy rouer1 permit node 10  

if-match ip-prefix control1  

route-policy rouer1 deny node 9999  

注意:二层策略,取决于外层动作

3、策略应用于进程

import-route direct route-policy rouer1