bridge.lists.linux.dev archive mirror
 help / color / mirror / Atom feed
* [Bridge] problems using bridge
@ 2010-04-14  9:28 张天园
  0 siblings, 0 replies; 3+ messages in thread
From: 张天园 @ 2010-04-14  9:28 UTC (permalink / raw)
  To: bridge

[-- Attachment #1: Type: text/plain, Size: 1033 bytes --]

Hi,
        I use the bridge these days but I come up with some problems when I use it.
        I add two wifi interfaces to the bridge I call it "br0" . What I do is as follows :
 #brctl addbr br0
#brctl addif br0 eth0
#brctl addif br0 eth1
#ifconfig eth0 0.0.0.0
#ifconfig eth1 0.0.0.0
#ifconfig br0 up
#dhclient br0
       The AP gives br0 the address 172.31.24.68 and the gateway is 172.31.24.1 (this detailed address maybe not important though)
      I use the command ifconfig and find that the br0's mac is the same as eth1's . When both the two wifi interfaces are up ,there's no problem when PING the gateway . But when I ifconfig eth1 down , PING the gateway again ,it shows destination host unreachable . But when I ifconfig eth0 down , it doesn't affect PING the gateway . I think this may because br0 is bound to eth1 , the traffic pass through eth1 . 
      Now here comes the problem . I want br0 bound to eth0 ,what should I do ?
     I'm looking forward to your answer and I'm eager to know it. Thank you very much .

[-- Attachment #2: Type: text/html, Size: 1457 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* [Bridge] problems using bridge
@ 2010-04-14  9:31 张天园
  2010-04-15 17:43 ` Stephen Hemminger
  0 siblings, 1 reply; 3+ messages in thread
From: 张天园 @ 2010-04-14  9:31 UTC (permalink / raw)
  To: bridge

[-- Attachment #1: Type: text/plain, Size: 1036 bytes --]

Hi,
        I use the bridge these days but I come up with some problems when I use it.
        I add two wifi interfaces to the bridge I call it "br0" . What I do is as follows :
 #brctl addbr br0
#brctl addif br0 eth0
#brctl addif br0 eth1
#ifconfig eth0 0.0.0.0
#ifconfig eth1 0.0.0.0
#ifconfig br0 up
#dhclient br0
       The AP gives br0 the address 172.31.24.68 and the gateway is 172.31.24.1 (this detailed address maybe not important though)
      I use the command ifconfig and find that the br0's mac is the same as eth1's . When both the two wifi interfaces are up ,there's no problem when PING the gateway . But when I ifconfig eth1 down , PING the gateway again ,it shows destination host unreachable . But when I ifconfig eth0 down , it doesn't affect PING the gateway . I think this may because br0 is bound to eth1 , the traffic pass through eth1 . 
      Now here comes the problem . I want br0 bound to eth0 ,what should I do ?
     I'm looking forward to your answer and I'm eager to know it. Thank you very much .



[-- Attachment #2: Type: text/html, Size: 1500 bytes --]

^ permalink raw reply	[flat|nested] 3+ messages in thread

* Re: [Bridge] problems using bridge
  2010-04-14  9:31 张天园
@ 2010-04-15 17:43 ` Stephen Hemminger
  0 siblings, 0 replies; 3+ messages in thread
From: Stephen Hemminger @ 2010-04-15 17:43 UTC (permalink / raw)
  To: 张天园; +Cc: bridge

On Wed, 14 Apr 2010 17:31:08 +0800 (CST)
张天园 <mariazty@163.com> wrote:

> Hi,
>         I use the bridge these days but I come up with some problems when I use it.
>         I add two wifi interfaces to the bridge I call it "br0" . What I do is as follows :
>  #brctl addbr br0
> #brctl addif br0 eth0
> #brctl addif br0 eth1
> #ifconfig eth0 0.0.0.0
> #ifconfig eth1 0.0.0.0
> #ifconfig br0 up
> #dhclient br0
>        The AP gives br0 the address 172.31.24.68 and the gateway is 172.31.24.1 (this detailed address maybe not important though)

You need to set forwarding delay to 0 or wait 30 seconds before starting dhclient
When bridge is brought up it waits 30 seconds before forwarding frames (part of
the STP standard).  If you aren't using STP then best answer is turn forwarding
delay off.

>       I use the command ifconfig and find that the br0's mac is the same as eth1's . When both the two wifi interfaces are up ,there's no problem when PING the gateway .
Bridge inherits the MAC address of the underlying interfaces.
With multiple interfaces, the MAC address of br0 will be min(interface MAC); unless
it is explicitly set.

> But when I ifconfig eth1 down , PING the gateway again ,it shows destination host unreachable . But when I ifconfig eth0 down , it doesn't affect PING the gateway . I think this may because br0 is bound to eth1 , the traffic pass through eth1 . 
>       Now here comes the problem . I want br0 bound to eth0 ,what should I do ?
>      I'm looking forward to your answer and I'm eager to know it. Thank you very much .

If you are trying to bridge wifi interfaces in station mode, it won't work.
Interfaces need to be either hardwared Ethernet or wifi AP mode.


^ permalink raw reply	[flat|nested] 3+ messages in thread

end of thread, other threads:[~2010-04-15 17:43 UTC | newest]

Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2010-04-14  9:28 [Bridge] problems using bridge 张天园
  -- strict thread matches above, loose matches on Subject: below --
2010-04-14  9:31 张天园
2010-04-15 17:43 ` Stephen Hemminger

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for NNTP newsgroup(s).