@@ -3972,15 +3972,19 @@ def _vids():
3972
3972
proactive_learn_v4: True
3973
3973
interfaces:
3974
3974
%s:
3975
+ native_vlan: 99
3975
3976
tagged_vlans: [%s]
3976
3977
description: "b1"
3977
3978
%s:
3979
+ native_vlan: 99
3978
3980
tagged_vlans: [%s]
3979
3981
description: "b2"
3980
3982
%s:
3983
+ native_vlan: 99
3981
3984
tagged_vlans: [%s]
3982
3985
description: "b3"
3983
3986
%s:
3987
+ native_vlan: 99
3984
3988
tagged_vlans: [%s]
3985
3989
description: "b4"
3986
3990
""" % ('%(port_1)d' , ',' .join (STR_VIDS ),
@@ -3996,29 +4000,46 @@ def test_tagged(self):
3996
4000
vlan_int = '%s.%u' % (host .intf_root_name , vid )
3997
4001
ipa = '192.168.%u.%u' % (vid , i )
3998
4002
ipg = '192.168.%u.254' % vid
4003
+ ipd = '192.168.%u.253' % vid
3999
4004
setup_commands .extend ([
4000
4005
'ip link add link %s name %s type vlan id %u' % (
4001
4006
host .intf_root_name , vlan_int , vid ),
4002
4007
'ip link set dev %s up' % vlan_int ,
4003
4008
'ip address add %s/24 brd + dev %s' % (ipa , vlan_int ),
4009
+ 'arp -s %s 0e:00:00:00:00:01' % ipd ,
4010
+ 'fping -c1 -t1 -I%s %s > /dev/null 2> /dev/null' % (vlan_int , ipd ),
4004
4011
'ping -c1 -i0.1 -I%s %s > /dev/null' % (vlan_int , ipg )])
4005
4012
for j , _ in enumerate (hosts , start = 1 ):
4006
4013
if j != i :
4007
4014
other_ip = '192.168.%u.%u/32' % (vid , j )
4008
4015
setup_commands .append (
4009
4016
'ip -4 route add %s via %s' % (other_ip , ipg ))
4010
4017
self .quiet_commands (host , setup_commands )
4018
+
4019
+ # ensure learn ban present for down nexthop
4020
+ self .wait_nonzero_packet_count_flow (
4021
+ {u'dl_type' : 2048 , u'dl_vlan' : u'2047' , u'nw_dst' : u'192.168.101.253' },
4022
+ table_id = self ._IPV4_FIB_TABLE , actions = [])
4023
+
4011
4024
host , other_host = hosts
4012
- host_ip = ipaddress .ip_address (unicode (host .IP ())) # pytype: disable=name-error
4013
- other_host_ip = ipaddress .ip_address (unicode (other_host .IP ())) # pytype: disable=name-error
4014
- self .verify_iperf_min (
4015
- ((host , self .port_map ['port_1' ]),
4016
- (other_host , self .port_map ['port_2' ])),
4017
- 1 , host_ip , other_host_ip )
4025
+ for ip_pair in (
4026
+ (host .IP (), other_host .IP ()), # non-routed
4027
+ ('192.168.%u.1' % self .NEW_VIDS [0 ], '192.168.%u.2' % self .NEW_VIDS [0 ])): # non-routed
4028
+ host_ip_str , other_ip_str = ip_pair
4029
+ host_ip = ipaddress .ip_address (unicode (host_ip_str ))
4030
+ other_ip = ipaddress .ip_address (unicode (other_ip_str ))
4031
+ self .verify_iperf_min (
4032
+ ((host , self .port_map ['port_1' ]),
4033
+ (other_host , self .port_map ['port_2' ])),
4034
+ 1 , host_ip , other_ip )
4035
+
4018
4036
for vid in self .NEW_VIDS :
4037
+ host_vlan_int = '%s.%u' % (host .intf_root_name , vid )
4038
+ other_vlan_int = '%s.%u' % (other_host .intf_root_name , vid )
4039
+ host_ip = '192.168.%u.%u' % (vid , 1 )
4019
4040
other_ip = '192.168.%u.%u' % (vid , 2 )
4020
- vlan_int = '%s.%u' % (host . intf_root_name , vid )
4021
- self .one_ipv4_ping (host , other_ip , intf = vlan_int )
4041
+ self . one_ipv4_ping (host , other_ip , intf = host_vlan_int )
4042
+ self .one_ipv4_ping (other_host , host_ip , intf = other_vlan_int )
4022
4043
4023
4044
4024
4045
class FaucetTaggedScaleTest (FaucetTaggedTest ):
0 commit comments