All of lore.kernel.org
 help / color / mirror / Atom feed
* [BRIDGE]A basic question: what's the relationship of the Rx/Tx packets count between the bridge and its enslaved NIC.
@ 2005-08-16  3:40 Steven Zhang
  2005-08-17 16:21 ` Stephen Hemminger
  0 siblings, 1 reply; 4+ messages in thread
From: Steven Zhang @ 2005-08-16  3:40 UTC (permalink / raw)
  To: bridge

I have a bridge br0, it enslaves two NICs: eth0 and eth1. 
By using "cat /proc/net/dev ", i can see the Rx/Tx packets and bytes
through each interface. just like this:

[* time tick 1 *]

Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed
multicast|bytes    packets errs drop fifo colls carrier compressed
    lo: 3926521   14121    0    0    0     0          0         0 
3926521   14121    0    0    0     0       0          0
  eth0: 7255431   37878    0    0    0     0          0         0
12869195   26229    0    0    0     0       0          0
  eth1:12172910   25800    3    3    0     3          0         0 
7849528   38567   72    0    0     5      77          0
   br0: 3035036   17478    0    0    0     0          0         0 
2950728   12908    0    0    0     0       0          0
 
[* time tick 2 *]

Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed
multicast|bytes    packets errs drop fifo colls carrier compressed
    lo: 4020580   14734    0    0    0     0          0         0 
4020580   14734    0    0    0     0       0          0
  eth0: 7780868   41663    0    0    0     0          0         0
17450012   30518    0    0    0     0       0          0
  eth1:16759363   30073    3    3    0     3          0         0 
8375862   42391   72    0    0     5      77          0
   br0: 3086377   17819    0    0    0     0          0         0 
2986052   13185    0    0    0     0       0          0

[* the delta value *]

Inter-|   Receive                                                |  Transmit
 face |bytes    packets errs drop fifo frame compressed
multicast|bytes    packets errs drop fifo colls carrier compressed
    lo:   94059     613    0    0    0     0          0         0   
94059     613    0    0    0     0       0          0
  eth0:  525437    3785    0    0    0     0          0         0 
4580817    4289    0    0    0     0       0          0
  eth1: 4586453    4273    0    0    0     0          0         0  
526334    3824    0    0    0     0       0          0
   br0:   51341     341    0    0    0     0          0         0   
35324     277    0    0    0     0       0          0

I wonder the meaning of the value of the br0,  it's Rx/Tx packets is
less than both eth0 and eth1.
what's the relationship of the values between bridge and it's enslaved NIC?

Thanks for your comments on this.


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

* Re: [BRIDGE]A basic question: what's the relationship of the Rx/Tx packets count between the bridge and its enslaved NIC.
  2005-08-16  3:40 [BRIDGE]A basic question: what's the relationship of the Rx/Tx packets count between the bridge and its enslaved NIC Steven Zhang
@ 2005-08-17 16:21 ` Stephen Hemminger
  2005-08-22  9:25   ` Zoran s
  2005-08-22  9:34   ` Zoran s
  0 siblings, 2 replies; 4+ messages in thread
From: Stephen Hemminger @ 2005-08-17 16:21 UTC (permalink / raw)
  To: Steven Zhang; +Cc: bridge

On Tue, 16 Aug 2005 11:40:40 +0800
Steven Zhang <zhangseven@gmail.com> wrote:

> I have a bridge br0, it enslaves two NICs: eth0 and eth1. 
> By using "cat /proc/net/dev ", i can see the Rx/Tx packets and bytes
> through each interface. just like this:



> I wonder the meaning of the value of the br0,  it's Rx/Tx packets is
> less than both eth0 and eth1.
> what's the relationship of the values between bridge and it's enslaved NIC?
> 

The pseudo-device br0 is used for locally generated traffic

There will be several possible flows through a bridge:

Traffic going from 
	eth0 to eth1 will increase eth0:Rx and eth1:Tx
	eth1 to eth0               eth1:Rx     eth0:Tx
Locally transmits to eth0          br0:Tx  and eth0:Tx
Locally received via eth0          br0:Rx  and eth0:Rx

Also, packets generated locally with unknown destination
will be flooded to both eth0 and eth1.

You get the idea

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

