【网络工具】bridge(待补充Linux)

1 OpenBSD

ifconfig

The following options are available for a bridge interface:

add interface

Add interface as a member of the bridge. The interface is put into promiscuous mode so that it can receive every packet sent on the network. An interface can be a member of at most one bridge.

addr

Display the addresses that have been learned by the bridge.

del interface

Remove interface from the bridge. Promiscuous mode is turned off for the interface when it is removed from the bridge.

deladdr address

Delete address from the cache.

down

Stop the bridge from forwarding packets.

up

Start the bridge forwarding packets.

rule

block|pass [in | out] on interface [src lladdr] [dst lladdr] [tag tagname] [arp|rarp [request | reply] [sha lladdr] [spa ipaddr] [tha lladdr] [tpa ipaddr]]Add a filtering rule to an interface. Rules have a similar syntax to those in pf.conf. Rules can be used to selectively block or pass frames based on Ethernet MAC addresses or to tag packets for pf to filter on.

arp packets can be matched with the arp keyword for regular packets and rarp for reverse arp. request and reply limit matches to requests or replies. The source and target host addresses can be matched with the sha and tha keywords, and the protocol addresses with spa and tpa.

Rules are processed in the order in which they were added to the interface. The first rule matched takes the action (block or pass) and, if given, the tag of the rule. If no source or destination address is specified, the rule will match all frames (good for creating a catchall policy).

https://man.openbsd.org/ifconfig

2 NetBSD/QNX

SYNOPSIS

brconfig -a

brconfig bridge

brconfig bridge command [args …]

DESCRIPTION

​ Bridge interfaces are created using the ifconfig command’s create’’

​ sub-command. All other bridge configuration is performed using brconfig.`` up Start forwarding packets on the bridge.`` down Stop forwarding packets on the bridge.`` add interface Add the interface named by interface as a member of the bridge. The interface is put into promiscuous mode so that it can receive every packet sent on the network.`` delete interface Remove the interface named by interface from the bridge. Promis- cuous mode is disabled on the interface when it is removed from the bridge.`` addr Display the addresses that have been learned by the bridge.`` maxaddr size Set the size of the bridge address cache to size. The default is 100 entries.`` timeout seconds Set the timeout of address cache entries to seconds seconds. If seconds is zero, then address cache entries will not be expired. The default is 1200 seconds.`` deladdr address Delete address from the address cache.`` ipf Enable packet filtering with pfil on the bridge. The current

​ implementation passes all ARP and RARP packets through the bridge

​ while filtering IP and IPv6 packets through the configured packet

​ filter, such as npf. Other packet types are blocked. static interface address Add a static entry into the address cache pointing to interface. Static entries are never aged out of the cache or replaced, even if the address is seen on a different interface. priority value Set the bridge priority for Spanning Tree. The default is 32768. Allowed numerical values range from 0 (highest priority) to 65535 (lowest priority).

https://man.netbsd.org/brconfig.8

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值