News for hackers. Stuff that matters.
Re:Linux Bridge – How it works by SteveNuts on Tuesday June 06, 2017 @01:26AM (#14494944)
Also check out Open vSwitch http://openvswitch.org/

We use it to add bridged adapters with VLAN tags to our hypervisors

Re:Linux Bridge – How it works by bogomipz on Tuesday June 06, 2017 @11:19AM (#14497897)
I'm not sure if this is still the case but the linux bridge had(has?) a limit of 1024 ports. OVS does not have this. Also OVS can give you GRE and VXVLAN as well.
Re:Linux Bridge – How it works by _a_user_so_good on Tuesday June 06, 2017 @01:47AM (#14495046)
Yeah, it's pretty neat as well.
Re:Linux Bridge – How it works by Mic92 on Tuesday June 06, 2017 @03:19AM (#14495387)
You would probably prefer the netlink interface these days over the old ioctl interface to configure bridges. But for an introduction the older one is probably easier to explain.
Re:Linux Bridge – How it works by hueving on Tuesday June 06, 2017 @04:59AM (#14495777)
Any reason netlink would be preferable if you're only making these calls <10 per minute?
Re:Linux Bridge – How it works by vbernat on Tuesday June 06, 2017 @07:27AM (#14496416)
You have access to far more parameters through Netlink than through ioctl. For bridges, this includes VLAN tagging, flood behavior, filtering behavior, per-port MAC learning, etc. Any recent development on bridges for Linux is only accessible through sysfs and netlink.
Re:Linux Bridge – How it works by linsomniac on Tuesday June 06, 2017 @11:55AM (#14498173)
FYI: You can do this on the small scale using ProxyARP. I did this once on a network interface connected to the DSL modem, and then proxy ARPed between that interface and another DMZ interface, and it worked just fine. For the router, I set up an ARP on the DMZ interface with that interface's MAC for the router IP, and for each machine in the DMZ I set up the DSL network's MAC with the systems IPs. So each side would see the routers MAC when doing ARP, but when the router received it it would know to send it on to the other interface.

Bridging works great, but it's kind of fun to see this at the proxy ARP level.

Re:Linux Bridge – How it works by rsync on Tuesday June 06, 2017 @12:26PM (#14498483)
My initial impression is that this is like netgraph[1] but for Linux ?

[1] https://www.freebsd.org/cgi/man.cgi?netgraph(4)

Re:Linux Bridge – How it works by jtdowney on Wednesday June 07, 2017 @05:49PM (#14510129)
Re:Linux Bridge – How it works by dahoramanolo on Wednesday June 07, 2017 @06:03PM (#14510224)
What are the use cases for this tech? I've tried web searching and only got technical explanations on how to do it, not what.
Re:Linux Bridge – How it works by goyalankit on Saturday June 10, 2017 @10:35PM (#14530327)
One of the use cases for bridge is to provide networking in containers. Docker has bridge networking that you can check out: https://docs.docker.com/engine/userguide/networking/#default...
Re:Linux Bridge – How it works by josteink on Tuesday June 06, 2017 @01:49AM (#14495055)
This would have been a nice link to have back when I was building my own Linux-routers.

Very well written, and I like how he used strace on all those examples.

Re:Linux Bridge – How it works by Kenji on Tuesday June 06, 2017 @02:34AM (#14495212)
This only works with dedicated hardware, right? I can't just take an arbitrary board like the raspberry pi and do this?
Re:Linux Bridge – How it works by laumars on Tuesday June 06, 2017 @04:55AM (#14495768)
No dedicated hardware required. Bridges can be placed on virtual interfaces. You often see this happen with things like VMs and containers but you don't even need that specifically.
Re:Linux Bridge – How it works by tyingq on Tuesday June 06, 2017 @09:34AM (#14497064)
Works fine on a pi with either usb interfaces or virtual ones.

If you want to experiment at a low cost, though, there's the Banana PI BPI-R1. A ~$70 linux ARM dev board with 5 GB ethernet interfaces.

Re:Linux Bridge – How it works by pjc50 on Tuesday June 06, 2017 @10:00AM (#14497240)
You can even bridge an interface to a tun/tap device, which is quite useful for VPNs and doing your own packet-twiddling code.
Re:Linux Bridge – How it works by goyalankit on Tuesday June 06, 2017 @02:41AM (#14495245)
It's a linux software bridge, and should work on raspberry pi.
Re:Linux Bridge – How it works by tr1ck5t3r on Tuesday June 06, 2017 @03:09AM (#14495352)
Bridge works very well on a RaspberryPi within the physical hardware limits.

An example using bridge to packet capture. https://github.com/williamknows/PiTap

Re:Linux Bridge – How it works by cjcampbell on Tuesday June 06, 2017 @03:02AM (#14495324)
Yep. Just finished teaching a networking course using the pi as the basis for labs and projects. Had a scenario that required students to set up a bridge. Just plug in a couple of usb network adapters.
Re:Linux Bridge – How it works by linsomniac on Tuesday June 06, 2017 @11:52AM (#14498145)
You can also do this with a VLAN interface. At my recommendation, a friend set up Raspberry Pi at home connected to a VLAN capable switch to break that one Ethernet interface out to 7.