All of lore.kernel.org
 help / color / mirror / Atom feed
* [Bridge] loosing network connectivity
@ 2006-05-25 14:04 Loreno Oliveira
  2006-05-25 16:14 ` Stephen Hemminger
  0 siblings, 1 reply; 2+ messages in thread
From: Loreno Oliveira @ 2006-05-25 14:04 UTC (permalink / raw)
  To: bridge

[-- Attachment #1: Type: text/plain, Size: 1394 bytes --]

Hi folks,

I'm new on brctl and didn't find the archive of this list, so, sorry if my
question was previously answered.

Well, my problem is: when I run "brctl addif pan0 eth0" my network
connection is lost. If I execute "brctl delif pan0 eth0" the connection is
restablished.

Does anyone knows what is missing here??
My full script is typed bellow.

Thanks in advance for any help

Loreno

--------------------------------------------------------------------

# Make a Bridge
brctl addbr pan0

# Assign IP address
ifconfig pan0 192.168.10.1

# Disable Listening and learning states
brctl setfd pan0 0

# Disable Spanning Tree Protocol
brctl stp pan0 off

# Adding pan0 to gateway
brctl addif pan0 eth0

# Flush all the rules in filter and nat tables
/sbin/iptables --flush
/sbin/iptables --table nat --flush

# Delete all chains that are not in default filter and nat table
/sbin/iptables --delete-chain
/sbin/iptables --table nat --delete-chain

# Set up IP Forwarding and Masquerading
/sbin/iptables --table nat --append POSTROUTING --out-interface eth0 -j
MASQUERADE

# Assuming one NIC to local LAN
/sbin/iptables --append FORWARD --in-interface pan0 -j ACCEPT

# Enables packet forwarding by kernel

echo 1 > /proc/sys/net/ipv4/ip_forward

# Setting bluetooth AP

/usr/bin/pand --listen --role NAP

# Starting DHCP

dhcpd3 pan0

[-- Attachment #2: Type: text/html, Size: 1576 bytes --]

^ permalink raw reply	[flat|nested] 2+ messages in thread

* Re: [Bridge] loosing network connectivity
  2006-05-25 14:04 [Bridge] loosing network connectivity Loreno Oliveira
@ 2006-05-25 16:14 ` Stephen Hemminger
  0 siblings, 0 replies; 2+ messages in thread
From: Stephen Hemminger @ 2006-05-25 16:14 UTC (permalink / raw)
  To: Loreno Oliveira; +Cc: bridge

On Thu, 25 May 2006 11:04:39 -0300
"Loreno Oliveira" <lorenooliveira@gmail.com> wrote:

> Hi folks,
> 
> I'm new on brctl and didn't find the archive of this list, so, sorry if my
> question was previously answered.
> 
> Well, my problem is: when I run "brctl addif pan0 eth0" my network
> connection is lost. If I execute "brctl delif pan0 eth0" the connection is
> restablished.

Looks like dhcp changes the address during your script.
Before putting eth0 in bridge it stands alone. Afterwards,
it is doing NAT.

> Does anyone knows what is missing here??
> My full script is typed bellow.
> 
> Thanks in advance for any help
> 
> Loreno
> 
> --------------------------------------------------------------------
> 
> # Make a Bridge
> brctl addbr pan0
> 
> # Assign IP address
> ifconfig pan0 192.168.10.1
This is silly because you run dhcp below.


> # Disable Listening and learning states
> brctl setfd pan0 0
> 
> # Disable Spanning Tree Protocol
> brctl stp pan0 off
> 
> # Adding pan0 to gateway
> brctl addif pan0 eth0
> 
> # Flush all the rules in filter and nat tables
> /sbin/iptables --flush
> /sbin/iptables --table nat --flush
> 
> # Delete all chains that are not in default filter and nat table
> /sbin/iptables --delete-chain
> /sbin/iptables --table nat --delete-chain
> 
> # Set up IP Forwarding and Masquerading
> /sbin/iptables --table nat --append POSTROUTING --out-interface eth0 -j
> MASQUERADE
> 
> # Assuming one NIC to local LAN
> /sbin/iptables --append FORWARD --in-interface pan0 -j ACCEPT
> 
> # Enables packet forwarding by kernel
> 
> echo 1 > /proc/sys/net/ipv4/ip_forward
> 
> # Setting bluetooth AP
> 
> /usr/bin/pand --listen --role NAP
> 
> # Starting DHCP
> 
> dhcpd3 pan0

^ permalink raw reply	[flat|nested] 2+ messages in thread

end of thread, other threads:[~2006-05-25 16:14 UTC | newest]

Thread overview: 2+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2006-05-25 14:04 [Bridge] loosing network connectivity Loreno Oliveira
2006-05-25 16:14 ` Stephen Hemminger

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.