Mam taki PBR na switchu Cisco.
Kod: Zaznacz cały
interface Vlan130
ip vrf forwarding ace
ip address 172.16.30.1 255.255.255.0
no ip redirects
no ip unreachables
no ip proxy-arp
ip flow ingress
ip policy route-map SetNextHop
route-map SetNextHop permit 10
match ip address 121
set ip next-hop 172.16.21.1
set interface Vlan121
access-list 121 permit ip host 172.16.30.24 xx.xx.0.0 0.1.255.255
access-list 121 permit ip host 172.16.30.24 xx.xx.71.72 0.0.0.7
access-list 121 permit ip host 172.16.30.24 xx.xx.0.0 0.0.255.255
Kod: Zaznacz cały
firewall family inet {
filter SetNextHop {
term 0 {
from {
source-address {
172.16.30.24/32;
}
}
from {
destination-address {
prefix-list ADRESY-DOCELOWE;
}
}
then
{
next-interface irb.121;
}
then
{
next-ip 172.16.21.1/32;
}
then
{
accept;
}
interface irb.130 {
family inet {
filter {
input SetNextHop;
}
}
}
Na stronie Junka są przykłady ale tam są dla interfejsów fizycznych (i często zakładają że PBR będzie między instancjami rutowania), a nie ma nigdzie dla VLANów gdzie oba VLANy są w tej samej instancji (mój scenariusz).