* Re: [BRIDGE]A basic question: what's the relationship of the Rx/Tx packets count between the bridge and its enslaved NIC.
  2005-08-17 16:21 ` Stephen Hemminger
@ 2005-08-22  9:25   ` Zoran s
  2005-08-22  9:34   ` Zoran s
  1 sibling, 0 replies; 4+ messages in thread
From: Zoran s @ 2005-08-22  9:25 UTC (permalink / raw)
  To: Stephen Hemminger, Steven Zhang; +Cc: bridge

Steven,

In addition to what Stephen wrote, you can perform
simple tests just assigning the IP address to bridge
interface br0 issuing command:

ifconfig br0 x.y.z.w up

where x.y.z.w is a unused subnet IP address (class C
x.y.z.0) you are bridging.

Then you can ping any member via the bridge and
observe br0, eth0 and eth1 stats, and also you can
ping br0 itself by using ping x.y.z.w command and see
stats as well.

Regards,
Zoran

--- Stephen Hemminger <shemminger@osdl.org> wrote:

> On Tue, 16 Aug 2005 11:40:40 +0800
> Steven Zhang <zhangseven@gmail.com> wrote:
> 
> > I have a bridge br0, it enslaves two NICs: eth0
> and eth1. 
> > By using "cat /proc/net/dev ", i can see the Rx/Tx
> packets and bytes
> > through each interface. just like this:
> 
> 
> 
> > I wonder the meaning of the value of the br0, 
> it's Rx/Tx packets is
> > less than both eth0 and eth1.
> > what's the relationship of the values between
> bridge and it's enslaved NIC?
> > 
> 
> The pseudo-device br0 is used for locally generated
> traffic
> 
> There will be several possible flows through a
> bridge:
> 
> Traffic going from 
> 	eth0 to eth1 will increase eth0:Rx and eth1:Tx
> 	eth1 to eth0               eth1:Rx     eth0:Tx
> Locally transmits to eth0          br0:Tx  and
> eth0:Tx
> Locally received via eth0          br0:Rx  and
> eth0:Rx
> 
> Also, packets generated locally with unknown
> destination
> will be flooded to both eth0 and eth1.
> 
> You get the idea


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

* Re: [BRIDGE]A basic question: what's the relationship of the Rx/Tx packets count between the bridge and its enslaved NIC.
  2005-08-17 16:21 ` Stephen Hemminger
  2005-08-22  9:25   ` Zoran s
@ 2005-08-22  9:34   ` Zoran s
  1 sibling, 0 replies; 4+ messages in thread
From: Zoran s @ 2005-08-22  9:34 UTC (permalink / raw)
  To: bridge

Steven,

In addition to what Stephen wrote, you can perform
simple tests just assigning the IP address to bridge
interface br0 issuing command:

ifconfig br0 x.y.z.w up

where x.y.z.w is a unused subnet IP address (class C
x.y.z.0) you are bridging.

Then you can ping any member via the bridge and
observe br0, eth0 and eth1 stats, and also you can
ping br0 itself by using ping x.y.z.w command and see
stats as well.

Regards,
Zoran

--- Stephen Hemminger <shemminger@osdl.org> wrote:

> On Tue, 16 Aug 2005 11:40:40 +0800
> Steven Zhang <zhangseven@gmail.com> wrote:
> 
> > I have a bridge br0, it enslaves two NICs: eth0
> and eth1. 
> > By using "cat /proc/net/dev ", i can see the Rx/Tx
> packets and bytes
> > through each interface. just like this:
> 
> 
> 
> > I wonder the meaning of the value of the br0, 
> it's Rx/Tx packets is
> > less than both eth0 and eth1.
> > what's the relationship of the values between
> bridge and it's enslaved NIC?
> > 
> 
> The pseudo-device br0 is used for locally generated
> traffic
> 
> There will be several possible flows through a
> bridge:
> 
> Traffic going from 
> 	eth0 to eth1 will increase eth0:Rx and eth1:Tx
> 	eth1 to eth0               eth1:Rx     eth0:Tx
> Locally transmits to eth0          br0:Tx  and
> eth0:Tx
> Locally received via eth0          br0:Rx  and
> eth0:Rx
> 
> Also, packets generated locally with unknown
> destination
> will be flooded to both eth0 and eth1.
> 
> You get the idea


__________________________________________________
Do You Yahoo!?
Tired of spam?  Yahoo! Mail has the best spam protection around 
http://mail.yahoo.com 

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

end of thread, other threads:[~2005-08-22  9:34 UTC | newest]

Thread overview: 4+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2005-08-16  3:40 [BRIDGE]A basic question: what's the relationship of the Rx/Tx packets count between the bridge and its enslaved NIC Steven Zhang
2005-08-17 16:21 ` Stephen Hemminger
2005-08-22  9:25   ` Zoran s
2005-08-22  9:34   ` Zoran s

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.