Como posso remover o atraso de encaminhamento da minha bridge com ip / iproute2?

0

Eu sei que isso é possível usando brctl setfd , mas foi sugerido para mim não usar o brctl e usar o iproute2 ou ip (como o brctl é obsoleto: link ). Se este conselho é bom como eu definiria o atraso de encaminhamento da minha bridge para zero com ip / iproute2?

    
por LukasGP 11.06.2017 / 05:13

1 resposta

1

Usando o iproute2:

# ip link add br0 type bridge   # forward_delay 0 can also be specified here
# ip link set br0 type bridge forward_delay 0
# ip -d link sh br0
4: br0:  mtu 1500 qdisc noop state DOWN mode DEFAULT group default qlen 1000
    link/ether 7a:21:f1:b3:08:8d brd ff:ff:ff:ff:ff:ff promiscuity 0 
    bridge forward_delay 0 hello_time 199 max_age 1999 ageing_time 29999 stp_state 0 priority 32768 vlan_filtering 0 vlan_protocol 802.1Q bridge_id 8000.0:0:0:0:0:0 designated_root 8000.0:0:0:0:0:0 root_port 0 root_path_cost 0 topology_change 0 topology_change_detected 0 hello_timer    0.00 tcn_timer    0.00 topology_change_timer    0.00 gc_timer    0.00 vlan_default_pvid 1 vlan_stats_enabled 0 group_fwd_mask 0 group_address 01:80:c2:00:00:00 mcast_snooping 1 mcast_router 1 mcast_query_use_ifaddr 0 mcast_querier 0 mcast_hash_elasticity 4 mcast_hash_max 512 mcast_last_member_count 2 mcast_startup_query_count 2 mcast_last_member_interval 99 mcast_membership_interval 25999 mcast_querier_interval 25499 mcast_query_interval 12499 mcast_query_response_interval 999 mcast_startup_query_interval 3124 mcast_stats_enabled 0 mcast_igmp_version 2 mcast_mld_version 1 nf_call_iptables 0 nf_call_ip6tables 0 nf_call_arptables 0 addrgenmode eui64 numtxqueues 1 numrxqueues 1 gso_max_size 65536 gso_max_segs 65535
# ip link help bridge
Usage: ... bridge [ fdb_flush ]
                  [ forward_delay FORWARD_DELAY ]
                  [ hello_time HELLO_TIME ]
                  [ max_age MAX_AGE ]
                  [ ageing_time AGEING_TIME ]
                  [ stp_state STP_STATE ]
                  [ priority PRIORITY ]
                  [ group_fwd_mask MASK ]
                  [ group_address ADDRESS ]
                  [ vlan_filtering VLAN_FILTERING ]
                  [ vlan_protocol VLAN_PROTOCOL ]
                  [ vlan_default_pvid VLAN_DEFAULT_PVID ]
                  [ vlan_stats_enabled VLAN_STATS_ENABLED ]
                  [ mcast_snooping MULTICAST_SNOOPING ]
                  [ mcast_router MULTICAST_ROUTER ]
                  [ mcast_query_use_ifaddr MCAST_QUERY_USE_IFADDR ]
                  [ mcast_querier MULTICAST_QUERIER ]
                  [ mcast_hash_elasticity HASH_ELASTICITY ]
                  [ mcast_hash_max HASH_MAX ]
                  [ mcast_last_member_count LAST_MEMBER_COUNT ]
                  [ mcast_startup_query_count STARTUP_QUERY_COUNT ]
                  [ mcast_last_member_interval LAST_MEMBER_INTERVAL ]
                  [ mcast_membership_interval MEMBERSHIP_INTERVAL ]
                  [ mcast_querier_interval QUERIER_INTERVAL ]
                  [ mcast_query_interval QUERY_INTERVAL ]
                  [ mcast_query_response_interval QUERY_RESPONSE_INTERVAL ]
                  [ mcast_startup_query_interval STARTUP_QUERY_INTERVAL ]
                  [ mcast_stats_enabled MCAST_STATS_ENABLED ]
                  [ mcast_igmp_version IGMP_VERSION ]
                  [ mcast_mld_version MLD_VERSION ]
                  [ nf_call_iptables NF_CALL_IPTABLES ]
                  [ nf_call_ip6tables NF_CALL_IP6TABLES ]
                  [ nf_call_arptables NF_CALL_ARPTABLES ]

Há também uma interface sysfs com a qual você pode interagir:

# cat /sys/class/net/br0/bridge/forward_delay 
0
    
por 14.06.2017 / 02:20