LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
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!

Notices


Reply
  Search this Thread
Old 03-18-2009, 06:49 AM   #1
jkeertir
Member
 
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 192.168.1.11"
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,
Keerti
 
Old 03-18-2009, 07:30 AM   #2
kirukan
Senior Member
 
Registered: Jun 2008
Location: Eelam
Distribution: Redhat, Solaris, Suse
Posts: 1,272

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.
http://www.linuxfoundation.org/en/Net:Bridge
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

#!/bin/bash
#
# 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
fi

. /etc/sysconfig/network

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

# 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

BRCTL=/usr/local/sbin/brctl
BR0_ADDR=172.16.14.21
BR0_MASK=255.255.0.0
# See how we were called.
case "$1" in
start)
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 0.0.0.0
ifconfig eth1 0.0.0.0
ifconfig br0 up
ifconfig br0 $BR0_ADDR netmask $BR0_MASK up
$BRCTL stp br0 on
route add -net 0.0.0.0/0 gw 172.16.1.148
echo
;;
stop)
# Stop daemons.
ifconfig eth0 down
ifconfig eth1 down
ifconfig br0 down
;;
restart)
$0 stop
$0 start
;;
status)
ifconfig
sleep 3
$BRCTL show br0
;;
*)
echo "Usage: bridge {start|stop|restart|status}"
exit 1
esac

exit 0
 
Old 03-18-2009, 08:09 AM   #3
jkeertir
Member
 
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,
Keerti
 
  


Reply


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


All times are GMT -5. The time now is 10:41 AM.

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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration