📄 ospfv2.tp
字号:
md5 @ { %help: short "Set MD5 authentication key"; %allow-range: $(@) "0" "255" %help: "The MD5 authentication key ID"; %activate: xrl "$(ospf4.targetname)/ospfv2/0.1/set_md5_authentication_key?ifname:txt=vlink&vifname:txt=$(virtual-link.@)&area:ipv4=$(area.@)&key_id:u32=$(@)&password:txt=$(@.password)&start_time:txt=$(@.start-time)&end_time:txt=$(@.end-time)&max_time_drift:u32=$(@.max-time-drift)"; %update: xrl "$(ospf4.targetname)/ospfv2/0.1/set_md5_authentication_key?ifname:txt=vlink&vifname:txt=$(virtual-link.@)&area:ipv4=$(area.@)&key_id:u32=$(@)&password:txt=$(@.password)&start_time:txt=$(@.start-time)&end_time:txt=$(@.end-time)&max_time_drift:u32=$(@.max-time-drift)"; %delete: xrl "$(ospf4.targetname)/ospfv2/0.1/delete_md5_authentication_key?ifname:txt=vlink&vifname:txt=$(virtual-link.@)&area:ipv4=$(area.@)&key_id:u32=$(@)"; password { %help: short "Set the authentication password"; } start-time { %help: short "Set the authentication start time (YYYY-MM-DD.HH:MM)"; } end-time { %help: short "Set the authentication end time (YYYY-MM-DD.HH:MM)"; } max-time-drift { %help: short "Set the maximum time drift (in seconds) among all routers"; %allow-range: $(@) "0" "65534" %help: "The maximum time drift (in seconds)"; %allow-range: $(@) "65535" "65535" %help: "Unlimited time drift"; } } } } interface @: txt { %help: short "Include an interface in this area"; link-type { %help: short "broadcast or p2p or p2m"; %allow: $(@) "broadcast" %help: "Broadcast link"; %allow: $(@) "p2p" %help: "Point-to-point link"; %allow: $(@) "p2m" %help: "Point-to-multipoint link"; %set:; } vif @: txt { %help: short "Include an vif in this area"; address @ { %help: short "Address on vif used for OSPF"; %create: xrl "$(ospf4.targetname)/ospfv2/0.1/create_peer?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&addr:ipv4=$(@)&type:txt=$(interface.@.link-type)&area:ipv4=$(area.@)"; %delete: xrl "$(ospf4.targetname)/ospfv2/0.1/delete_peer?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)"; priority { %help: short "Priority used in DR election"; %allow-range: $(@) "0" "255" %help: "The priority used in DR election"; %set: xrl "$(ospf4.targetname)/ospfv2/0.1/set_router_priority?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&priority:u32=$(@)"; %delete: xrl "$(ospf4.targetname)/ospfv2/0.1/set_router_priority?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&priority:u32=$(DEFAULT)"; } hello-interval { %help: short "Hello packets sent every interval seconds"; %allow-range: $(@) "1" "65535" %help: "The Hello packets interval (in seconds)"; %set: xrl "$(ospf4.targetname)/ospfv2/0.1/set_hello_interval?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&interval:u32=$(@)"; %delete: xrl "$(ospf4.targetname)/ospfv2/0.1/set_hello_interval?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&interval:u32=$(DEFAULT)"; } router-dead-interval { %help: short "Seconds to wait before considering a neighbor dead"; %allow-range: $(@) "1" "4294967295" %help: "The neighbor router dead interval (in seconds)"; %set: xrl "$(ospf4.targetname)/ospfv2/0.1/set_router_dead_interval?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&interval:u32=$(@)"; %delete: xrl "$(ospf4.targetname)/ospfv2/0.1/set_router_dead_interval?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&interval:u32=$(DEFAULT)"; } interface-cost { %help: short "Cost of this address"; %allow-range: $(@) "1" "65535" %help: "The cost of this address"; %set: xrl "$(ospf4.targetname)/ospfv2/0.1/set_interface_cost?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&cost:u32=$(@)"; %delete: xrl "$(ospf4.targetname)/ospfv2/0.1/set_interface_cost?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&cost:u32=$(DEFAULT)"; } retransmit-interval { %help: short "The retransmit interval (RxmtInterval)"; %allow-range: $(@) "1" "65535" %help: "The retransmit interval (in seconds)"; %set: xrl "$(ospf4.targetname)/ospfv2/0.1/set_retransmit_interval?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&interval:u32=$(@)"; %delete: xrl "$(ospf4.targetname)/ospfv2/0.1/set_retransmit_interval?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&interval:u32=$(DEFAULT)"; } transit-delay { %help: short "Add to age field of all transmitted LSAs"; %allow-range: $(@) "0" "3600" %help: "The extra addition to age field of all transmitted LSAs"; %set: xrl "$(ospf4.targetname)/ospfv2/0.1/set_inftransdelay?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&delay:u32=$(@)"; %delete: xrl "$(ospf4.targetname)/ospfv2/0.1/set_inftransdelay?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&delay:u32=$(DEFAULT)"; } authentication { %help: short "Set the authentication"; type { %deprecated: "Statement 'type' is obsoleted by 'simple-password' and 'md5'"; %help: short "Set the authentication type"; %allow: $(@) "none" %help: "No authentication"; %allow: $(@) "simple" %help: "Simple password authentication"; %allow: $(@) "md5" %help: "MD5 authentication"; } password { %deprecated: "Statement 'password' is replaced with 'simple-password'"; %help: short "Set the authentication password"; } simple-password { %help: short "Set simple password authentication key"; %create: xrl "$(ospf4.targetname)/ospfv2/0.1/set_simple_authentication_key?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&password:txt=$(@)"; %set: xrl "$(ospf4.targetname)/ospfv2/0.1/set_simple_authentication_key?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&password:txt=$(@)"; %delete: xrl "$(ospf4.targetname)/ospfv2/0.1/delete_simple_authentication_key?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)"; } md5 @ { %help: short "Set MD5 authentication key"; %allow-range: $(@) "0" "255" %help: "The MD5 authentication key ID"; %activate: xrl "$(ospf4.targetname)/ospfv2/0.1/set_md5_authentication_key?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&key_id:u32=$(@)&password:txt=$(@.password)&start_time:txt=$(@.start-time)&end_time:txt=$(@.end-time)&max_time_drift:u32=$(@.max-time-drift)"; %update: xrl "$(ospf4.targetname)/ospfv2/0.1/set_md5_authentication_key?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&key_id:u32=$(@)&password:txt=$(@.password)&start_time:txt=$(@.start-time)&end_time:txt=$(@.end-time)&max_time_drift:u32=$(@.max-time-drift)"; %delete: xrl "$(ospf4.targetname)/ospfv2/0.1/delete_md5_authentication_key?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&key_id:u32=$(@)"; password { %help: short "Set the authentication password"; } start-time { %help: short "Set the authentication start time (YYYY-MM-DD.HH:MM)"; } end-time { %help: short "Set the authentication end time (YYYY-MM-DD.HH:MM)"; } max-time-drift { %help: short "Set the maximum time drift (in seconds) among all routers"; %allow-range: $(@) "0" "65534" %help: "The maximum time drift (in seconds)"; %allow-range: $(@) "65535" "65535" %help: "Unlimited time drift"; } } } passive { %help: short "Do not run OSPF, but advertise it"; %set: xrl "$(ospf4.targetname)/ospfv2/0.1/set_passive?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&passive:bool=$(@)"; %delete: xrl "$(ospf4.targetname)/ospfv2/0.1/set_passive?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&passive:bool=$(DEFAULT)"; } disable { %help: short "Disable OSPF on address"; %set: xrl "$(ospf4.targetname)/ospfv2/0.1/set_peer_state?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&enable:bool=`~$(@)`"; %delete: xrl "$(ospf4.targetname)/ospfv2/0.1/set_peer_state?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&enable:bool=`~$(DEFAULT)`"; } neighbor @: ipv4 { %help: short "Neighbors address"; %mandatory: $(@.router-id); router-id { %help: short "Neighbors router-id"; %set:; } %create: xrl "$(ospf4.targetname)/ospfv2/0.1/add_neighbour?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&neighbour_address:ipv4=$(@)&neighbour_id:ipv4=$(@.router-id)"; %delete: xrl "$(ospf4.targetname)/ospfv2/0.1/remove_neighbour?ifname:txt=$(interface.@)&vifname:txt=$(vif.@)&area:ipv4=$(area.@)&neighbour_address:ipv4=$(@)&neighbour_id:ipv4=$(@.router-id)"; } } } } } traceoptions { %help: short "Configure the tracing options"; flag { %help: short "Configure the tracing operation to perform"; all { %help: short "Configure all tracing operations"; disable { %help: short "Disable all tracing operations"; %set: xrl "$(ospf4.targetname)/ospfv2/0.1/trace?tvar:txt=all&enable:bool=`~$(@)`"; %delete: xrl "$(ospf4.targetname)/ospfv2/0.1/trace?tvar:txt=all&enable:bool=$(DEFAULT)"; } } } } import { %help: short "Import policy"; %delete: xrl "$(policy.targetname)/policy/0.1/import?protocol:txt=ospf4&policies:txt="; %set: xrl "$(policy.targetname)/policy/0.1/import?protocol:txt=ospf4&policies:txt=$(@)"; } export { %help: short "Export policy"; %delete: xrl "$(policy.targetname)/policy/0.1/export?protocol:txt=ospf4&policies:txt="; %set: xrl "$(policy.targetname)/policy/0.1/export?protocol:txt=ospf4&policies:txt=$(@)"; } }}policy { %create: xrl "$(policy.targetname)/policy/0.1/set_proto_target?protocol:txt=ospf4&target:txt=ospfv2"; %create: xrl "$(policy.targetname)/policy/0.1/add_varmap?protocol:txt=ospf4&variable:txt=network4&type:txt=ipv4net&access:txt=r&id:u32=10"; %create: xrl "$(policy.targetname)/policy/0.1/add_varmap?protocol:txt=ospf4&variable:txt=nexthop4&type:txt=ipv4&access:txt=rw&id:u32=11"; %create: xrl "$(policy.targetname)/policy/0.1/add_varmap?protocol:txt=ospf4&variable:txt=metric&type:txt=u32&access:txt=rw&id:u32=12"; %create: xrl "$(policy.targetname)/policy/0.1/add_varmap?protocol:txt=ospf4&variable:txt=ebit&type:txt=bool&access:txt=rw&id:u32=13"; %create: xrl "$(policy.targetname)/policy/0.1/add_varmap?protocol:txt=ospf4&variable:txt=tag&type:txt=u32&access:txt=rw&id:u32=14"; policy-statement @: txt { term @: txt { from { nexthop4 { %help: short "IPv4 nexthop"; %allow-operator: ":" "==" "!=" "<" ">" "<=" ">="; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=0&order:txt=$(#)&statement:txt=nexthop4 $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=0&order:txt=$(#)&statement:txt="; } metric { %help: short "Metric value"; %allow-operator: ":" "==" "!=" "<" ">" "<=" ">="; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=0&order:txt=$(#)&statement:txt=metric $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=0&order:txt=$(#)&statement:txt="; } ebit { %help: short "Type of external OSPF route"; %allow-operator: ":" "==" "!="; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=0&order:txt=$(#)&statement:txt=ebit $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=0&order:txt=$(#)&statement:txt="; } tag { %help: short "Route tag"; %allow-operator: ":" "==" "!=" "<" ">" "<=" ">="; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=0&order:txt=$(#)&statement:txt=tag $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=0&order:txt=$(#)&statement:txt="; } } to { nexthop4 { %help: short "IPv4 nexthop"; %allow-operator: ":" "==" "!=" "<" ">" "<=" ">="; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=1&order:txt=$(#)&statement:txt=nexthop4 $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=1&order:txt=$(#)&statement:txt="; } metric { %help: short "Metric value"; %allow-operator: ":" "==" "!=" "<" ">" "<=" ">="; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=1&order:txt=$(#)&statement:txt=metric $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=1&order:txt=$(#)&statement:txt="; } ebit { %help: short "Type of external OSPF route"; %allow-operator: ":" "==" "!="; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=1&order:txt=$(#)&statement:txt=ebit $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=1&order:txt=$(#)&statement:txt="; } tag { %help: short "Route tag"; %allow-operator: ":" "==" "!=" "<" ">" "<=" ">="; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=1&order:txt=$(#)&statement:txt=tag $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=1&order:txt=$(#)&statement:txt="; } } then { nexthop4 { %help: short "Set the IPv4 nexthop"; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt=nexthop4 $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt="; } metric { %help: short "Set the metric value"; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt=metric $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt="; } ebit { %help: short "Set the type of external OSPF route"; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt=ebit $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt="; } tag { %help: short "Set the route tag"; %set: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt=tag $(<>) $(@);"; %delete: xrl "$(policy.targetname)/policy/0.1/update_term_block?policy:txt=$(policy-statement.@)&term:txt=$(term.@)&block:u32=2&order:txt=$(#)&statement:txt="; } } } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -