Fedora Linux Support Community & Resources Center
  #1  
Old 18th November 2009, 01:22 PM
pow216 Offline
Registered User
 
Join Date: Feb 2009
Posts: 7
windows_vistaie
Network Bridging Question - 2nd NIC installed

Hello I have Fedora 10 x64 running my NAS box and it's great.

I had a gigabit NIC connected from my NAS to my router and a gigabit NIC connected from my desktop to the router. The problem is my router is only 100mb so transfer rate was slower than it could be.

I figured cheapest way to improve things was to add my spare 10/100 NIC to the NAS and connect that NIC to the router and connect the gigabit NIC to the desktop. I then need to bridge the connections on the NAS so the desktop can see the internet and get IP via DHCP.

I have not been successful in doing this on boot, however I have found the following commands in this order achieve what I want:-

ifdown eth0
ifdown eth1
brctl addbr bridge0
brctl addif bridge0 eth0
brctl addif bridge0 eth1
ifconfig bridge0 192.168.1.120
route add default gw 192.168.1.1
ifconfig eth0 up
ifconfig eth1 up
dhclient bridge0

Is this the right way?
How do I best make a permanent bridge - i.e. on boot?

Please help.
Thanks a lot.

Last edited by pow216; 18th November 2009 at 01:24 PM.
Reply With Quote
  #2  
Old 18th November 2009, 03:44 PM
cazo Offline
Registered User
 
Join Date: Sep 2005
Location: Redneck Riviera
Posts: 362
linuxfedorafirefox
You should be able to put the commands in /etc/rc.d/rc.local, but I read (somewhere, can't find the link right off) about a more elegant (to me) solution:

You add a line like:

Code:
BRIDGE=bridge0
to /etc/sysconfig/networking/devices/ifcfg-eth0 and /etc/sysconfig/networking/devices/ifcfg-eth1. In addition, create one called /etc/sysconfig/networking/devices/ifcfg-bridge0 (or whatever you want to call the bridge) with something like:

Code:
DEVICE=bridge0
TYPE=Bridge
NAME=Bridge
ONBOOT=yes
USERCTL=yes

# static address
BOOTPROTO=static
IPADDR=192.168.1.120
NETMASK=255.255.255.0

# dynamic address (dhcp)
#BOOTPROTO=dhcp
#DHCP_RELEASE=yes
#PERSISTENT_DHCLIENT=no

DELAY=0
STP=off
The dynamic section, commented out, shows how to set it up with a dynamic route instead of static, in case you want to let the router give an address to the NAS.

Finally, create a /etc/sysconfig/static-routes file with:
Code:
any: net 127.0.0.0 netmask 255.0.0.0 dev lo
any: net default gateway 192.168.1.1 bridge0
I think I made all the name & address changes (in bold) needed.

You should be able to use service network stop, make the changes, then service network start for testing, instead of actually having to reboot. I believe most of the info can be found in /usr/share/doc/initscripts-8.95/sysconfig.txt, but it's a bit cryptic.

I should also point out that the above is from my old Fedora 4 system (an old system I use as a light server for a small LAN). The bridge comes up automatically after reboots (usually power interruptions). Of course, you also need the bridge-utils package (and the ebtables package might be useful).

I haven't tried the same set-up on a more recent version of Fedora.


Edit: I'm not sure if it will make a difference, but I think those files should be in /etc/sysconfig/network-scripts/ instead of /etc/sysconfig/networking/devices/.

Last edited by cazo; 18th November 2009 at 06:33 PM. Reason: clarifications
Reply With Quote
Reply

Tags
2nd, bridging, installed, network, nic, question

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

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 On
HTML code is Off

Forum Jump

Similar Threads
Thread Thread Starter Forum Replies Last Post
bridging network adapters to share internet fakie_flip Servers & Networking 22 4th February 2008 06:31 AM
SMB installed, but don't see Windows Network lehoanq Using Fedora 5 19th December 2007 12:03 PM
How is network bridging for Xen handled in F7? creiter Servers & Networking 2 6th June 2007 05:23 PM
[Question] How to let yum know about installed library? configer Using Fedora 2 31st July 2006 07:55 PM
Win4LIn: Installed or not installed? That is the question... penguinguy Using Fedora 0 7th October 2005 04:10 PM


Current GMT-time: 22:49 (Saturday, 25-10-2014)

TopSubscribe to XML RSS for all Threads in all ForumsFedoraForumDotOrg Archive
logo

All trademarks, and forum posts in this site are property of their respective owner(s).
FedoraForum.org is privately owned and is not directly sponsored by the Fedora Project or Red Hat, Inc.

Privacy Policy | Term of Use | Posting Guidelines | Archive | Contact Us | Founding Members

Powered by vBulletin® Copyright ©2000 - 2012, vBulletin Solutions, Inc.

FedoraForum is Powered by RedHat
Santa Catarina Pinula Photos on Instagram - Kertih Photos on Instagram - Limoges Travel Photos on Instagram