All of lore.kernel.org
 help / color / mirror / Atom feed
* performance about use Linux as a router
@ 2011-07-06 11:17 jiangtao.jit
  2011-07-06 12:09 ` Calvin Johnson
  0 siblings, 1 reply; 7+ messages in thread
From: jiangtao.jit @ 2011-07-06 11:17 UTC (permalink / raw)
  To: kernelnewbies

dear all:

i have a x86 PC and i use it as a router
the kernel is 2.6.38

there are two NICs: eth0 and eth1

i configed eth0 as 10.1.0.1
and eth1 as 11.1.0.1
Linux will route between these two cards
and it worked ok in the old days

but recently, i had added a new NIC as eth2 for LAN
so i add a bridge br0 and config it as 10.1.0.1 
then i configed eth0 and eth2 under br0
no ip on eth0 now
like
br0(10.1.0.1)             eth1(11.1.0.1)
     /           \
 eth0          eth2
 |               |
LAN           LAN

i expected that the performance will be better
but unfortunately things become worse

the PC lost packets now

at first, i think maybe there is a loop Under br0, so i disconnected the wire on eth2 or eth0
nothing changed, packets still lost

then i remove br0
config is as before
its'
            eth0(10.1.0.1)          eth1(11.1.0.1)
             |
LAN

then everthing becomes fine, no packet lost

i can't explain why, 
any idea?

thanks




2011-07-06 



jiangtao.jit 
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110706/a30d9182/attachment.html 

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

* performance about use Linux as a router
  2011-07-06 11:17 jiangtao.jit
@ 2011-07-06 12:09 ` Calvin Johnson
  0 siblings, 0 replies; 7+ messages in thread
From: Calvin Johnson @ 2011-07-06 12:09 UTC (permalink / raw)
  To: kernelnewbies

Why don't you use tcpdump/wireshark to see where the packets are being
dropped?
What kind of traffic are you passing?
Is it bidirectional?
Also post your route information.

regards,
Calvin

On Wed, Jul 6, 2011 at 4:47 PM, jiangtao.jit <jiangtao.jit@gmail.com> wrote:

> **
> dear all:
>
> i have a x86 PC and i use it as a router
> the kernel is 2.6.38
>
> there are two NICs: eth0 and eth1
>
> i configed eth0 as 10.1.0.1
> and eth1 as 11.1.0.1
> Linux will route between these two cards
> and it worked ok in the old days
>
> but recently, i had added a new NIC as eth2 for LAN
> so i add a bridge br0 and config it as 10.1.0.1
> then i configed eth0 and eth2 under br0
> no ip on eth0 now
> like
> br0(10.1.0.1)             eth1(11.1.0.1)
>      /           \
>  eth0          eth2
>  |               |
> LAN           LAN
>
> i expected that the performance will be better
> but unfortunately things become worse
>
> the PC lost packets now
>
> at first, i think maybe there is a loop Under br0, so i disconnected the
> wire on eth2 or eth0
> nothing changed, packets still lost
>
> then i remove br0
> config is as before
> its'
>             eth0(10.1.0.1)          eth1(11.1.0.1)
>              |
> LAN
>
> then everthing becomes fine, no packet lost
>
> i can't explain why,
> any idea?
>
> thanks
>
>
>
>
> 2011-07-06
> ------------------------------
> jiangtao.jit
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110706/1acb627c/attachment.html 

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

* performance about use Linux as a router
@ 2011-07-06 14:59 jiangtao.jit
  2011-07-06 15:48 ` jiangtao.jit
  2011-07-07  2:44 ` Tharindu Rukshan Bamunuarachchi
  0 siblings, 2 replies; 7+ messages in thread
From: jiangtao.jit @ 2011-07-06 14:59 UTC (permalink / raw)
  To: kernelnewbies

dear all:

i have a x86 PC and i use it as a router
the kernel is 2.6.38

there are two NICs: eth0 and eth1

i configed eth0 as 10.1.0.1
and eth1 as 11.1.0.1
Linux will route between these two cards
and it worked ok in the old days

but recently, i had added a new NIC as eth2 for LAN
so i add a bridge br0 and config it as 10.1.0.1 
then i configed eth0 and eth2 under br0
no ip on eth0 now
like
br0(10.1.0.1)             eth1(11.1.0.1)
     /           \
 eth0          eth2
 |               |
LAN           LAN

i expected that the performance will be better
but unfortunately things become worse

the PC lost packets now

at first, i think maybe there is a loop Under br0, so i disconnected the wire on eth2 or eth0
nothing changed, packets still lost

then i remove br0
config is as before
its'
            eth0(10.1.0.1)          eth1(11.1.0.1)
             |
            LAN

then everthing becomes fine, no packet lost

i can't explain why, 
any idea?

thanks

2011-07-06 



jiangtao.jit 

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

* performance about use Linux as a router
  2011-07-06 14:59 performance about use Linux as a router jiangtao.jit
@ 2011-07-06 15:48 ` jiangtao.jit
  2011-07-06 16:23   ` Kristof Provost
  2011-07-07  2:44 ` Tharindu Rukshan Bamunuarachchi
  1 sibling, 1 reply; 7+ messages in thread
From: jiangtao.jit @ 2011-07-06 15:48 UTC (permalink / raw)
  To: kernelnewbies

>On Wed, Jul 6, 2011 at 3:59 PM, jiangtao.jit <jiangtao.jit@gmail.com> wrote:
>> dear all:
>>
>> i have a x86 PC and i use it as a router
>> the kernel is 2.6.38
>>
>> there are two NICs: eth0 and eth1
>>

>Can you show the interface configs for both the NICS and the Bridge?


dear Sunny:

these are the commands i used
1.i use      ifconfig eth0 0.0.0.0    cleared the eth0's ip
2.brctl addbr br0
3.brctl addif br0 eth0
4.ifconfig br0 10.1.0.1
5.brctl show         like 
bridge name     bridge id               STP enabled     interfaces
br0                                                no              eth0
6.route          like
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
10.0.0.0        *               255.0.0.0       U     0      0        0 br0
11.0.0.0        *               255.0.0.0       U     0      0        0 eth1
default         11.1.0.2        0.0.0.0         UG    0      0        0 eth1 

are these info useful?
thanks


---------------------

2011-07-06 
jiangtao.jit 

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

* performance about use Linux as a router
  2011-07-06 15:48 ` jiangtao.jit
@ 2011-07-06 16:23   ` Kristof Provost
  0 siblings, 0 replies; 7+ messages in thread
From: Kristof Provost @ 2011-07-06 16:23 UTC (permalink / raw)
  To: kernelnewbies

On 2011-07-06 23:48:18 (+0800), jiangtao.jit <jiangtao.jit@gmail.com> wrote:
> 5.brctl show         like 
> bridge name     bridge id               STP enabled     interfaces
> br0                                                no              eth0

You've got a loop in your Ethernet network and spanning tree is
disabled.
The surprising bit is that you manage to get any packets through at all.

Ethernet packets don't have a TTL field, so if they end up in a loop
(for example br0 -> eth0 -> LAN -> eth1 -> br0 -> ...) they just keep
getting repeated.

brctl br0 stp on should fix your network.

I suspect you're trying to do bonding though, which (as far as I know,
having never played with it myself) is configured completely differently 
and might require support from the switch.

Regards,
Kristof

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

* performance about use Linux as a router
  2011-07-06 14:59 performance about use Linux as a router jiangtao.jit
  2011-07-06 15:48 ` jiangtao.jit
@ 2011-07-07  2:44 ` Tharindu Rukshan Bamunuarachchi
  2011-07-07 11:47   ` tao jiang
  1 sibling, 1 reply; 7+ messages in thread
From: Tharindu Rukshan Bamunuarachchi @ 2011-07-07  2:44 UTC (permalink / raw)
  To: kernelnewbies

in this case you are creating STP loop and enable of STP will disable either
eth1 or eth0.

