basic_tx_common()
{
local af_str=$1; shift
local proto=$1; shift
local local_addr=$1; shift
local plen=$1; shift
local remote_addr=$1; shift
RET=0
# Test basic Tx functionality. Check that stats are incremented on # both the FDB nexthop group and the egress device.
run_cmd "ip -n $ns1 link add name dummy1 up type dummy"
run_cmd "ip -n $ns1 route add $remote_addr/$plen dev dummy1"
run_cmd "tc -n $ns1 qdisc add dev dummy1 clsact"
run_cmd "tc -n $ns1 filter add dev dummy1 egress proto $proto pref 1 handle 101 flower ip_proto udp dst_ip $remote_addr dst_port 4789 action pass"
run_cmd "ip -n $ns1 address add $local_addr/$plen dev lo"
run_cmd "ip -n $ns1 nexthop add id 1 via $remote_addr fdb"
run_cmd "ip -n $ns1 nexthop add id 10 group 1 fdb"
run_cmd "ip -n $ns1 link add name vx0 up type vxlan id 10010 local $local_addr dstport 4789"
run_cmd "bridge -n $ns1 fdb add 00:11:22:33:44:55 dev vx0 self static nhid 10"
run_cmd "ip netns exec $ns1 mausezahn vx0 -a own -b 00:11:22:33:44:55 -c 1 -q"
busywait "$BUSYWAIT_TIMEOUT" until_counter_is "== 1" nh_stats_get > /dev/null
check_err $? "FDB nexthop group stats did not increase"
busywait "$BUSYWAIT_TIMEOUT" until_counter_is "== 1" tc_stats_get > /dev/null
check_err $? "tc filter stats did not increase"
# When learning is enabled on the VXLAN device, an incoming packet # might try to refresh an FDB entry that points to an FDB nexthop group # instead of an ordinary remote destination. Check that the kernel does # not crash in this situation.
run_cmd "ip -n $ns1 address add 192.0.2.1/32 dev lo"
run_cmd "ip -n $ns1 address add 192.0.2.2/32 dev lo"
run_cmd "ip -n $ns1 nexthop add id 1 via 192.0.2.3 fdb"
run_cmd "ip -n $ns1 nexthop add id 10 group 1 fdb"
run_cmd "ip -n $ns1 link add name vx0 up type vxlan id 10010 local 192.0.2.1 dstport 12345 localbypass"
run_cmd "ip -n $ns1 link add name vx1 up type vxlan id 10020 local 192.0.2.2 dstport 54321 learning"
run_cmd "bridge -n $ns1 fdb add 00:11:22:33:44:55 dev vx0 self static dst 192.0.2.2 port 54321 vni 10020"
run_cmd "bridge -n $ns1 fdb add 00:aa:bb:cc:dd:ee dev vx1 self static nhid 10"
proxy_common()
{
local af_str=$1; shift
local local_addr=$1; shift
local plen=$1; shift
local remote_addr=$1; shift
local neigh_addr=$1; shift
local ping_cmd=$1; shift
RET=0
# When the "proxy" option is enabled on the VXLAN device, the device # will suppress ARP requests and IPv6 Neighbor Solicitation messages if # it is able to reply on behalf of the remote host. That is, if a # matching and valid neighbor entry is configured on the VXLAN device # whose MAC address is not behind the "any" remote (0.0.0.0 / ::). The # FDB entry for the neighbor's MAC address might point to an FDB # nexthop group instead of an ordinary remote destination. Check that # the kernel does not crash in this situation.
run_cmd "ip -n $ns1 address add $local_addr/$plen dev lo"
run_cmd "ip -n $ns1 nexthop add id 1 via $remote_addr fdb"
run_cmd "ip -n $ns1 nexthop add id 10 group 1 fdb"
run_cmd "ip -n $ns1 link add name vx0 up type vxlan id 10010 local $local_addr dstport 4789 proxy"
Die Informationen auf dieser Webseite wurden
nach bestem Wissen sorgfältig zusammengestellt. Es wird jedoch weder Vollständigkeit, noch Richtigkeit,
noch Qualität der bereit gestellten Informationen zugesichert.
Bemerkung:
Die farbliche Syntaxdarstellung und die Messung sind noch experimentell.