LinuxQuestions.org

LinuxQuestions.org (/questions/)
-   Linux - Networking (https://www.linuxquestions.org/questions/linux-networking-3/)
-   -   How to create bridge and how to create hub? (https://www.linuxquestions.org/questions/linux-networking-3/how-to-create-bridge-and-how-to-create-hub-547903/)

Grawp 04-21-2007 02:57 PM

How to create bridge and how to create hub?
 
1. How to create a bridge between two connection? (Please give me an example with explanation (not only "Use brctl."))
2. How to create something similiar like hub in linux-based systems?
I have multiple LAN connections and i want to be something like router (with ability to filter routes - for example block sending packets from eth0 to eth3 on port 35274, or block sending all packets from eth1 to localhost and so on)

osor 04-21-2007 03:38 PM

See:
http://linux-net.osdl.org/index.php/Bridge
http://linux-net.osdl.org/index.php/Bridge#Sample_setup
http://linux-net.osdl.org/index.php/....2Fiptables.3F
http://lartc.org/

Grawp 04-21-2007 04:46 PM

when eth0 is connected to internet and eth1 to my friend and I bridge eth0 and eth1 i won't be able to access internet nor my friend, will I?

acid_kewpie 04-22-2007 03:15 AM

there's not enough information there to say... what does "connected to internet" mean? behind an adsl router? if so it should be fine. if your own pc holds the public ip on a ppp / pppoe connectoin etc... then you can't normally bridge that, it'd need masquarading and routing instead.

Grawp 04-22-2007 04:19 AM

Thank you for Ok, i will now try to explain better what i want:
I have 3 computer, but i don't have a hub.
f.e.:
PC1
PC2 - PC1 and PC3 is connected to PC2
PC3

If I bridge eth0 and eth1 (on PC2) the PC2 will behave like a switch or piece of network cable and PC2 won't be able to send unicast or multicast, actually nothing, to PC1 or PC2. And i want PC1, PC2 and PC to be able communicate like they were connected to a hub.

acid_kewpie 04-22-2007 05:10 AM

well you've still not said what form your internet connection takes, but yes you *could* bridge three nics if you want. but really... $10 for a cheap switch is a vastly better approach.


All times are GMT -5. The time now is 12:54 AM.