* [Bridge] Bridge with DHCP IP address
@ 2008-01-05 23:21 Casper Gripenberg
2008-01-07 18:22 ` Srinivas M.A.
0 siblings, 1 reply; 3+ messages in thread
From: Casper Gripenberg @ 2008-01-05 23:21 UTC (permalink / raw)
To: bridge
Hi. I'm trying to run a bridge between my "internal"
network (eth1) and the external internet (eth0). I.e.
a very basic setup.
But I also want the bridge to have an IP address. I
read the docs here:
http://www.linux-foundation.org/en/Net:Bridge
Which say to set the forwarding delay to 0 and then run
dhclient on eth0:
# ifconfig eth0 0.0.0.0
# ifconfig eth1 0.0.0.0
# brctl setfd br0 0
# brctl addif br0 eth0
# dhclient eth0
# brctl addif br0 eth1
# ifconfig br0 up
The bridge works fine as a bridge, and eth0 gets
an IP address (although it takes a very long time
for the dhclient to aquire it).
But I can't reach the eth0 address from anywhere
except localhost. And I can't get out of the bridge
either to any other address..even though the routing
table it set up correctly I get destination unreachable
when I try to ping an external IP address from the
bridge box (logged in through the console).
What I want is for the bridge to have an IP address
and then I want to allow access to specific ports on
the bridge depending on if the packets are coming in
through eth0 or eth1. Is this possible to do?
Thanks.
Casper
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bridge] Bridge with DHCP IP address
2008-01-05 23:21 [Bridge] Bridge with DHCP IP address Casper Gripenberg
@ 2008-01-07 18:22 ` Srinivas M.A.
2008-01-07 18:33 ` David A. Ranch
0 siblings, 1 reply; 3+ messages in thread
From: Srinivas M.A. @ 2008-01-07 18:22 UTC (permalink / raw)
To: Casper Gripenberg; +Cc: bridge
Setting up eth0 as a bridge port and also having an IP address on it
is confusing. Better perhaps to run dhclient on the bridge interface
itself.
For filtering packets as you indicate, it should be possible to do
that using ebtables. I don't know details about it though.
With this filtering, you can probably filter the outgoing DHCP
requests from br0 to go out only on eth0 and not through eth1. (They
will be broadcast, so they will get sent out of both ports normally.)
On Jan 6, 2008 4:51 AM, Casper Gripenberg
<casper.gripenberg@kotiportti.fi> wrote:
>
> Hi. I'm trying to run a bridge between my "internal"
> network (eth1) and the external internet (eth0). I.e.
> a very basic setup.
>
> But I also want the bridge to have an IP address. I
> read the docs here:
> http://www.linux-foundation.org/en/Net:Bridge
>
> Which say to set the forwarding delay to 0 and then run
> dhclient on eth0:
>
> # ifconfig eth0 0.0.0.0
> # ifconfig eth1 0.0.0.0
> # brctl setfd br0 0
> # brctl addif br0 eth0
> # dhclient eth0
> # brctl addif br0 eth1
> # ifconfig br0 up
>
> The bridge works fine as a bridge, and eth0 gets
> an IP address (although it takes a very long time
> for the dhclient to aquire it).
>
> But I can't reach the eth0 address from anywhere
> except localhost. And I can't get out of the bridge
> either to any other address..even though the routing
> table it set up correctly I get destination unreachable
> when I try to ping an external IP address from the
> bridge box (logged in through the console).
>
> What I want is for the bridge to have an IP address
> and then I want to allow access to specific ports on
> the bridge depending on if the packets are coming in
> through eth0 or eth1. Is this possible to do?
>
> Thanks.
>
> Casper
^ permalink raw reply [flat|nested] 3+ messages in thread
* Re: [Bridge] Bridge with DHCP IP address
2008-01-07 18:22 ` Srinivas M.A.
@ 2008-01-07 18:33 ` David A. Ranch
0 siblings, 0 replies; 3+ messages in thread
From: David A. Ranch @ 2008-01-07 18:33 UTC (permalink / raw)
To: Casper Gripenberg; +Cc: bridge
[-- Attachment #1: Type: text/html, Size: 3065 bytes --]
^ permalink raw reply [flat|nested] 3+ messages in thread
end of thread, other threads:[~2008-01-07 18:33 UTC | newest]
Thread overview: 3+ messages (download: mbox.gz follow: Atom feed
-- links below jump to the message on this page --
2008-01-05 23:21 [Bridge] Bridge with DHCP IP address Casper Gripenberg
2008-01-07 18:22 ` Srinivas M.A.
2008-01-07 18:33 ` David A. Ranch
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.