Networking Forums

Networking Forums > Computer Networking > Linux Networking > Bridging

Reply
 
 
Chris
Guest
Posts: n/a

 
      05-05-2007, 10:45 AM
Hello,

This question has already been asked in a more specific form others in
the OpenWRT forum.

I've a linux box with say, eth0, eth1. This is using PPPoE to connect
to the internet, hence I have a ppp0 interface tied to eth0. Now, my
ISP gives me a 8 address subnet, say, a.b.c.0-7. The linux box is the
router, and is .6, and I'd like to be able IPs .1-.5 for my own hosts,
connected via a switch to eth1.

My first thought was to create a bridge containing ppp0 and eth1,
although I understand that this isn't possible. (Could one bridge,
say ppp0 and ppp1?) What is the correct way to achieve this?

Regards,

Chris

 
Reply With Quote
 
 
 
 
Pascal Hambourg
Guest
Posts: n/a

 
      05-05-2007, 03:32 PM
Hello,

Chris a écrit :
>
> I've a linux box with say, eth0, eth1. This is using PPPoE to connect
> to the internet, hence I have a ppp0 interface tied to eth0. Now, my
> ISP gives me a 8 address subnet, say, a.b.c.0-7. The linux box is the
> router, and is .6, and I'd like to be able IPs .1-.5 for my own hosts,
> connected via a switch to eth1.
>
> My first thought was to create a bridge containing ppp0 and eth1,
> although I understand that this isn't possible.


I'm afraid there is no straightforward way to bridge together link layer
protocols as different as ethernet and PPP.

> (Could one bridge, say ppp0 and ppp1?)


Theroetically yes, but AFAIK the bridging code in Linux only works with
ethernet.

> What is the correct way to achieve this?


Routing. Simple good old plain static routing.
Enable IP forwarding on the box and give eth1 the address a.b.c.6/29.
Give each host an address within a.b.c.1-5/29 and default gateway a.b.c.6.
 
Reply With Quote
 
Chris
Guest
Posts: n/a

 
      05-05-2007, 10:42 PM
Thanks Pascal,

On 5 May, 15:32, Pascal Hambourg <boite-a-s...@plouf.fr.eu.org> wrote:

> > I've a linux box with say, eth0, eth1. This is using PPPoE to connect
> > to the internet, hence I have a ppp0 interface tied to eth0. Now, my
> > ISP gives me a 8 address subnet, say, a.b.c.0-7. The linux box is the
> > router, and is .6, and I'd like to be able IPs .1-.5 for my own hosts,
> > connected via a switch to eth1.

>
> > What is the correct way to achieve this?

>
> Routing. Simple good old plain static routing.
> Enable IP forwarding on the box and give eth1 the address a.b.c.6/29.
> Give each host an address within a.b.c.1-5/29 and default gateway a.b.c.6.


ppp0 is currently a.b.c.6, is making eth1 the same likely to cause any
problems? Is it then simply a matter of running,

route add a.b.c.0 netmask 255.255.255.242 dev eth1?

Regards,

Chris

 
Reply With Quote
 
Pascal Hambourg
Guest
Posts: n/a

 
      05-05-2007, 11:17 PM
Chris a écrit :
>>
>>Enable IP forwarding on the box and give eth1 the address a.b.c.6/29.
>>Give each host an address within a.b.c.1-5/29 and default gateway a.b.c.6.

>
> ppp0 is currently a.b.c.6,


Allocated by the IPCP negotiation ?

> is making eth1 the same likely to cause any problems?


None that I am aware of. What kind of problems do you think of ?

> Is it then simply a matter of running,
>
> route add a.b.c.0 netmask 255.255.255.242 dev eth1?

^^^
Don't you mean 255.255.255.248 ?
I guess this could do the trick too. Except that it would not consider
a.b.c.7 as a directed broadcast address. But you can add it by hand with
'ip route add broadcast a.b.c.7 dev eth1' if required.
 
Reply With Quote
 
Chris
Guest
Posts: n/a

 
      05-06-2007, 12:02 PM
On 5 May, 23:17, Pascal Hambourg <boite-a-s...@plouf.fr.eu.org> wrote:
> Chris a écrit :
>
>
>
> >>Enable IP forwarding on the box and give eth1 the address a.b.c.6/29.
> >>Give each host an address within a.b.c.1-5/29 and default gateway a.b.c..6.

>
> > ppp0 is currently a.b.c.6,

>
> Allocated by the IPCP negotiation ?
>


I had thought this was being set manually, but whatever IP/netmask I
supply does seem to be overridden.

ppp0 Link encap:Point-Point Protocol
inet addr:88.97.163.222 P-t-P:62.3.83.5 Mask:
255.255.255.255
UP POINTOPOINT RUNNING NOARP MULTICAST MTU:1492 Metric:1
RX packets:3 errors:0 dropped:0 overruns:0 frame:0
TX packets:5 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:3
RX bytes:114 (114.0 B) TX bytes:170 (170.0 B)


> > is making eth1 the same likely to cause any problems?

>
> None that I am aware of. What kind of problems do you think of ?
>


Routing issues I think, when I first thought about it, I wasn't aware
you could specify 'dev eth1' when adding static routes.

> > Is it then simply a matter of running,

>
> > route add a.b.c.0 netmask 255.255.255.242 dev eth1?

>
> ^^^
> Don't you mean 255.255.255.248 ?


Oops, yes.

> I guess this could do the trick too. Except that it would not consider
> a.b.c.7 as a directed broadcast address. But you can add it by hand with
> 'ip route add broadcast a.b.c.7 dev eth1' if required.


Again, thanks. Can you point me to a good article on the use of
static routing, I had thought I understood it, and that 'a.b.c.0
netmask 255...248 ' would match any address in the desired range, be
it a host, network or broadcast address.

Regards,

Chris

 
Reply With Quote
 
 
 
Reply

Thread Tools
Display Modes

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 On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Bridging over VPN Daniel Linux Networking 4 01-28-2009 04:31 PM
help about bridging... Odin_Eidolon Linux Networking 3 02-28-2005 10:56 PM
MN-700 Bridging Vladimir Zaychik Broadband Hardware 1 08-18-2004 01:10 AM
Bridging MN - 500 Luis Broadband Hardware 2 02-21-2004 12:49 AM
Bridging Greg Milstead Broadband Hardware 2 02-10-2004 10:20 PM



1 2 3 4 5 6 7 8 9 10 11