Bridging - Networking

This is a discussion on Bridging - Networking ; 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 ...

+ Reply to Thread
Results 1 to 5 of 5

Thread: Bridging

  1. Bridging

    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


  2. Re: Bridging

    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.

  3. Re: Bridging

    Thanks Pascal,

    On 5 May, 15:32, Pascal Hambourg 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


  4. Re: Bridging

    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.

  5. Re: Bridging

    On 5 May, 23:17, Pascal Hambourg 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 to Thread