All of lore.kernel.org
 help / color / mirror / Atom feed
From: Stephen Hemminger <shemminger@osdl.org>
To: Loreno Oliveira <lorenooliveira@gmail.com>
Cc: bridge@lists.osdl.org
Subject: Re: [Bridge] loosing network connectivity
Date: Thu, 25 May 2006 09:14:44 -0700	[thread overview]
Message-ID: <20060525091444.46634df8@localhost.localdomain> (raw)
In-Reply-To: <c49421c50605250704w2b1c2d52v19d809fa104a3999@mail.gmail.com>

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

      reply	other threads:[~2006-05-25 16:14 UTC|newest]

Thread overview: 2+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2006-05-25 14:04 [Bridge] loosing network connectivity Loreno Oliveira
2006-05-25 16:14 ` Stephen Hemminger [this message]

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=20060525091444.46634df8@localhost.localdomain \
    --to=shemminger@osdl.org \
    --cc=bridge@lists.osdl.org \
    --cc=lorenooliveira@gmail.com \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
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.