# The full 4K VLAN space is too much to check, so strategically pick some # values which should provide reasonable coverage
vids=(0 1 2 5 10 20 50 100 200 500 1000 1000 2000 4000 4094)
send_non_ip()
{
local if_name=$1
local smac=$2
local dmac=$3
$MZ -q $if_name "$dmac $smac $NON_IP_PKT"
}
send_uc_ipv4()
{
local if_name=$1
local dmac=$2
ip neigh add $H2_IPV4 lladdr $dmac dev $if_name
ping_do $if_name $H2_IPV4
ip neigh del $H2_IPV4 dev $if_name
}
send_mc_ipv4()
{
local if_name=$1
ping_do $if_name $IPV4_ALLNODES "-I $if_name"
}
send_uc_ipv6()
{
local if_name=$1
local dmac=$2
ip -6 neigh add $H2_IPV6 lladdr $dmac dev $if_name
ping6_do $if_name $H2_IPV6
ip -6 neigh del $H2_IPV6 dev $if_name
}
send_mc_ipv6()
{
local if_name=$1
ping6_do $if_name $IPV6_ALLNODES%$if_name
}
check_rcv()
{
local if_name=$1
local type=$2
local pattern=$3
local should_fail=1
RET=0
tcpdump_show $if_name | grep -q "$pattern"
check_err_fail "$should_fail""$?""reception"
log_test "$type"
}
run_test()
{
local test_name="$1"
local smac=$(mac_get $h1)
local dmac=$(mac_get $h2)
local h1_ipv6_lladdr=$(ipv6_lladdr_get $h1)
local vid=
two_bridges()
{
ip link add br0 type bridge && ip link set br0 up
ip link add br1 type bridge && ip link set br1 up
ip link set $swp1 master br0
ip link set $swp2 master br1
run_test "Switch ports in different bridges"
ip link del br1
ip link del br0
}
one_bridge_two_pvids()
{
ip link add br0 type bridge vlan_filtering 1 vlan_default_pvid 0
ip link set br0 up
ip link set $swp1 master br0
ip link set $swp2 master br0
bridge vlan add dev $swp1 vid 1 pvid untagged
bridge vlan add dev $swp2 vid 2 pvid untagged
run_test "Switch ports in VLAN-aware bridge with different PVIDs"
ip link set dev $swp2 down
ip link set dev $swp1 down
h2_destroy
h1_destroy
vrf_cleanup
}
setup_prepare()
{
vrf_prepare
h1_create
h2_create # we call simple_if_init from the test itself, but setup_wait expects # that we call it from here, and waits until the interfaces are up
ip link set dev $swp1 up
ip link set dev $swp2 up
}
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.