# netgraph & bandwidth



## benoitc (Jun 20, 2022)

what kind of bandwidth limitation using ng_eiface/ng_bridge should I expect when using 10/25G NICs  with recent CPUs ? (Intel(R) Xeon(R) Silver 4208 CPU @ 2.10GHz) . Can anyone share their experience about it? What is the performnce compared using simple bridge or directly the NIC?


----------



## Phishfry (Jun 21, 2022)

I have not got to this yet.
I did start the ng_bridge with a script derived from /usr/share/examples/netgraph/ether.bridge.
That was as far as I got. It is on my list.

I was not sure what goes in LOCAL_IFACES. Still playing around with my script.
/netgraph

```
BRIDGE_NAME="bnet0"

# List the names of the interfaces that you want to bridge across
# here in ${BRIDGE_IFACES}. If you want to include the local host
# machine as well then set ${LOCAL_IFACES} as well (they may also be
# listed in ${BRIDGE_IFACES}). Of course, any ${LOCAL_IFACE} must
# be ifconfig(8)ured separately. If you don't want a ${LOCAL_IFACE}
# then assign it the empty string.

BRIDGE_IFACES="cxl4 cxl5 cxl6 cxl7 cxl8 cxl9 cxl10 cxl11"
LOCAL_IFACES="cxl4 cxl5 cxl6 cxl7 cxl8 cxl9 cxl10 cxl11"
```

I hope to have a secondary network on my Megarouter project.
All fiber and different class net (Class B) specifically for NFS between servers.

I am using three Chelsio T540. One for firewall to top of rack router.
That is working well now. 4 ports LAGG0 to Cisco SG500X.

I plan a ng_bridge for two T540 and lagg connections between my four servers.
Been overcome by life events.


```
root@x9srl:/ # ./netgraph start
root@x9srl:/ # ./netgraph stats

Statistics for bridging network bnet0:

Network interface cxl4:
Network interface cxl5:
Network interface cxl6:
Network interface cxl7:
Network interface cxl8:
Network interface cxl9:
Network interface cxl10:
Network interface cxl11:
Local host interface cxl4:
Local host interface cxl5:
Local host interface cxl6:
Local host interface cxl7:
Local host interface cxl8:
Local host interface cxl9:
Local host interface cxl10:
Local host interface cxl11:
```

I have no idea what any of this means. I am just experimenting:


```
root@x9srl:/ # ngctl list
There are 13 total nodes:
  Name: cxl4            Type: ether           ID: 00000001   Num hooks: 2
  Name: cxl5            Type: ether           ID: 00000002   Num hooks: 2
  Name: cxl6            Type: ether           ID: 00000003   Num hooks: 2
  Name: cxl7            Type: ether           ID: 00000004   Num hooks: 2
  Name: cxl8            Type: ether           ID: 00000005   Num hooks: 2
  Name: cxl9            Type: ether           ID: 00000006   Num hooks: 2
  Name: cxl10           Type: ether           ID: 00000007   Num hooks: 2
  Name: cxl11           Type: ether           ID: 00000008   Num hooks: 2
  Name: em0             Type: ether           ID: 00000009   Num hooks: 0
  Name: em1             Type: ether           ID: 0000000a   Num hooks: 0
  Name: lagg0           Type: ether           ID: 0000000b   Num hooks: 0
  Name: ngctl23836      Type: socket          ID: 000000cd   Num hooks: 0
  Name: bnet0           Type: bridge          ID: 00000099   Num hooks: 16
```


----------



## Phishfry (Jun 21, 2022)

One thing I have found is that most instructions seem to miss building the ngeth0 link.
But there are not many instructions. Simple Netgraph bridges seem elusive. I am progressing.

I have updated this thread and added links. Please add anything useful.


----------

