1 # Copyright (c) 2017 Intel Corporation
3 # Licensed under the Apache License, Version 2.0 (the "License")#
4 # you may not use this file except in compliance with the License.
5 # You may obtain a copy of the License at
7 # http:#www.apache.org/licenses/LICENSE-2.0
9 # Unless required by applicable law or agreed to in writing, software
10 # distributed under the License is distributed on an "AS IS" BASIS,
11 # WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
12 # See the License for the specific language governing permissions and
13 # limitations under the License.
16 link 0 config {port0_local_ip} {port0_prefixlen}
19 link 1 config {port1_local_ip} {port1_prefixlen}
30 #p acl add 1 0.0.0.0 0 0.0.0.0 0 0 65535 0 65535 0 0 0
31 #p acl add 1 0.0.0.0 0 0.0.0.0 0 0 65535 0 65535 0 0 1
33 # action rule matches dest port
34 p acl add 1 {port1_local_network} {port1_prefix} 0.0.0.0 0 0 65535 0 65535 0 0 0
35 p acl add 1 0.0.0.0 0 {port1_local_network} {port1_prefix} 0 65535 0 65535 0 0 1
37 p acl add 1 {port0_local_network} {port0_prefix} 0.0.0.0 0 0 65535 0 65535 0 0 1
38 p acl add 1 0.0.0.0 0 {port0_local_network} {port0_prefix} 0 65535 0 65535 0 0 0
40 p acl add 1 {port0_local_network} {port0_prefix} {port1_local_network} {port1_prefix} 0 65535 0 65535 0 0 1
41 p acl add 1 {port1_local_network} {port1_prefix} {port0_local_network} {port0_prefix} 0 65535 0 65535 0 0 0
43 # gateway is the remote port
44 p 1 arpadd 0 {port0_gateway} {port0_local_mac}
45 p 1 arpadd 0 {port0_local_ip} {port0_local_mac}
46 p 1 arpadd 0 {port0_dst_ip} {port0_dst_mac}
47 p 1 arpadd 1 {port1_gateway} {port1_local_mac}
48 p 1 arpadd 1 {port1_local_ip} {port1_local_mac}
49 p 1 arpadd 1 {port1_dst_ip} {port1_dst_mac}