diff --git a/cfg/p4lang-rout395.tst b/cfg/p4lang-rout395.tst new file mode 100644 index 0000000000..0c5457c0df --- /dev/null +++ b/cfg/p4lang-rout395.tst @@ -0,0 +1,451 @@ +description p4lang: bridge routing over backplane + +addrouter r1 +int eth1 eth 0000.0000.1111 $1a$ $1b$ +int eth2 eth 0000.0000.1111 $2b$ $2a$ +int eth3 eth 0000.0000.1111 $7a$ $7b$ +int eth4 eth 0000.0000.1111 $8b$ $8a$ +int eth5 eth 0000.0000.1111 $13a$ $13b$ +int eth6 eth 0000.0000.1111 $14b$ $14a$ +! +vrf def v1 + rd 1:1 + exit +vrf def v9 + rd 1:1 + exit +int lo9 + vrf for v9 + ipv4 addr 10.10.10.227 255.255.255.255 + exit +int eth1 + vrf for v9 + ipv4 addr 10.11.12.254 255.255.255.0 + exit +int eth2 + exit +server dhcp4 eth1 + pool 10.11.12.1 10.11.12.99 + gateway 10.11.12.254 + netmask 255.255.255.0 + dns-server 10.10.10.227 + domain-name p4l + static 0000.0000.2222 10.11.12.111 + interface eth1 + vrf v9 + exit +int eth3 + vrf for v9 + ipv4 addr 10.12.13.254 255.255.255.0 + exit +int eth4 + exit +server dhcp4 eth3 + pool 10.12.13.1 10.12.13.99 + gateway 10.12.13.254 + netmask 255.255.255.0 + dns-server 10.10.10.227 + domain-name p4l + static 0000.0000.3333 10.12.13.111 + interface eth3 + vrf v9 + exit +int eth5 + vrf for v9 + ipv4 addr 10.13.14.254 255.255.255.0 + exit +int eth6 + exit +server dhcp4 eth5 + pool 10.13.14.1 10.13.14.99 + gateway 10.13.14.254 + netmask 255.255.255.0 + dns-server 10.10.10.227 + domain-name p4l + static 0000.0000.4444 10.13.14.111 + interface eth5 + vrf v9 + exit +int lo0 + vrf for v1 + ipv4 addr 2.2.2.101 255.255.255.255 + ipv6 addr 4321::101 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff + exit +bundle 1 + exit +bundle 2 + exit +bundle 3 + exit +bundle 4 + exit +bridge 1 + mac-learn + exit +int bvi1 + vrf for v1 + ipv4 addr 1.1.1.1 255.255.255.0 + ipv6 addr 1234::1 ffff:ffff:: + exit +int sdn11 + bridge-gr 1 + exit +int sdn12 + bridge-gr 1 + exit +int bun1 + vrf for v1 + mpls ena + exit +int sdn13 + bundle-gr 1 + exit +int sdn14 + bundle-gr 1 + exit +int sdn21 + bridge-gr 1 + exit +int sdn22 + bridge-gr 1 + exit +int bun2 + vrf for v1 + mpls ena + exit +int sdn23 + bundle-gr 2 + exit +int sdn24 + bundle-gr 2 + exit +int bun3 + vrf for v1 + mpls ena + exit +int sdn31 + bundle-gr 3 + exit +int sdn32 + bundle-gr 3 + exit +int bun4 + vrf for v1 + mpls ena + exit +int sdn33 + bundle-gr 4 + exit +int sdn34 + bundle-gr 4 + exit +server p4lang a + interconnect eth2 + export-vrf v1 + export-br 1 + export-port sdn11 1 10 + export-port sdn12 2 10 + export-port sdn13 3 10 + export-port sdn14 4 10 + export-port bun1 dynamic + export-port bvi1 dynamic + exit +server p4lang b + interconnect eth4 + export-vrf v1 + export-br 1 + export-port sdn21 1 10 + export-port sdn22 2 10 + export-port sdn23 3 10 + export-port sdn24 4 10 + export-port bun2 dynamic + export-port bvi1 dynamic + exit +server p4lang c + interconnect eth6 + export-vrf v1 + export-port sdn31 1 10 + export-port sdn32 2 10 + export-port sdn33 3 10 + export-port sdn34 4 10 + export-port bun3 dynamic + export-port bun4 dynamic + exit +server stack s + dataplanes 4 + forwarder 1 p4lang a + forwarder 1 backplane bun1 1 + forwarder 1 remote 10.11.12.111 + forwarder 2 p4lang b + forwarder 2 backplane bun2 1 + forwarder 2 remote 10.12.13.111 + forwarder 3 p4lang c + forwarder 3 backplane bun3 1 + forwarder 3 backplane bun4 1 + forwarder 3 remote 10.13.14.111 + vrf v9 + exit +ipv4 route v1 2.2.2.103 255.255.255.255 1.1.1.3 +ipv4 route v1 2.2.2.104 255.255.255.255 1.1.1.4 +ipv4 route v1 2.2.2.105 255.255.255.255 1.1.1.5 +ipv4 route v1 2.2.2.106 255.255.255.255 1.1.1.6 +ipv6 route v1 4321::103 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::3 +ipv6 route v1 4321::104 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::4 +ipv6 route v1 4321::105 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::5 +ipv6 route v1 4321::106 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::6 +! + +addother r2 controller r1 v9 9080 10.11.12.111 feature bundle mpls vpls bridge +int eth1 eth 0000.0000.2222 $1b$ $1a$ +int eth2 eth 0000.0000.2222 $2a$ $2b$ +int eth3 eth 0000.0000.2222 $3a$ $3b$ +int eth4 eth 0000.0000.2222 $4a$ $4b$ +int eth5 eth 0000.0000.2222 $5a$ $5b$ +int eth6 eth 0000.0000.2222 $6a$ $6b$ +! +! + +addother r3 controller r1 v9 9080 10.12.13.111 feature bundle mpls vpls bridge +int eth1 eth 0000.0000.3333 $7b$ $7a$ +int eth2 eth 0000.0000.3333 $8a$ $8b$ +int eth3 eth 0000.0000.3333 $9a$ $9b$ +int eth4 eth 0000.0000.3333 $10a$ $10b$ +int eth5 eth 0000.0000.3333 $11a$ $11b$ +int eth6 eth 0000.0000.3333 $12a$ $12b$ +! +! + +addother r4 controller r1 v9 9080 10.13.14.111 feature bundle mpls route +int eth1 eth 0000.0000.4444 $13b$ $13a$ +int eth2 eth 0000.0000.4444 $14a$ $14b$ +int eth3 eth 0000.0000.4444 $5b$ $5a$ +int eth4 eth 0000.0000.4444 $6b$ $6a$ +int eth5 eth 0000.0000.4444 $11b$ $11a$ +int eth6 eth 0000.0000.4444 $12b$ $12a$ +! +! + +addrouter r5 +int eth1 eth 0000.0000.5555 $3b$ $3a$ +! +vrf def v1 + rd 1:1 + exit +int lo0 + vrf for v1 + ipv4 addr 2.2.2.103 255.255.255.255 + ipv6 addr 4321::103 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff + exit +bridge 1 + mac-learn + block-unicast + exit +int eth1 + bridge-gr 1 + exit +int bvi1 + vrf for v1 + ipv4 addr 1.1.1.3 255.255.255.0 + ipv6 addr 1234::3 ffff:ffff:: + exit +ipv4 route v1 2.2.2.101 255.255.255.255 1.1.1.1 +ipv4 route v1 2.2.2.104 255.255.255.255 1.1.1.4 +ipv4 route v1 2.2.2.105 255.255.255.255 1.1.1.5 +ipv4 route v1 2.2.2.106 255.255.255.255 1.1.1.6 +ipv6 route v1 4321::101 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::1 +ipv6 route v1 4321::104 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::4 +ipv6 route v1 4321::105 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::5 +ipv6 route v1 4321::106 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::6 +! + +addrouter r6 +int eth1 eth 0000.0000.6666 $4b$ $4a$ +! +vrf def v1 + rd 1:1 + exit +int lo0 + vrf for v1 + ipv4 addr 2.2.2.104 255.255.255.255 + ipv6 addr 4321::104 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff + exit +int eth1 + vrf for v1 + ipv4 addr 1.1.1.4 255.255.255.0 + ipv6 addr 1234::4 ffff:ffff:: + exit +ipv4 route v1 2.2.2.101 255.255.255.255 1.1.1.1 +ipv4 route v1 2.2.2.103 255.255.255.255 1.1.1.3 +ipv4 route v1 2.2.2.105 255.255.255.255 1.1.1.5 +ipv4 route v1 2.2.2.106 255.255.255.255 1.1.1.6 +ipv6 route v1 4321::101 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::1 +ipv6 route v1 4321::103 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::3 +ipv6 route v1 4321::105 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::5 +ipv6 route v1 4321::106 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::6 +! + +addrouter r7 +int eth1 eth 0000.0000.7777 $9b$ $9a$ +! +vrf def v1 + rd 1:1 + exit +int lo0 + vrf for v1 + ipv4 addr 2.2.2.105 255.255.255.255 + ipv6 addr 4321::105 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff + exit +int eth1 + vrf for v1 + ipv4 addr 1.1.1.5 255.255.255.0 + ipv6 addr 1234::5 ffff:ffff:: + exit +ipv4 route v1 2.2.2.101 255.255.255.255 1.1.1.1 +ipv4 route v1 2.2.2.103 255.255.255.255 1.1.1.3 +ipv4 route v1 2.2.2.104 255.255.255.255 1.1.1.4 +ipv4 route v1 2.2.2.106 255.255.255.255 1.1.1.6 +ipv6 route v1 4321::101 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::1 +ipv6 route v1 4321::103 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::3 +ipv6 route v1 4321::104 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::4 +ipv6 route v1 4321::106 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::6 +! + +addrouter r8 +int eth1 eth 0000.0000.8888 $10b$ $10a$ +! +vrf def v1 + rd 1:1 + exit +int lo0 + vrf for v1 + ipv4 addr 2.2.2.106 255.255.255.255 + ipv6 addr 4321::106 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff + exit +int eth1 + vrf for v1 + ipv4 addr 1.1.1.6 255.255.255.0 + ipv6 addr 1234::6 ffff:ffff:: + exit +ipv4 route v1 2.2.2.101 255.255.255.255 1.1.1.1 +ipv4 route v1 2.2.2.103 255.255.255.255 1.1.1.3 +ipv4 route v1 2.2.2.104 255.255.255.255 1.1.1.4 +ipv4 route v1 2.2.2.105 255.255.255.255 1.1.1.5 +ipv6 route v1 4321::101 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::1 +ipv6 route v1 4321::103 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::3 +ipv6 route v1 4321::104 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::4 +ipv6 route v1 4321::105 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::5 +! + + +r1 tping 100 10 1.1.1.1 vrf v1 +r1 tping 100 10 1234::1 vrf v1 +r1 tping 100 10 1.1.1.3 vrf v1 +r1 tping 100 10 1234::3 vrf v1 +r1 tping 100 10 1.1.1.4 vrf v1 +r1 tping 100 10 1234::4 vrf v1 +r1 tping 100 10 1.1.1.5 vrf v1 +r1 tping 100 10 1234::5 vrf v1 +r1 tping 100 10 1.1.1.6 vrf v1 +r1 tping 100 10 1234::6 vrf v1 + +r5 tping 100 10 1.1.1.1 vrf v1 +r5 tping 100 10 1234::1 vrf v1 +r5 tping 100 10 1.1.1.3 vrf v1 +r5 tping 100 10 1234::3 vrf v1 +r5 tping 100 10 1.1.1.4 vrf v1 +r5 tping 100 10 1234::4 vrf v1 +r5 tping 100 10 1.1.1.5 vrf v1 +r5 tping 100 10 1234::5 vrf v1 +r5 tping 100 10 1.1.1.6 vrf v1 +r5 tping 100 10 1234::6 vrf v1 + +r6 tping 100 10 1.1.1.1 vrf v1 +r6 tping 100 10 1234::1 vrf v1 +r6 tping 100 10 1.1.1.3 vrf v1 +r6 tping 100 10 1234::3 vrf v1 +r6 tping 100 10 1.1.1.4 vrf v1 +r6 tping 100 10 1234::4 vrf v1 +r6 tping 100 10 1.1.1.5 vrf v1 +r6 tping 100 10 1234::5 vrf v1 +r6 tping 100 10 1.1.1.6 vrf v1 +r6 tping 100 10 1234::6 vrf v1 + +r7 tping 100 10 1.1.1.1 vrf v1 +r7 tping 100 10 1234::1 vrf v1 +r7 tping 100 10 1.1.1.3 vrf v1 +r7 tping 100 10 1234::3 vrf v1 +r7 tping 100 10 1.1.1.4 vrf v1 +r7 tping 100 10 1234::4 vrf v1 +r7 tping 100 10 1.1.1.5 vrf v1 +r7 tping 100 10 1234::5 vrf v1 +r7 tping 100 10 1.1.1.6 vrf v1 +r7 tping 100 10 1234::6 vrf v1 + +r8 tping 100 10 1.1.1.1 vrf v1 +r8 tping 100 10 1234::1 vrf v1 +r8 tping 100 10 1.1.1.3 vrf v1 +r8 tping 100 10 1234::3 vrf v1 +r8 tping 100 10 1.1.1.4 vrf v1 +r8 tping 100 10 1234::4 vrf v1 +r8 tping 100 10 1.1.1.5 vrf v1 +r8 tping 100 10 1234::5 vrf v1 +r8 tping 100 10 1.1.1.6 vrf v1 +r8 tping 100 10 1234::6 vrf v1 + +r1 tping 100 10 2.2.2.101 vrf v1 sou lo0 +r1 tping 100 10 4321::101 vrf v1 sou lo0 +r1 tping 100 10 2.2.2.103 vrf v1 sou lo0 +r1 tping 100 10 4321::103 vrf v1 sou lo0 +r1 tping 100 10 2.2.2.104 vrf v1 sou lo0 +r1 tping 100 10 4321::104 vrf v1 sou lo0 +r1 tping 100 10 2.2.2.105 vrf v1 sou lo0 +r1 tping 100 10 4321::105 vrf v1 sou lo0 +r1 tping 100 10 2.2.2.106 vrf v1 sou lo0 +r1 tping 100 10 4321::106 vrf v1 sou lo0 + +r5 tping 100 10 2.2.2.101 vrf v1 sou lo0 +r5 tping 100 10 4321::101 vrf v1 sou lo0 +r5 tping 100 10 2.2.2.103 vrf v1 sou lo0 +r5 tping 100 10 4321::103 vrf v1 sou lo0 +r5 tping 100 10 2.2.2.104 vrf v1 sou lo0 +r5 tping 100 10 4321::104 vrf v1 sou lo0 +r5 tping 100 10 2.2.2.105 vrf v1 sou lo0 +r5 tping 100 10 4321::105 vrf v1 sou lo0 +r5 tping 100 10 2.2.2.106 vrf v1 sou lo0 +r5 tping 100 10 4321::106 vrf v1 sou lo0 + +r6 tping 100 10 2.2.2.101 vrf v1 sou lo0 +r6 tping 100 10 4321::101 vrf v1 sou lo0 +r6 tping 100 10 2.2.2.103 vrf v1 sou lo0 +r6 tping 100 10 4321::103 vrf v1 sou lo0 +r6 tping 100 10 2.2.2.104 vrf v1 sou lo0 +r6 tping 100 10 4321::104 vrf v1 sou lo0 +r6 tping 100 10 2.2.2.105 vrf v1 sou lo0 +r6 tping 100 10 4321::105 vrf v1 sou lo0 +r6 tping 100 10 2.2.2.106 vrf v1 sou lo0 +r6 tping 100 10 4321::106 vrf v1 sou lo0 + +r7 tping 100 10 2.2.2.101 vrf v1 sou lo0 +r7 tping 100 10 4321::101 vrf v1 sou lo0 +r7 tping 100 10 2.2.2.103 vrf v1 sou lo0 +r7 tping 100 10 4321::103 vrf v1 sou lo0 +r7 tping 100 10 2.2.2.104 vrf v1 sou lo0 +r7 tping 100 10 4321::104 vrf v1 sou lo0 +r7 tping 100 10 2.2.2.105 vrf v1 sou lo0 +r7 tping 100 10 4321::105 vrf v1 sou lo0 +r7 tping 100 10 2.2.2.106 vrf v1 sou lo0 +r7 tping 100 10 4321::106 vrf v1 sou lo0 + +r8 tping 100 10 2.2.2.101 vrf v1 sou lo0 +r8 tping 100 10 4321::101 vrf v1 sou lo0 +r8 tping 100 10 2.2.2.103 vrf v1 sou lo0 +r8 tping 100 10 4321::103 vrf v1 sou lo0 +r8 tping 100 10 2.2.2.104 vrf v1 sou lo0 +r8 tping 100 10 4321::104 vrf v1 sou lo0 +r8 tping 100 10 2.2.2.105 vrf v1 sou lo0 +r8 tping 100 10 4321::105 vrf v1 sou lo0 +r8 tping 100 10 2.2.2.106 vrf v1 sou lo0 +r8 tping 100 10 4321::106 vrf v1 sou lo0 + +r1 dping sdn . r8 2.2.2.103 vrf v1 sou lo0 +r1 dping sdn . r8 4321::103 vrf v1 sou lo0 diff --git a/cfg/p4lang-rout396.tst b/cfg/p4lang-rout396.tst new file mode 100644 index 0000000000..3517d5a5e7 --- /dev/null +++ b/cfg/p4lang-rout396.tst @@ -0,0 +1,453 @@ +description p4lang: mixed bridge routing over backplane + +addrouter r1 +int eth1 eth 0000.0000.1111 $1a$ $1b$ +int eth2 eth 0000.0000.1111 $2b$ $2a$ +int eth3 eth 0000.0000.1111 $7a$ $7b$ +int eth4 eth 0000.0000.1111 $8b$ $8a$ +int eth5 eth 0000.0000.1111 $13a$ $13b$ +int eth6 eth 0000.0000.1111 $14b$ $14a$ +! +vrf def v1 + rd 1:1 + exit +vrf def v9 + rd 1:1 + exit +int lo9 + vrf for v9 + ipv4 addr 10.10.10.227 255.255.255.255 + exit +int eth1 + vrf for v9 + ipv4 addr 10.11.12.254 255.255.255.0 + exit +int eth2 + exit +server dhcp4 eth1 + pool 10.11.12.1 10.11.12.99 + gateway 10.11.12.254 + netmask 255.255.255.0 + dns-server 10.10.10.227 + domain-name p4l + static 0000.0000.2222 10.11.12.111 + interface eth1 + vrf v9 + exit +int eth3 + vrf for v9 + ipv4 addr 10.12.13.254 255.255.255.0 + exit +int eth4 + exit +server dhcp4 eth3 + pool 10.12.13.1 10.12.13.99 + gateway 10.12.13.254 + netmask 255.255.255.0 + dns-server 10.10.10.227 + domain-name p4l + static 0000.0000.3333 10.12.13.111 + interface eth3 + vrf v9 + exit +int eth5 + vrf for v9 + ipv4 addr 10.13.14.254 255.255.255.0 + exit +int eth6 + exit +server dhcp4 eth5 + pool 10.13.14.1 10.13.14.99 + gateway 10.13.14.254 + netmask 255.255.255.0 + dns-server 10.10.10.227 + domain-name p4l + static 0000.0000.4444 10.13.14.111 + interface eth5 + vrf v9 + exit +int lo0 + vrf for v1 + ipv4 addr 2.2.2.101 255.255.255.255 + ipv6 addr 4321::101 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff + exit +bundle 1 + exit +bundle 2 + exit +bundle 3 + exit +bundle 4 + exit +bridge 1 + mac-learn + private-bridge + exit +int bvi1 + vrf for v1 + ipv4 addr 1.1.1.1 255.255.255.0 + ipv6 addr 1234::1 ffff:ffff:: + ipv4 proxy-local + ipv6 proxy-local + exit +int sdn11 + bridge-gr 1 + exit +int sdn12 + bridge-gr 1 + exit +int bun1 + vrf for v1 + mpls ena + exit +int sdn13 + bundle-gr 1 + exit +int sdn14 + bundle-gr 1 + exit +int sdn21 + bridge-gr 1 + exit +int sdn22 + bridge-gr 1 + exit +int bun2 + vrf for v1 + mpls ena + exit +int sdn23 + bundle-gr 2 + exit +int sdn24 + bundle-gr 2 + exit +int bun3 + vrf for v1 + mpls ena + exit +int sdn31 + bundle-gr 3 + exit +int sdn32 + bundle-gr 3 + exit +int bun4 + vrf for v1 + mpls ena + exit +int sdn33 + bundle-gr 4 + exit +int sdn34 + bundle-gr 4 + exit +server p4lang a + interconnect eth2 + export-vrf v1 + export-br 1 + export-port sdn11 1 10 + export-port sdn12 2 10 + export-port sdn13 3 10 + export-port sdn14 4 10 + export-port bun1 dynamic + export-port bvi1 dynamic + exit +server p4lang b + interconnect eth4 + export-vrf v1 + export-br 1 + export-port sdn21 1 10 + export-port sdn22 2 10 + export-port sdn23 3 10 + export-port sdn24 4 10 + export-port bun2 dynamic + exit +server p4lang c + interconnect eth6 + export-vrf v1 + export-port sdn31 1 10 + export-port sdn32 2 10 + export-port sdn33 3 10 + export-port sdn34 4 10 + export-port bun3 dynamic + export-port bun4 dynamic + exit +server stack s + dataplanes 4 + forwarder 1 p4lang a + forwarder 1 backplane bun1 1 + forwarder 1 remote 10.11.12.111 + forwarder 2 p4lang b + forwarder 2 backplane bun2 1 + forwarder 2 remote 10.12.13.111 + forwarder 3 p4lang c + forwarder 3 backplane bun3 1 + forwarder 3 backplane bun4 1 + forwarder 3 remote 10.13.14.111 + vrf v9 + exit +ipv4 route v1 2.2.2.103 255.255.255.255 1.1.1.3 +ipv4 route v1 2.2.2.104 255.255.255.255 1.1.1.4 +ipv4 route v1 2.2.2.105 255.255.255.255 1.1.1.5 +ipv4 route v1 2.2.2.106 255.255.255.255 1.1.1.6 +ipv6 route v1 4321::103 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::3 +ipv6 route v1 4321::104 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::4 +ipv6 route v1 4321::105 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::5 +ipv6 route v1 4321::106 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::6 +! + +addother r2 controller r1 v9 9080 10.11.12.111 feature bundle mpls vpls bridge +int eth1 eth 0000.0000.2222 $1b$ $1a$ +int eth2 eth 0000.0000.2222 $2a$ $2b$ +int eth3 eth 0000.0000.2222 $3a$ $3b$ +int eth4 eth 0000.0000.2222 $4a$ $4b$ +int eth5 eth 0000.0000.2222 $5a$ $5b$ +int eth6 eth 0000.0000.2222 $6a$ $6b$ +! +! + +addother r3 controller r1 v9 9080 10.12.13.111 feature bundle mpls vpls bridge +int eth1 eth 0000.0000.3333 $7b$ $7a$ +int eth2 eth 0000.0000.3333 $8a$ $8b$ +int eth3 eth 0000.0000.3333 $9a$ $9b$ +int eth4 eth 0000.0000.3333 $10a$ $10b$ +int eth5 eth 0000.0000.3333 $11a$ $11b$ +int eth6 eth 0000.0000.3333 $12a$ $12b$ +! +! + +addother r4 controller r1 v9 9080 10.13.14.111 feature bundle mpls route +int eth1 eth 0000.0000.4444 $13b$ $13a$ +int eth2 eth 0000.0000.4444 $14a$ $14b$ +int eth3 eth 0000.0000.4444 $5b$ $5a$ +int eth4 eth 0000.0000.4444 $6b$ $6a$ +int eth5 eth 0000.0000.4444 $11b$ $11a$ +int eth6 eth 0000.0000.4444 $12b$ $12a$ +! +! + +addrouter r5 +int eth1 eth 0000.0000.5555 $3b$ $3a$ +! +vrf def v1 + rd 1:1 + exit +int lo0 + vrf for v1 + ipv4 addr 2.2.2.103 255.255.255.255 + ipv6 addr 4321::103 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff + exit +bridge 1 + mac-learn + block-unicast + exit +int eth1 + bridge-gr 1 + exit +int bvi1 + vrf for v1 + ipv4 addr 1.1.1.3 255.255.255.0 + ipv6 addr 1234::3 ffff:ffff:: + exit +ipv4 route v1 2.2.2.101 255.255.255.255 1.1.1.1 +ipv4 route v1 2.2.2.104 255.255.255.255 1.1.1.4 +ipv4 route v1 2.2.2.105 255.255.255.255 1.1.1.5 +ipv4 route v1 2.2.2.106 255.255.255.255 1.1.1.6 +ipv6 route v1 4321::101 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::1 +ipv6 route v1 4321::104 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::4 +ipv6 route v1 4321::105 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::5 +ipv6 route v1 4321::106 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::6 +! + +addrouter r6 +int eth1 eth 0000.0000.6666 $4b$ $4a$ +! +vrf def v1 + rd 1:1 + exit +int lo0 + vrf for v1 + ipv4 addr 2.2.2.104 255.255.255.255 + ipv6 addr 4321::104 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff + exit +int eth1 + vrf for v1 + ipv4 addr 1.1.1.4 255.255.255.0 + ipv6 addr 1234::4 ffff:ffff:: + exit +ipv4 route v1 2.2.2.101 255.255.255.255 1.1.1.1 +ipv4 route v1 2.2.2.103 255.255.255.255 1.1.1.3 +ipv4 route v1 2.2.2.105 255.255.255.255 1.1.1.5 +ipv4 route v1 2.2.2.106 255.255.255.255 1.1.1.6 +ipv6 route v1 4321::101 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::1 +ipv6 route v1 4321::103 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::3 +ipv6 route v1 4321::105 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::5 +ipv6 route v1 4321::106 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::6 +! + +addrouter r7 +int eth1 eth 0000.0000.7777 $9b$ $9a$ +! +vrf def v1 + rd 1:1 + exit +int lo0 + vrf for v1 + ipv4 addr 2.2.2.105 255.255.255.255 + ipv6 addr 4321::105 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff + exit +int eth1 + vrf for v1 + ipv4 addr 1.1.1.5 255.255.255.0 + ipv6 addr 1234::5 ffff:ffff:: + exit +ipv4 route v1 2.2.2.101 255.255.255.255 1.1.1.1 +ipv4 route v1 2.2.2.103 255.255.255.255 1.1.1.3 +ipv4 route v1 2.2.2.104 255.255.255.255 1.1.1.4 +ipv4 route v1 2.2.2.106 255.255.255.255 1.1.1.6 +ipv6 route v1 4321::101 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::1 +ipv6 route v1 4321::103 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::3 +ipv6 route v1 4321::104 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::4 +ipv6 route v1 4321::106 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::6 +! + +addrouter r8 +int eth1 eth 0000.0000.8888 $10b$ $10a$ +! +vrf def v1 + rd 1:1 + exit +int lo0 + vrf for v1 + ipv4 addr 2.2.2.106 255.255.255.255 + ipv6 addr 4321::106 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff + exit +int eth1 + vrf for v1 + ipv4 addr 1.1.1.6 255.255.255.0 + ipv6 addr 1234::6 ffff:ffff:: + exit +ipv4 route v1 2.2.2.101 255.255.255.255 1.1.1.1 +ipv4 route v1 2.2.2.103 255.255.255.255 1.1.1.3 +ipv4 route v1 2.2.2.104 255.255.255.255 1.1.1.4 +ipv4 route v1 2.2.2.105 255.255.255.255 1.1.1.5 +ipv6 route v1 4321::101 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::1 +ipv6 route v1 4321::103 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::3 +ipv6 route v1 4321::104 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::4 +ipv6 route v1 4321::105 ffff:ffff:ffff:ffff:ffff:ffff:ffff:ffff 1234::5 +! + + +r1 tping 100 10 1.1.1.1 vrf v1 +r1 tping 100 10 1234::1 vrf v1 +r1 tping 100 10 1.1.1.3 vrf v1 +r1 tping 100 10 1234::3 vrf v1 +r1 tping 100 10 1.1.1.4 vrf v1 +r1 tping 100 10 1234::4 vrf v1 +r1 tping 100 10 1.1.1.5 vrf v1 +r1 tping 100 10 1234::5 vrf v1 +r1 tping 100 10 1.1.1.6 vrf v1 +r1 tping 100 10 1234::6 vrf v1 + +r5 tping 100 10 1.1.1.1 vrf v1 +r5 tping 100 10 1234::1 vrf v1 +r5 tping 100 10 1.1.1.3 vrf v1 +r5 tping 100 10 1234::3 vrf v1 +r5 tping 100 10 1.1.1.4 vrf v1 +r5 tping 100 10 1234::4 vrf v1 +r5 tping 100 10 1.1.1.5 vrf v1 +r5 tping 100 10 1234::5 vrf v1 +r5 tping 100 10 1.1.1.6 vrf v1 +r5 tping 100 10 1234::6 vrf v1 + +r6 tping 100 10 1.1.1.1 vrf v1 +r6 tping 100 10 1234::1 vrf v1 +r6 tping 100 10 1.1.1.3 vrf v1 +r6 tping 100 10 1234::3 vrf v1 +r6 tping 100 10 1.1.1.4 vrf v1 +r6 tping 100 10 1234::4 vrf v1 +r6 tping 100 10 1.1.1.5 vrf v1 +r6 tping 100 10 1234::5 vrf v1 +r6 tping 100 10 1.1.1.6 vrf v1 +r6 tping 100 10 1234::6 vrf v1 + +r7 tping 100 10 1.1.1.1 vrf v1 +r7 tping 100 10 1234::1 vrf v1 +r7 tping 100 10 1.1.1.3 vrf v1 +r7 tping 100 10 1234::3 vrf v1 +r7 tping 100 10 1.1.1.4 vrf v1 +r7 tping 100 10 1234::4 vrf v1 +r7 tping 100 10 1.1.1.5 vrf v1 +r7 tping 100 10 1234::5 vrf v1 +r7 tping 100 10 1.1.1.6 vrf v1 +r7 tping 100 10 1234::6 vrf v1 + +r8 tping 100 10 1.1.1.1 vrf v1 +r8 tping 100 10 1234::1 vrf v1 +r8 tping 100 10 1.1.1.3 vrf v1 +r8 tping 100 10 1234::3 vrf v1 +r8 tping 100 10 1.1.1.4 vrf v1 +r8 tping 100 10 1234::4 vrf v1 +r8 tping 100 10 1.1.1.5 vrf v1 +r8 tping 100 10 1234::5 vrf v1 +r8 tping 100 10 1.1.1.6 vrf v1 +r8 tping 100 10 1234::6 vrf v1 + +r1 tping 100 10 2.2.2.101 vrf v1 sou lo0 +r1 tping 100 10 4321::101 vrf v1 sou lo0 +r1 tping 100 10 2.2.2.103 vrf v1 sou lo0 +r1 tping 100 10 4321::103 vrf v1 sou lo0 +r1 tping 100 10 2.2.2.104 vrf v1 sou lo0 +r1 tping 100 10 4321::104 vrf v1 sou lo0 +r1 tping 100 10 2.2.2.105 vrf v1 sou lo0 +r1 tping 100 10 4321::105 vrf v1 sou lo0 +r1 tping 100 10 2.2.2.106 vrf v1 sou lo0 +r1 tping 100 10 4321::106 vrf v1 sou lo0 + +r5 tping 100 10 2.2.2.101 vrf v1 sou lo0 +r5 tping 100 10 4321::101 vrf v1 sou lo0 +r5 tping 100 10 2.2.2.103 vrf v1 sou lo0 +r5 tping 100 10 4321::103 vrf v1 sou lo0 +r5 tping 100 10 2.2.2.104 vrf v1 sou lo0 +r5 tping 100 10 4321::104 vrf v1 sou lo0 +r5 tping 100 10 2.2.2.105 vrf v1 sou lo0 +r5 tping 100 10 4321::105 vrf v1 sou lo0 +r5 tping 100 10 2.2.2.106 vrf v1 sou lo0 +r5 tping 100 10 4321::106 vrf v1 sou lo0 + +r6 tping 100 10 2.2.2.101 vrf v1 sou lo0 +r6 tping 100 10 4321::101 vrf v1 sou lo0 +r6 tping 100 10 2.2.2.103 vrf v1 sou lo0 +r6 tping 100 10 4321::103 vrf v1 sou lo0 +r6 tping 100 10 2.2.2.104 vrf v1 sou lo0 +r6 tping 100 10 4321::104 vrf v1 sou lo0 +r6 tping 100 10 2.2.2.105 vrf v1 sou lo0 +r6 tping 100 10 4321::105 vrf v1 sou lo0 +r6 tping 100 10 2.2.2.106 vrf v1 sou lo0 +r6 tping 100 10 4321::106 vrf v1 sou lo0 + +r7 tping 100 10 2.2.2.101 vrf v1 sou lo0 +r7 tping 100 10 4321::101 vrf v1 sou lo0 +r7 tping 100 10 2.2.2.103 vrf v1 sou lo0 +r7 tping 100 10 4321::103 vrf v1 sou lo0 +r7 tping 100 10 2.2.2.104 vrf v1 sou lo0 +r7 tping 100 10 4321::104 vrf v1 sou lo0 +r7 tping 100 10 2.2.2.105 vrf v1 sou lo0 +r7 tping 100 10 4321::105 vrf v1 sou lo0 +r7 tping 100 10 2.2.2.106 vrf v1 sou lo0 +r7 tping 100 10 4321::106 vrf v1 sou lo0 + +r8 tping 100 10 2.2.2.101 vrf v1 sou lo0 +r8 tping 100 10 4321::101 vrf v1 sou lo0 +r8 tping 100 10 2.2.2.103 vrf v1 sou lo0 +r8 tping 100 10 4321::103 vrf v1 sou lo0 +r8 tping 100 10 2.2.2.104 vrf v1 sou lo0 +r8 tping 100 10 4321::104 vrf v1 sou lo0 +r8 tping 100 10 2.2.2.105 vrf v1 sou lo0 +r8 tping 100 10 4321::105 vrf v1 sou lo0 +r8 tping 100 10 2.2.2.106 vrf v1 sou lo0 +r8 tping 100 10 4321::106 vrf v1 sou lo0 + +r1 dping sdn . r8 2.2.2.103 vrf v1 sou lo0 +r1 dping sdn . r8 4321::103 vrf v1 sou lo0 diff --git a/src/org/freertr/serv/servOpenflow.java b/src/org/freertr/serv/servOpenflow.java index 76d392491a..ce62724a46 100644 --- a/src/org/freertr/serv/servOpenflow.java +++ b/src/org/freertr/serv/servOpenflow.java @@ -2,6 +2,7 @@ import java.util.List; import org.freertr.cfg.cfgAll; +import org.freertr.cfg.cfgBrdg; import org.freertr.cfg.cfgIfc; import org.freertr.cfg.cfgVrf; import org.freertr.ifc.ifcBridgeIfc; @@ -421,6 +422,28 @@ protected servOpenflowIfc1 findIfc(tabRouteIface ifc) { return null; } + /** + * find interface + * + * @param ifc interface + * @return interface, null if error + */ + protected servOpenflowIfc1 findIfc(cfgBrdg ifc) { + for (int i = 0; i < expIfc.size(); i++) { + servOpenflowIfc1 old = expIfc.get(i); + if (old.ifc == null) { + continue; + } + if (old.ifc.bridgeIfc != null) { + continue; + } + if (old.ifc.bridgeHed == ifc) { + return old; + } + } + return null; + } + /** * find interface * diff --git a/src/org/freertr/serv/servP4langConn.java b/src/org/freertr/serv/servP4langConn.java index 82328c400c..2164dd827e 100644 --- a/src/org/freertr/serv/servP4langConn.java +++ b/src/org/freertr/serv/servP4langConn.java @@ -1708,6 +1708,22 @@ private void doBrdg(servP4langBr br) { lower.sendLine("routedmac_" + a + " " + br.br.number + " " + ntry.adr.toEmuStr() + " " + nei.id + " " + p); continue; } + if (ntry.ifc.lowerIf == null) { + servStackFwd oth = lower.parent.findIfc(lower.parid, br.br); + if (oth == null) { + br.macs.del(ntry); + continue; + } + addrIP adr = servStack.forwarder2addr(oth.id); + ifc = servP4langUtil.forwarder2iface(lower, oth.id); + servP4langNei hop = lower.findNei(ifc, adr); + if (hop == null) { + br.macs.del(ntry); + continue; + } + lower.sendLine("bridgevpls_" + a + " " + br.br.number + " " + ntry.adr.toEmuStr() + " " + adr + " " + hop.id + " " + lower.parent.bckplnLab[oth.id] + " " + br.br.bridgeHed.label.label); + continue; + } servStackFwd oth = lower.parent.findIfc(lower.parid, ntry.ifc); if (oth != null) { addrIP adr = servStack.forwarder2addr(oth.id); diff --git a/src/org/freertr/serv/servStack.java b/src/org/freertr/serv/servStack.java index 55e3b2b120..43de228047 100644 --- a/src/org/freertr/serv/servStack.java +++ b/src/org/freertr/serv/servStack.java @@ -5,6 +5,7 @@ import org.freertr.addr.addrIP; import org.freertr.addr.addrPrefix; import org.freertr.cfg.cfgAll; +import org.freertr.cfg.cfgBrdg; import org.freertr.cfg.cfgIfc; import org.freertr.ifc.ifcBridgeIfc; import org.freertr.ifc.ifcEthTyp; @@ -552,6 +553,29 @@ public tabGen mergeMcast(servStackFwd who, tabGen fwd, ipFwd return res; } + /** + * find interface + * + * @param who querier + * @param ifc interface + * @return owner, null if error + */ + protected servStackFwd findIfc(servStackFwd who, cfgBrdg ifc) { + if (ifc == null) { + return null; + } + for (int i = 0; i < fwds.size(); i++) { + servStackFwd ntry = fwds.get(i); + if (ntry.id == who.id) { + continue; + } + if (ntry.findIfc(ifc)) { + return ntry; + } + } + return null; + } + /** * find interface * diff --git a/src/org/freertr/serv/servStackFwd.java b/src/org/freertr/serv/servStackFwd.java index f6d9db68cf..bdacdea8d6 100644 --- a/src/org/freertr/serv/servStackFwd.java +++ b/src/org/freertr/serv/servStackFwd.java @@ -2,6 +2,7 @@ import java.util.List; import org.freertr.addr.addrIP; +import org.freertr.cfg.cfgBrdg; import org.freertr.ifc.ifcBridgeIfc; import org.freertr.ifc.ifcEthTyp; import org.freertr.spf.spfCalc; @@ -120,6 +121,22 @@ protected void getShowRun(String beg, String mid, List l) { l.add(beg + mid + "remote " + remote); } + /** + * find interface + * + * @param ifc interface + * @return true if found + */ + protected boolean findIfc(cfgBrdg ifc) { + if (p4 != null) { + return p4.findIfc(ifc) != null; + } + if (of != null) { + return of.findIfc(ifc) != null; + } + return false; + } + /** * find interface * diff --git a/src/org/freertr/user/userExec.java b/src/org/freertr/user/userExec.java index 2fc4f5400f..ef59417fc5 100644 --- a/src/org/freertr/user/userExec.java +++ b/src/org/freertr/user/userExec.java @@ -1515,38 +1515,24 @@ public static void getHelpShow(userHelping hl, boolean privi) { hl.add(null, "2 3,. p4lang p4lang protocol information"); hl.add(cfgAll.dmnP4lang.listServers(), "3 4,. server name"); hl.add(null, "4 . general general status"); - hl.add(null, "4 5,. status current status"); - hl.add(null, "5 . [num] forwarder number"); - hl.add(null, "4 5,. api-tx transmitted api message statistics"); - hl.add(null, "5 . [num] forwarder number"); - hl.add(null, "4 5,. api-rx received api message statistics"); - hl.add(null, "5 . [num] forwarder number"); - hl.add(null, "4 5,. port-names front panel information"); - hl.add(null, "5 . [num] forwarder number"); - hl.add(null, "4 5,. port-magics front port magic values"); - hl.add(null, "5 . [num] forwarder number"); - hl.add(null, "4 5,. done-interface exported interfaces"); - hl.add(null, "5 . [num] forwarder number"); - hl.add(null, "4 5,. done-vrf exported vrfs"); - hl.add(null, "5 . [num] forwarder number"); - hl.add(null, "4 5,. done-neighbor exported neighbors"); - hl.add(null, "5 . [num] forwarder number"); - hl.add(null, "4 5,. done-mpls exported labels"); - hl.add(null, "5 . [num] forwarder number"); - hl.add(null, "4 5,. done-nsh exported chains"); - hl.add(null, "5 . [num] forwarder number"); + hl.add(null, "4 . status current status"); + hl.add(null, "4 . api-tx transmitted api message statistics"); + hl.add(null, "4 . api-rx received api message statistics"); + hl.add(null, "4 . port-names front panel information"); + hl.add(null, "4 . port-magics front port magic values"); + hl.add(null, "4 . done-interface exported interfaces"); + hl.add(null, "4 . done-vrf exported vrfs"); + hl.add(null, "4 . done-neighbor exported neighbors"); + hl.add(null, "4 . done-mpls exported labels"); + hl.add(null, "4 . done-nsh exported chains"); hl.add(null, "4 5 done-bridge exported bridge macs"); - hl.add(null, "5 6,. bridge number"); - hl.add(null, "6 . [num] forwarder number"); + hl.add(null, "5 . bridge number"); hl.add(null, "4 5 done-route4 exported ipv4 routes"); - hl.add(null, "5 6,. vrf number"); - hl.add(null, "6 . [num] forwarder number"); + hl.add(null, "5 . vrf number"); hl.add(null, "4 5 done-route6 exported ipv6 routes"); - hl.add(null, "5 6,. vrf number"); - hl.add(null, "6 . [num] forwarder number"); + hl.add(null, "5 . vrf number"); hl.add(null, "4 5 port-counters dataplane counters"); - hl.add(null, "5 6,. name of interface"); - hl.add(null, "6 . [num] forwarder number"); + hl.add(null, "5 . name of interface"); hl.add(null, "2 3,. stack stack protocol information"); hl.add(cfgAll.dmnStack.listServers(), "3 4,. server name"); hl.add(null, "4 . dataplanes dataplanes"); diff --git a/src/rtr.csv b/src/rtr.csv index eaa26596dd..490943357e 100644 --- a/src/rtr.csv +++ b/src/rtr.csv @@ -1,6 +1,6 @@ url;file;result;test -;-;-;freeRouter v24.12.24-cur, done by sprscc13@mrn0b0dy. --;-;-;2024-12-24 07:18:49, took 00:14:49, with 50 workers, on 3590 cases, 0 failed, 0 traces, 0 retries +-;-;-;2024-12-24 07:59:03, took 00:14:39, with 50 workers, on 3590 cases, 0 failed, 0 traces, 7 retries -;-;-;./rtr.bin http://sources.freertr.org/cfg/basic01.tst;basic01.tst;success;dummy test http://sources.freertr.org/cfg/basic02.tst;basic02.tst;success;interface with slot diff --git a/src/rtr.html b/src/rtr.html index 22a8748a86..375ff36d5d 100644 --- a/src/rtr.html +++ b/src/rtr.html @@ -10,7 +10,7 @@ tester release: freeRouter v24.12.24-cur, done by sprscc13@mrn0b0dy.
-tested: 2024-12-24 07:18:49, took 00:14:49, with 50 workers, on 3590 cases, 0 failed, 0 traces, 0 retries
+tested: 2024-12-24 07:59:03, took 00:14:39, with 50 workers, on 3590 cases, 0 failed, 0 traces, 7 retries
jvm: ./rtr.bin

diff --git a/src/rtr8.csv b/src/rtr8.csv index afe78a57a9..87f79869a8 100644 --- a/src/rtr8.csv +++ b/src/rtr8.csv @@ -1,6 +1,6 @@ url;file;result;test -;-;-;freeRouter v24.12.24-cur, done by sprscc13@mrn0b0dy. --;-;-;2024-12-24 07:29:25, took 00:10:14, with 50 workers, on 662 cases, 0 failed, 0 traces, 0 retries +-;-;-;2024-12-24 08:09:42, took 00:10:17, with 50 workers, on 662 cases, 0 failed, 0 traces, 0 retries -;-;-;./rtr.bin http://sources.freertr.org/cfg/p4lang-acl001.tst;p4lang-acl001.tst;success;p4lang: copp http://sources.freertr.org/cfg/p4lang-acl002.tst;p4lang-acl002.tst;success;p4lang: ingress access list diff --git a/src/rtr8.html b/src/rtr8.html index 1460b36c78..7f059bfc75 100644 --- a/src/rtr8.html +++ b/src/rtr8.html @@ -10,7 +10,7 @@ tester release: freeRouter v24.12.24-cur, done by sprscc13@mrn0b0dy.
-tested: 2024-12-24 07:29:25, took 00:10:14, with 50 workers, on 662 cases, 0 failed, 0 traces, 0 retries
+tested: 2024-12-24 08:09:42, took 00:10:17, with 50 workers, on 662 cases, 0 failed, 0 traces, 0 retries
jvm: ./rtr.bin

fileresulttest
fileresulttest