Download your favorite Linux distribution at LQ ISO.
Go Back > Forums > Linux Forums > Linux - Newbie
User Name
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!


  Search this Thread
Old 03-18-2009, 05:49 AM   #1
Registered: Mar 2008
Posts: 70

Rep: Reputation: 15
bridge configuration

Dear all,

I am configuring lan bridge in linux

when i run command

"brctl addif br0 eth1"

i am getting error
"can't add eth1 to bridge br0: Invalid argument"
and if i run a command to set ipaddress
"ifconfig eth1"
i am getting error as
"SIOCSIFFLAGS: Cannot assign requested address"

where is problem exactly,in the kernel configuration or setting iptables.

Please can anyone guide me to solve the problem.

With regards,
Old 03-18-2009, 06:30 AM   #2
Senior Member
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,274

Rep: Reputation: 148Reputation: 148
Bridging has been integrated with kernel 2.4 or 2.6 more and you will have to install bridge-utils. The following linux bridge official website will help you to find more information.
first, you have to create bridgename then you can add ethernet cards on that created bridge
brctl addbr br0
brctl addif br0 eth0
brctl addif br0 eth1

i have startup script it will help to up the bridge on system start

# bridge This shell script takes care of installing bridging for dsl with BRCFG
# chkconfig: 2345 10 90
# description: Uses brcfg to start bridging and ifconfigs eths
# processname: bridge
# config:

# Source function library.
. /etc/rc.d/init.d/functions

# Source networking configuration.
if [ ! -f /etc/sysconfig/network ]; then
exit 0

. /etc/sysconfig/network

if [ -f /etc/sysconfig/pcmcia ]; then
. /etc/sysconfig/pcmcia

# Check that networking is up.
[ "${NETWORKING}" = "no" ] && exit 0

# if the ip configuration utility isn't around we can't function.
[ -x /sbin/ip ] || exit 1

# See how we were called.
case "$1" in
echo -n "Configuring bridge: "
$BRCTL addbr br0
$BRCTL setbridgeprio br0 0
$BRCTL stp br0 off
$BRCTL addif br0 eth0
$BRCTL addif br0 eth1
ifconfig eth0
ifconfig eth1
ifconfig br0 up
ifconfig br0 $BR0_ADDR netmask $BR0_MASK up
$BRCTL stp br0 on
route add -net gw
# Stop daemons.
ifconfig eth0 down
ifconfig eth1 down
ifconfig br0 down
$0 stop
$0 start
sleep 3
$BRCTL show br0
echo "Usage: bridge {start|stop|restart|status}"
exit 1

exit 0
Old 03-18-2009, 07:09 AM   #3
Registered: Mar 2008
Posts: 70

Original Poster
Rep: Reputation: 15
dear kirukan,

I have followed the same steps ,but then too i am getting same error.

With regards,


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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
Linux bridge configuration!!! sholah Linux - Server 2 10-04-2008 03:30 PM
testing the configuration of the bridge networking with eth0 and tap0 htamayo Linux - Networking 0 09-17-2008 08:18 PM
bridge configuration CARLiCiOUS Linux - Networking 2 03-15-2005 01:17 PM
NIC Configuration and bridge problem Fonk Red Hat 0 05-24-2004 02:09 AM
NIC Configuration and bridge problem Fonk Linux - Networking 2 05-21-2004 02:36 AM > Forums > Linux Forums > Linux - Newbie

All times are GMT -5. The time now is 11:44 PM.

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