what are you trying achieve ? Is it just sending packets over both ethernet
interfaces ?

you better bond those two ethernet interfaces. you need switch configuration
for proper incoming traffic flow.
__
Tharindu "Rukshan" Bamunuarachchi






On Wed, Jul 6, 2011 at 8:29 PM, jiangtao.jit <jiangtao.jit@gmail.com> wrote:

> dear all:
>
> i have a x86 PC and i use it as a router
> the kernel is 2.6.38
>
> there are two NICs: eth0 and eth1
>
> i configed eth0 as 10.1.0.1
> and eth1 as 11.1.0.1
> Linux will route between these two cards
> and it worked ok in the old days
>
> but recently, i had added a new NIC as eth2 for LAN
> so i add a bridge br0 and config it as 10.1.0.1
> then i configed eth0 and eth2 under br0
> no ip on eth0 now
> like
> br0(10.1.0.1)             eth1(11.1.0.1)
>     /           \
>  eth0          eth2
>  |               |
> LAN           LAN
>
> i expected that the performance will be better
> but unfortunately things become worse
>
> the PC lost packets now
>
> at first, i think maybe there is a loop Under br0, so i disconnected the
> wire on eth2 or eth0
> nothing changed, packets still lost
>
> then i remove br0
> config is as before
> its'
>            eth0(10.1.0.1)          eth1(11.1.0.1)
>             |
>            LAN
>
> then everthing becomes fine, no packet lost
>
> i can't explain why,
> any idea?
>
> thanks
>
> 2011-07-06
>
>
>
> jiangtao.jit
>
>
> _______________________________________________
> Kernelnewbies mailing list
> Kernelnewbies at kernelnewbies.org
> http://lists.kernelnewbies.org/mailman/listinfo/kernelnewbies
>
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.kernelnewbies.org/pipermail/kernelnewbies/attachments/20110707/b53f8806/attachment.html 

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

* performance about use Linux as a router
  2011-07-07  2:44 ` Tharindu Rukshan Bamunuarachchi
@ 2011-07-07 11:47   ` tao jiang
  0 siblings, 0 replies; 7+ messages in thread
From: tao jiang @ 2011-07-07 11:47 UTC (permalink / raw)
  To: kernelnewbies

2011/7/7 Tharindu Rukshan Bamunuarachchi <btharindu@gmail.com>:
> in this case you are creating STP loop and enable of STP will disable either
> eth1 or eth0.
>
> what are you trying achieve ? Is it just sending packets over both ethernet
> interfaces ?
>
> you better bond those two ethernet interfaces. you need switch configuration
> for proper incoming traffic flow.
> __
> Tharindu "Rukshan" Bamunuarachchi
>
>
>You've got a loop in your Ethernet network and spanning tree is
>disabled.
>The surprising bit is that you manage to get any packets through at all.

>Ethernet packets don't have a TTL field, so if they end up in a loop
>(for example br0 -> eth0 -> LAN -> eth1 -> br0 -> ...) they just keep
>getting repeated.
>
>brctl br0 stp on should fix your network.
>
>I suspect you're trying to do bonding though, which (as far as I know,
>having never played with it myself) is configured completely differently
>and might require support from the switch.
>
>Regards,
>Kristof
>
>

thank you all

today i tried to bring STP on
it seems better now

i did some filtering also

thanks again

best regards.

---------------

jiangtao

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

end of thread, other threads:[~2011-07-07 11:47 UTC | newest]

Thread overview: 7+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2011-07-06 14:59 performance about use Linux as a router jiangtao.jit
2011-07-06 15:48 ` jiangtao.jit
2011-07-06 16:23   ` Kristof Provost
2011-07-07  2:44 ` Tharindu Rukshan Bamunuarachchi
2011-07-07 11:47   ` tao jiang
  -- strict thread matches above, loose matches on Subject: below --
2011-07-06 11:17 jiangtao.jit
2011-07-06 12:09 ` Calvin Johnson

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.