LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 11-08-2015, 01:58 PM   #1
trancephorm
Member
 
Registered: Nov 2004
Posts: 34

Rep: Reputation: 0
Question Kubuntu 14.04: making a network bridge, how to?


Can someone point me to some good thorough tutorial how this can be achieved? Or simply post few steps if it's not too cumbersome?

Here's my setup:
Machine 1:
eth0 (connected internal network and routed to Internet through router)
eth1 (use it as a bridge)

Machine 2:
eth0 (connected to eth1 on Machine 1)

Correct me if I'm wrong, but I understand no ip address should be assigned to eth1 on Machine 1, and on Machine 2, ip from internal network should be assigned.

So setup is pretty simple but it's my first time trying to make this... I see also there's different "gateway" mathod with iptables. First one seems cleaner to me, but other one is acceptable if it's easier to setup...

Last edited by trancephorm; 11-08-2015 at 02:02 PM.
 
Old 11-08-2015, 05:07 PM   #2
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
A Linux computer is not a good switch - too slow, consumes too much energy and generates too much heat, too consumes too much space, few ports. Simple 4 port switches cost 20$ new, and you can probably get used ones for practically nothing. The cost of the switch will be offset by the saved electricity soon.

The Linux bridge use case is connecting virtual machines to the outside world.

Having said that, you will have to create the bridge and add both eth0 and eth1 to it. This means that the physical interfaces will not have their own IP address anymore; the bridge will have the IP address.

Here is a description how to do that in Debian: https://wiki.debian.org/BridgeNetworkConnections
And in Ubuntu for connecting VMs: https://wiki.ubuntu.com/KvmWithBridge
 
Old 11-09-2015, 02:11 AM   #3
trancephorm
Member
 
Registered: Nov 2004
Posts: 34

Original Poster
Rep: Reputation: 0
That machine, which will be used as a bridge is used non-stop anyways, so in my case the difference is electric consumtion of additional pci network card vs. 4-port switch. Thanks for links, will check them and will get back here in case of problems
 
Old 11-10-2015, 01:17 PM   #4
trancephorm
Member
 
Registered: Nov 2004
Posts: 34

Original Poster
Rep: Reputation: 0
Debian tutorial worked flawlessly on Kubuntu 14.04! It's really simple... Thanks!
 
Old 11-10-2015, 03:22 PM   #5
berndbausch
LQ Addict
 
Registered: Nov 2013
Location: Tokyo
Distribution: Mostly Ubuntu and Centos
Posts: 6,316

Rep: Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002Reputation: 2002
Great!
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Making bridge on a vm in VirtualBox on ESxi massy Linux - Server 1 12-09-2014 07:55 PM
[SOLVED] To bridge or not to bridge (network) Adol Linux - Newbie 2 02-03-2012 09:03 AM
Xen network-route AND network-bridge setup kwiksand Linux - Networking 1 08-22-2010 03:18 PM
network bridge / bond - slackware network init scripts Slax-Dude Slackware 1 07-17-2009 06:56 AM
Bridge simulating Network Lag, for developing network code for games intripoon Linux - Networking 18 10-27-2005 05:04 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 05:56 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration