|
Here is a list of some of the common bridge commands that you may want to use. Examples are included so you can see what they actually will do.
Lesson 8 / Lesson 10
The "#" sign indicates that you need to run the command as root. You need to start each command with "brctl" and indicate the bridge you are referring to.
# brctl
Bridge firewalling registered
commands:
addbr <bridge> add bridge
# brctl addbr br0
addif <bridge> <device> add interface to bridge
# brctl addif br0 eth0 # brctl addif br0 eth1
delbr <bridge> delete bridge
delif <bridge> <device> delete interface from bridge
show show a list of bridges
showmacs <bridge> show a list of mac addrs
# brctl showmacs br0 port no mac addr is local? ageing timer 1 00:01:6b:db:ca:d2 no 0.09 2 00:12:bf:7f:59:b1 no 8.54 1 00:30:1d:a5:ae:39 yes 0.00 2 00:32:18:a5:ae:3a yes 0.00 2 00:30:48:6e:d6:b0 no 5.95
showstp <bridge> show bridge stp info
# brctl showstp br0 br0 bridge id 8000.003018b5ae39 designated root 8000.003018b5ae39 root port 0 path cost 0 max age 20.00 bridge max age 20.00 hello time 2.00 bridge hello time 2.00 forward delay 15.00 bridge forward delay 15.00 ageing time 300.01 hello timer 1.76 tcn timer 0.00 topology change timer 0.00 gc timer 1.76 flags
eth1 (1) port id 8001 state forwarding designated root 8000.003018b5ae39 path cost 19 designated bridge 8000.003018b5ae39 message age timer 0.00 designated port 8001 forward delay timer 0.00 designated cost 0 hold timer 0.76 flags
eth2 (2) port id 8002 state forwarding designated root 8000.003018b5ae39 path cost 19 designated bridge 8000.003018b5ae39 message age timer 0.00 designated port 8002 forward delay timer 0.00 designated cost 0 hold timer 0.76 flags
setageing <bridge> <time> set ageing time
setbridgeprio <bridge> <prio> set bridge priority
setfd <bridge> <time> set bridge forward delay
setgcint <bridge> <time> set garbage collection interval
sethello <bridge> <time> set hello time
setmaxage <bridge> <time> set max message age
setpathcost <bridge> <port> <cost> set path cost
setportprio <bridge> <port> <prio> set port priority
stp <bridge> <state> turn stp on/off
# brctl stp br0 off
Copyright CyberMontana Inc. and BeginLinux.com All rights reserved. Cannot be reproduced without written permission. Box 1262 Trout Creek, MT 59874
|