Loading src/tests/acl_end2end/clab/acl_end2end.clab.yml +7 −7 Original line number Diff line number Diff line Loading @@ -45,10 +45,10 @@ topology: kind: linux mgmt-ipv4: 172.20.20.200 exec: - ip link set address 00:c1:ab:00:01:0a dev eth1 - ip address add 172.16.1.10/24 dev eth1 - ip route add 172.16.11.0/24 via 172.16.1.1 - ip route add 172.16.12.0/24 via 172.16.1.1 - ip link set address 00:c1:ab:00:0a:0a dev eth1 - ip address add 172.16.10.10/24 dev eth1 - ip route add 172.16.11.0/24 via 172.16.10.1 - ip route add 172.16.12.0/24 via 172.16.10.1 client1: kind: linux Loading @@ -56,7 +56,7 @@ topology: exec: - ip link set address 00:c1:ab:00:0b:0a dev eth1 - ip address add 172.16.11.10/24 dev eth1 - ip route add 172.16.1.0/24 via 172.16.11.1 - ip route add 172.16.10.0/24 via 172.16.11.1 - ip route add 172.16.12.0/24 via 172.16.11.1 client2: Loading @@ -65,10 +65,10 @@ topology: exec: - ip link set address 00:c1:ab:00:0c:0a dev eth1 - ip address add 172.16.12.10/24 dev eth1 - ip route add 172.16.1.0/24 via 172.16.12.1 - ip route add 172.16.10.0/24 via 172.16.12.1 - ip route add 172.16.11.0/24 via 172.16.12.1 links: - endpoints: ["firewall:eth1", "dc:eth1" ] - endpoints: ["firewall:eth10", "dc:eth1" ] - endpoints: ["firewall:eth11", "client1:eth1"] - endpoints: ["firewall:eth12", "client2:eth1"] src/tests/acl_end2end/clab/firewall-startup.cfg +2 −2 Original line number Diff line number Diff line Loading @@ -27,8 +27,8 @@ management api gnmi management api netconf transport ssh default ! interface Ethernet1 ip address 172.16.1.1/24 interface Ethernet10 ip address 172.16.10.1/24 no shutdown ! interface Ethernet11 Loading src/tests/acl_end2end/data/ietf-acl.json +30 −9 Original line number Diff line number Diff line { "ietf-access-control-list:acls": { "acl": [{ "name": "block-client1-ping-permit-other", "name": "eth11-block-ping-permit-other", "type": "ipv4-acl-type", "aces": { "ace": [{ "name": "block-client1-ping", "name": "eth11-block-ping", "matches": { "ingress-interface": "Ethernet10", "ingress-interface": "Ethernet11", "ipv4": { "protocol": 1, "source-ipv4-network": "172.16.1.10/32", "destination-ipv4-network": "172.16.0.10/32" "source-ipv4-network": "172.16.11.10/32", "destination-ipv4-network": "172.16.1.10/32" }, "icmp": {} }, "actions": {"forwarding": "reject"} }, { "name": "permit-other", "name": "eth11-permit-other", "matches": { "ingress-interface": "Ethernet10" "ingress-interface": "Ethernet11" }, "actions": {"forwarding": "accept"} }] } }, { "name": "eth12-permit-other", "type": "ipv4-acl-type", "aces": { "ace": [{ "name": "eth12-permit-other", "matches": { "ingress-interface": "Ethernet12" }, "actions": {"forwarding": "accept"} }] Loading @@ -28,10 +41,18 @@ }], "attachment-points": { "interface": [{ "interface-id": "Ethernet10", "interface-id": "Ethernet11", "ingress": { "acl-sets": { "acl-set": [{"name": "eth11-block-ping-permit-other"}] } } }, { "interface-id": "Ethernet12", "ingress": { "acl-sets": { "acl-set": [{"name": "block-client1-ping-permit-other"}] "acl-set": [{"name": "eth12-permit-other"}] } } }] Loading src/tests/acl_end2end/data/tfs-topology.json +14 −14 Original line number Diff line number Diff line Loading @@ -53,47 +53,47 @@ ], "links": [ { "link_id": {"link_uuid": {"uuid": "firewall/Ethernet10==client1/eth1"}}, "link_id": {"link_uuid": {"uuid": "firewall/Ethernet10==dc/eth1"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}, {"device_id": {"device_uuid": {"uuid": "client1"}}, "endpoint_uuid": {"uuid": "eth1"}} {"device_id": {"device_uuid": {"uuid": "dc"}}, "endpoint_uuid": {"uuid": "eth1"}} ] }, { "link_id": {"link_uuid": {"uuid": "client1/eth1==firewall/Ethernet10"}}, "link_id": {"link_uuid": {"uuid": "dc/eth1==firewall/Ethernet10"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "client1"}}, "endpoint_uuid": {"uuid": "eth1"}}, {"device_id": {"device_uuid": {"uuid": "dc"}}, "endpoint_uuid": {"uuid": "eth1"}}, {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet10"}} ] }, { "link_id": {"link_uuid": {"uuid": "firewall/Ethernet2==dc/eth1"}}, "link_id": {"link_uuid": {"uuid": "firewall/Ethernet11==client1/eth1"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet2"}}, {"device_id": {"device_uuid": {"uuid": "dc"}}, "endpoint_uuid": {"uuid": "eth1"}} {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet11"}}, {"device_id": {"device_uuid": {"uuid": "client1"}}, "endpoint_uuid": {"uuid": "eth1"}} ] }, { "link_id": {"link_uuid": {"uuid": "dc/eth1==firewall/Ethernet2"}}, "link_id": {"link_uuid": {"uuid": "client1/eth1==firewall/Ethernet11"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "dc"}}, "endpoint_uuid": {"uuid": "eth1"}}, {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet2"}} {"device_id": {"device_uuid": {"uuid": "client1"}}, "endpoint_uuid": {"uuid": "eth1"}}, {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet11"}} ] }, { "link_id": {"link_uuid": {"uuid": "firewall/Ethernet3==client2/eth1"}}, "link_id": {"link_uuid": {"uuid": "firewall/Ethernet12==client2/eth1"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet3"}}, {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet12"}}, {"device_id": {"device_uuid": {"uuid": "client2"}}, "endpoint_uuid": {"uuid": "eth1"}} ] }, { "link_id": {"link_uuid": {"uuid": "client2/eth1==firewall/Ethernet3"}}, "link_id": {"link_uuid": {"uuid": "client2/eth1==firewall/Ethernet12"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "client2"}}, "endpoint_uuid": {"uuid": "eth1"}}, {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet3"}} {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet12"}} ] } ] Loading Loading
src/tests/acl_end2end/clab/acl_end2end.clab.yml +7 −7 Original line number Diff line number Diff line Loading @@ -45,10 +45,10 @@ topology: kind: linux mgmt-ipv4: 172.20.20.200 exec: - ip link set address 00:c1:ab:00:01:0a dev eth1 - ip address add 172.16.1.10/24 dev eth1 - ip route add 172.16.11.0/24 via 172.16.1.1 - ip route add 172.16.12.0/24 via 172.16.1.1 - ip link set address 00:c1:ab:00:0a:0a dev eth1 - ip address add 172.16.10.10/24 dev eth1 - ip route add 172.16.11.0/24 via 172.16.10.1 - ip route add 172.16.12.0/24 via 172.16.10.1 client1: kind: linux Loading @@ -56,7 +56,7 @@ topology: exec: - ip link set address 00:c1:ab:00:0b:0a dev eth1 - ip address add 172.16.11.10/24 dev eth1 - ip route add 172.16.1.0/24 via 172.16.11.1 - ip route add 172.16.10.0/24 via 172.16.11.1 - ip route add 172.16.12.0/24 via 172.16.11.1 client2: Loading @@ -65,10 +65,10 @@ topology: exec: - ip link set address 00:c1:ab:00:0c:0a dev eth1 - ip address add 172.16.12.10/24 dev eth1 - ip route add 172.16.1.0/24 via 172.16.12.1 - ip route add 172.16.10.0/24 via 172.16.12.1 - ip route add 172.16.11.0/24 via 172.16.12.1 links: - endpoints: ["firewall:eth1", "dc:eth1" ] - endpoints: ["firewall:eth10", "dc:eth1" ] - endpoints: ["firewall:eth11", "client1:eth1"] - endpoints: ["firewall:eth12", "client2:eth1"]
src/tests/acl_end2end/clab/firewall-startup.cfg +2 −2 Original line number Diff line number Diff line Loading @@ -27,8 +27,8 @@ management api gnmi management api netconf transport ssh default ! interface Ethernet1 ip address 172.16.1.1/24 interface Ethernet10 ip address 172.16.10.1/24 no shutdown ! interface Ethernet11 Loading
src/tests/acl_end2end/data/ietf-acl.json +30 −9 Original line number Diff line number Diff line { "ietf-access-control-list:acls": { "acl": [{ "name": "block-client1-ping-permit-other", "name": "eth11-block-ping-permit-other", "type": "ipv4-acl-type", "aces": { "ace": [{ "name": "block-client1-ping", "name": "eth11-block-ping", "matches": { "ingress-interface": "Ethernet10", "ingress-interface": "Ethernet11", "ipv4": { "protocol": 1, "source-ipv4-network": "172.16.1.10/32", "destination-ipv4-network": "172.16.0.10/32" "source-ipv4-network": "172.16.11.10/32", "destination-ipv4-network": "172.16.1.10/32" }, "icmp": {} }, "actions": {"forwarding": "reject"} }, { "name": "permit-other", "name": "eth11-permit-other", "matches": { "ingress-interface": "Ethernet10" "ingress-interface": "Ethernet11" }, "actions": {"forwarding": "accept"} }] } }, { "name": "eth12-permit-other", "type": "ipv4-acl-type", "aces": { "ace": [{ "name": "eth12-permit-other", "matches": { "ingress-interface": "Ethernet12" }, "actions": {"forwarding": "accept"} }] Loading @@ -28,10 +41,18 @@ }], "attachment-points": { "interface": [{ "interface-id": "Ethernet10", "interface-id": "Ethernet11", "ingress": { "acl-sets": { "acl-set": [{"name": "eth11-block-ping-permit-other"}] } } }, { "interface-id": "Ethernet12", "ingress": { "acl-sets": { "acl-set": [{"name": "block-client1-ping-permit-other"}] "acl-set": [{"name": "eth12-permit-other"}] } } }] Loading
src/tests/acl_end2end/data/tfs-topology.json +14 −14 Original line number Diff line number Diff line Loading @@ -53,47 +53,47 @@ ], "links": [ { "link_id": {"link_uuid": {"uuid": "firewall/Ethernet10==client1/eth1"}}, "link_id": {"link_uuid": {"uuid": "firewall/Ethernet10==dc/eth1"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet10"}}, {"device_id": {"device_uuid": {"uuid": "client1"}}, "endpoint_uuid": {"uuid": "eth1"}} {"device_id": {"device_uuid": {"uuid": "dc"}}, "endpoint_uuid": {"uuid": "eth1"}} ] }, { "link_id": {"link_uuid": {"uuid": "client1/eth1==firewall/Ethernet10"}}, "link_id": {"link_uuid": {"uuid": "dc/eth1==firewall/Ethernet10"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "client1"}}, "endpoint_uuid": {"uuid": "eth1"}}, {"device_id": {"device_uuid": {"uuid": "dc"}}, "endpoint_uuid": {"uuid": "eth1"}}, {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet10"}} ] }, { "link_id": {"link_uuid": {"uuid": "firewall/Ethernet2==dc/eth1"}}, "link_id": {"link_uuid": {"uuid": "firewall/Ethernet11==client1/eth1"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet2"}}, {"device_id": {"device_uuid": {"uuid": "dc"}}, "endpoint_uuid": {"uuid": "eth1"}} {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet11"}}, {"device_id": {"device_uuid": {"uuid": "client1"}}, "endpoint_uuid": {"uuid": "eth1"}} ] }, { "link_id": {"link_uuid": {"uuid": "dc/eth1==firewall/Ethernet2"}}, "link_id": {"link_uuid": {"uuid": "client1/eth1==firewall/Ethernet11"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "dc"}}, "endpoint_uuid": {"uuid": "eth1"}}, {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet2"}} {"device_id": {"device_uuid": {"uuid": "client1"}}, "endpoint_uuid": {"uuid": "eth1"}}, {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet11"}} ] }, { "link_id": {"link_uuid": {"uuid": "firewall/Ethernet3==client2/eth1"}}, "link_id": {"link_uuid": {"uuid": "firewall/Ethernet12==client2/eth1"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet3"}}, {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet12"}}, {"device_id": {"device_uuid": {"uuid": "client2"}}, "endpoint_uuid": {"uuid": "eth1"}} ] }, { "link_id": {"link_uuid": {"uuid": "client2/eth1==firewall/Ethernet3"}}, "link_id": {"link_uuid": {"uuid": "client2/eth1==firewall/Ethernet12"}}, "link_endpoint_ids": [ {"device_id": {"device_uuid": {"uuid": "client2"}}, "endpoint_uuid": {"uuid": "eth1"}}, {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet3"}} {"device_id": {"device_uuid": {"uuid": "firewall"}}, "endpoint_uuid": {"uuid": "Ethernet12"}} ] } ] Loading