📄 static_routes.tp
字号:
metric { %help: short "Configure the routing metric"; %allow-range: $(@) "1" "65535" %help: "The routing metric"; %set:; } qualified-next-hop @: ipv6 { %help: short "Next hop with qualifiers"; %create: xrl "$(static.targetname)/static_routes/0.1/add_backup_route6?unicast:bool=false&multicast:bool=true&network:ipv6net=$(mrib-route.@)&nexthop:ipv6=$(@)&metric:u32=$(@.metric)"; %update: xrl "$(static.targetname)/static_routes/0.1/replace_backup_route6?unicast:bool=false&multicast:bool=true&network:ipv6net=$(mrib-route.@)&nexthop:ipv6=$(@)&metric:u32=$(@.metric)"; %delete: xrl "$(static.targetname)/static_routes/0.1/delete_backup_route6?unicast:bool=false&multicast:bool=true&network:ipv6net=$(mrib-route.@)&nexthop:ipv6=$(@)"; metric { %help: short "Configure the routing metric"; %allow-range: $(@) "1" "65535" %help: "The routing metric"; %set:; } } } mrib-route4 @: ipv4net { %deprecated: "Statement 'mrib-route4' is replaced with 'mrib-route'"; %help: short "Configure a multicast-specific IPv4 static route"; %mandatory: $(@.next-hop); %create: xrl "$(static.targetname)/static_routes/0.1/add_route4?unicast:bool=false&multicast:bool=true&network:ipv4net=$(@)&nexthop:ipv4=$(@.next-hop)&metric:u32=$(@.metric)"; %update: xrl "$(static.targetname)/static_routes/0.1/replace_route4?unicast:bool=false&multicast:bool=true&network:ipv4net=$(@)&nexthop:ipv4=$(@.next-hop)&metric:u32=$(@.metric)"; %delete: xrl "$(static.targetname)/static_routes/0.1/delete_route4?unicast:bool=false&multicast:bool=true&network:ipv4net=$(@)&nexthop:ipv4=$(@.next-hop)"; next-hop { %help: short "Configure the next-hop router"; %set:; } nexthop { %deprecated: "Statement 'nexthop' is replaced with 'next-hop'"; %help: short "Configure the next-hop router"; %set:; } metric { %help: short "Configure the routing metric"; %allow-range: $(@) "1" "65535" %help: "The routing metric"; %set:; } } mrib-route6 @: ipv6net { %deprecated: "Statement 'mrib-route6' is replaced with 'mrib-route'"; %help: short "Configure a multicast-specific IPv6 static route"; %mandatory: $(@.next-hop); %create: xrl "$(static.targetname)/static_routes/0.1/add_route6?unicast:bool=false&multicast:bool=true&network:ipv6net=$(@)&nexthop:ipv6=$(@.next-hop)&metric:u32=$(@.metric)"; %update: xrl "$(static.targetname)/static_routes/0.1/replace_route6?unicast:bool=false&multicast:bool=true&network:ipv6net=$(@)&nexthop:ipv6=$(@.next-hop)&metric:u32=$(@.metric)"; %delete: xrl "$(static.targetname)/static_routes/0.1/delete_route6?unicast:bool=false&multicast:bool=true&network:ipv6net=$(@)&nexthop:ipv6=$(@.next-hop)"; next-hop { %help: short "Configure the next-hop router"; %set:; } nexthop { %deprecated: "Statement 'nexthop' is replaced with 'next-hop'"; %help: short "Configure the next-hop router"; %set:; } metric { %help: short "Configure the routing metric"; %allow-range: $(@) "1" "65535" %help: "The routing metric"; %set:; } } mrib-interface-route @: ipv4net { %help: short "Configure a multicast-specific interface-based static route"; %mandatory: $(@.next-hop-interface), $(@.next-hop-vif); %create: xrl "$(static.targetname)/static_routes/0.1/add_interface_route4?unicast:bool=false&multicast:bool=true&network:ipv4net=$(@)&nexthop:ipv4=$(@.next-hop-router)&ifname:txt=$(@.next-hop-interface)&vifname:txt=$(@.next-hop-vif)&metric:u32=$(@.metric)"; %update: xrl "$(static.targetname)/static_routes/0.1/replace_interface_route4?unicast:bool=false&multicast:bool=true&network:ipv4net=$(@)&nexthop:ipv4=$(@.next-hop-router)&ifname:txt=$(@.next-hop-interface)&vifname:txt=$(@.next-hop-vif)&metric:u32=$(@.metric)"; %delete: xrl "$(static.targetname)/static_routes/0.1/delete_interface_route4?unicast:bool=false&multicast:bool=true&network:ipv4net=$(@)&nexthop:ipv4=$(@.next-hop-router)&ifname:txt=$(@.next-hop-interface)&vifname:txt=$(@.next-hop-vif)"; next-hop-interface { %help: short "Configure the next-hop network interface name"; %set:; } next-hop-vif { %help: short "Configure the next-hop virtual interface name"; %set:; } next-hop-router { %help: short "Configure the optional next-hop router"; %set:; } metric { %help: short "Configure the routing metric"; %allow-range: $(@) "1" "65535" %help: "The routing metric"; %set:; } qualified-next-hop-interface @: txt { %help: short "Next hop interface name with qualifiers"; qualified-next-hop-vif @: txt { %help: short "Next hop virtual interface name with qualifiers"; %create: xrl "$(static.targetname)/static_routes/0.1/add_backup_interface_route4?unicast:bool=false&multicast:bool=true&network:ipv4net=$(mrib-interface-route.@)&nexthop:ipv4=$(@.next-hop-router)&ifname:txt=$(qualified-next-hop-interface.@)&vifname:txt=$(qualified-next-hop-vif.@)&metric:u32=$(@.metric)"; %update: xrl "$(static.targetname)/static_routes/0.1/replace_backup_interface_route4?unicast:bool=false&multicast:bool=true&network:ipv4net=$(mrib-interface-route.@)&nexthop:ipv4=$(@.next-hop-router)&ifname:txt=$(qualified-next-hop-interface.@)&vifname:txt=$(qualified-next-hop-vif.@)&metric:u32=$(@.metric)"; %delete: xrl "$(static.targetname)/static_routes/0.1/delete_backup_interface_route4?unicast:bool=false&multicast:bool=true&network:ipv4net=$(mrib-interface-route.@)&nexthop:ipv4=$(@.next-hop)&ifname:txt=$(qualified-next-hop-interface.@)&vifname:txt=$(qualified-next-hop-vif.@)"; next-hop-router { %help: short "Configure the optional next-hop router"; %set:; } metric { %help: short "Configure the routing metric"; %allow-range: $(@) "1" "65535" %help: "The routing metric"; %set:; } } } } mrib-interface-route @: ipv6net { %help: short "Configure a multicast-specific interface-based static route"; %mandatory: $(@.next-hop-interface), $(@.next-hop-vif); %create: xrl "$(static.targetname)/static_routes/0.1/add_interface_route6?unicast:bool=false&multicast:bool=true&network:ipv6net=$(@)&nexthop:ipv6=$(@.next-hop-router)&ifname:txt=$(@.next-hop-interface)&vifname:txt=$(@.next-hop-vif)&metric:u32=$(@.metric)"; %update: xrl "$(static.targetname)/static_routes/0.1/replace_interface_route6?unicast:bool=false&multicast:bool=true&network:ipv6net=$(@)&nexthop:ipv6=$(@.next-hop-router)&ifname:txt=$(@.next-hop-interface)&vifname:txt=$(@.next-hop-vif)&metric:u32=$(@.metric)"; %delete: xrl "$(static.targetname)/static_routes/0.1/delete_interface_route6?unicast:bool=false&multicast:bool=true&network:ipv6net=$(@)&nexthop:ipv6=$(@.next-hop-router)&ifname:txt=$(@.next-hop-interface)&vifname:txt=$(@.next-hop-vif)"; next-hop-interface { %help: short "Configure the next-hop network interface name"; %set:; } next-hop-vif { %help: short "Configure the next-hop virtual interface name"; %set:; } next-hop-router { %help: short "Configure the optional next-hop router"; %set:; } metric { %help: short "Configure the routing metric"; %allow-range: $(@) "1" "65535" %help: "The routing metric"; %set:; } qualified-next-hop-interface @: txt { %help: short "Next hop interface name with qualifiers"; qualified-next-hop-vif @: txt { %help: short "Next hop virtual interface name with qualifiers"; %create: xrl "$(static.targetname)/static_routes/0.1/add_backup_interface_route6?unicast:bool=false&multicast:bool=true&network:ipv6net=$(mrib-interface-route.@)&nexthop:ipv6=$(@.next-hop-router)&ifname:txt=$(qualified-next-hop-interface.@)&vifname:txt=$(qualified-next-hop-vif.@)&metric:u32=$(@.metric)"; %update: xrl "$(static.targetname)/static_routes/0.1/replace_backup_interface_route6?unicast:bool=false&multicast:bool=true&network:ipv6net=$(mrib-interface-route.@)&nexthop:ipv6=$(@.next-hop-router)&ifname:txt=$(qualified-next-hop-interface.@)&vifname:txt=$(qualified-next-hop-vif.@)&metric:u32=$(@.metric)"; %delete: xrl "$(static.targetname)/static_routes/0.1/delete_backup_interface_route6?unicast:bool=false&multicast:bool=true&network:ipv6net=$(mrib-interface-route.@)&nexthop:ipv6=$(@.next-hop)&ifname:txt=$(qualified-next-hop-interface.@)&vifname:txt=$(qualified-next-hop-vif.@)"; next-hop-router { %help: short "Configure the optional next-hop router"; %set:; } metric { %help: short "Configure the routing metric"; %allow-range: $(@) "1" "65535" %help: "The routing metric"; %set:; } } } } mrib-interface-route4 @: ipv4net { %deprecated: "Statement 'mrib-interface-route4' is replaced with 'mrib-interface-route'"; %help: short "Configure a multicast-specific interface-based IPv4 static route"; %mandatory: $(@.next-hop-interface), $(@.next-hop-vif); %create: xrl "$(static.targetname)/static_routes/0.1/add_interface_route4?unicast:bool=false&multicast:bool=true&network:ipv4net=$(@)&nexthop:ipv4=$(@.next-hop-router)&ifname:txt=$(@.next-hop-interface)&vifname:txt=$(@.next-hop-vif)&metric:u32=$(@.metric)"; %update: xrl "$(static.targetname)/static_routes/0.1/replace_interface_route4?unicast:bool=false&multicast:bool=true&network:ipv4net=$(@)&nexthop:ipv4=$(@.next-hop-router)&ifname:txt=$(@.next-hop-interface)&vifname:txt=$(@.next-hop-vif)&metric:u32=$(@.metric)"; %delete: xrl "$(static.targetname)/static_routes/0.1/delete_interface_route4?unicast:bool=false&multicast:bool=true&network:ipv4net=$(@)&nexthop:ipv4=$(@.next-hop-router)&ifname:txt=$(@.next-hop-interface)&vifname:txt=$(@.next-hop-vif)"; next-hop-interface { %help: short "Configure the next-hop network interface name"; %set:; } next-hop-vif { %help: short "Configure the next-hop virtual interface name"; %set:; } next-hop-router { %help: short "Configure the optional next-hop router"; %set:; } metric { %help: short "Configure the routing metric"; %allow-range: $(@) "1" "65535" %help: "The routing metric"; %set:; } } mrib-interface-route6 @: ipv6net { %deprecated: "Statement 'mrib-interface-route4' is replaced with 'mrib-interface-route'"; %help: short "Configure a multicast-specific interface-based IPv6 static route"; %mandatory: $(@.next-hop-interface), $(@.next-hop-vif); %create: xrl "$(static.targetname)/static_routes/0.1/add_interface_route6?unicast:bool=false&multicast:bool=true&network:ipv6net=$(@)&nexthop:ipv6=$(@.next-hop-router)&ifname:txt=$(@.next-hop-interface)&vifname:txt=$(@.next-hop-vif)&metric:u32=$(@.metric)"; %update: xrl "$(static.targetname)/static_routes/0.1/replace_interface_route6?unicast:bool=false&multicast:bool=true&network:ipv6net=$(@)&nexthop:ipv6=$(@.next-hop-router)&ifname:txt=$(@.next-hop-interface)&vifname:txt=$(@.next-hop-vif)&metric:u32=$(@.metric)"; %delete: xrl "$(static.targetname)/static_routes/0.1/delete_interface_route6?unicast:bool=false&multicast:bool=true&network:ipv6net=$(@)&nexthop:ipv6=$(@.next-hop-router)&ifname:txt=$(@.next-hop-interface)&vifname:txt=$(@.next-hop-vif)"; next-hop-interface { %help: short "Configure the next-hop network interface name"; %set:; } next-hop-vif { %help: short "Configure the next-hop virtual interface name"; %set:; } next-hop-router { %help: short "Configure the optional next-hop router"; %set:; } metric { %help: short "Configure the routing metric"; %allow-range: $(@) "1" "65535" %help: "The routing metric"; %set:; } } import { %help: short "Import policy"; %delete: xrl "policy/policy/0.1/import?protocol:txt=static&policies:txt="; %set: xrl "policy/policy/0.1/import?protocol:txt=static&policies:txt=$(@)"; } }}policy { %create: xrl "$(policy.targetname)/policy/0.1/set_proto_target?protocol:txt=static&target:txt=static_routes"; %create: xrl "$(policy.targetname)/policy/0.1/add_varmap?protocol:txt=static&variable:txt=network4&type:txt=ipv4net&access:txt=r&id:u32=10"; %create: xrl "$(policy.targetname)/policy/0.1/add_varmap?protocol:txt=static&variable:txt=nexthop4&type:txt=ipv4&access:txt=rw&id:u32=11"; %create: xrl "$(policy.targetname)/policy/0.1/add_varmap?protocol:txt=static&variable:txt=network6&type:txt=ipv6net&access:txt=r&id:u32=12"; %create: xrl "$(policy.targetname)/policy/0.1/add_varmap?protocol:txt=static&variable:txt=nexthop6&type:txt=ipv6&access:txt=rw&id:u32=13"; %create: xrl "$(policy.targetname)/policy/0.1/add_varmap?protocol:txt=static&variable:txt=metric&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="; } nexthop6 { %help: short "IPv6 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=nexthop6 $(<>) $(@);"; %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"; %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="; } } } }}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -