OpenBSD router - BSD

This is a discussion on OpenBSD router - BSD ; Hi guys, I'm trying to get the similar effects of a consumer router, one WAN, four LAN ports. I have a single 10baseT network interface, and a 4-port 100baseT ethernet card on the system. Am I going about this wrong ...

+ Reply to Thread
Results 1 to 8 of 8

Thread: OpenBSD router

  1. OpenBSD router

    Hi guys, I'm trying to get the similar effects of a consumer router, one
    WAN, four LAN ports.

    I have a single 10baseT network interface, and a 4-port 100baseT
    ethernet card on the system. Am I going about this wrong to create the
    same thing as a consumer router?

    # dhclient le0
    # ifconfig bridge0 create
    # brconfig bridge0 add hme0 up add hme1 up add hme2 up add hme3 up
    -------
    (I'm stuck here.. how do I assign 192.168.1/24 to bridge0?)

    # ifconfig bridge0 inet 192.168.1.1 netmask 255.255.255.0 up
    ifconfig: SIOCAIFADDR: Invalid argument





    It is a unmodified 4.0/sparc install. Everything seems to work well,
    but just not the IP address on bridge0.

    Should I not be creating a bridge? What am I missing?

    Thanks much!

  2. Re: OpenBSD router

    Tim Judd wrote:
    > Hi guys, I'm trying to get the similar effects of a consumer router, one
    > WAN, four LAN ports.
    >
    > I have a single 10baseT network interface, and a 4-port 100baseT
    > ethernet card on the system. Am I going about this wrong to create the
    > same thing as a consumer router?
    >
    > # dhclient le0
    > # ifconfig bridge0 create
    > # brconfig bridge0 add hme0 up add hme1 up add hme2 up add hme3 up
    > -------
    > (I'm stuck here.. how do I assign 192.168.1/24 to bridge0?)
    >
    > # ifconfig bridge0 inet 192.168.1.1 netmask 255.255.255.0 up
    > ifconfig: SIOCAIFADDR: Invalid argument
    >


    OK, a bridge operates on a OSI layer not aware of IP data, so assigning
    a IP address to a bridge will never work. How else can I assign one IP
    to 4 NICs?

    >
    >
    > It is a unmodified 4.0/sparc install. Everything seems to work well,
    > but just not the IP address on bridge0.
    >
    > Should I not be creating a bridge? What am I missing?
    >
    > Thanks much!


    Any tips yet?

  3. Re: OpenBSD router

    Tim Judd wrote:
    > Tim Judd wrote:
    >> Hi guys, I'm trying to get the similar effects of a consumer router, one
    >> WAN, four LAN ports.
    >>
    >> I have a single 10baseT network interface, and a 4-port 100baseT
    >> ethernet card on the system. Am I going about this wrong to create the
    >> same thing as a consumer router?
    >>
    >> # dhclient le0
    >> # ifconfig bridge0 create
    >> # brconfig bridge0 add hme0 up add hme1 up add hme2 up add hme3 up
    >> -------
    >> (I'm stuck here.. how do I assign 192.168.1/24 to bridge0?)
    >>
    >> # ifconfig bridge0 inet 192.168.1.1 netmask 255.255.255.0 up
    >> ifconfig: SIOCAIFADDR: Invalid argument
    >>

    >
    > OK, a bridge operates on a OSI layer not aware of IP data, so assigning
    > a IP address to a bridge will never work. How else can I assign one IP
    > to 4 NICs?


    With a lot of ugly hacks. Why would you want to do that?

    I'm fairly certain - but no more than that - that you could bridge those
    four interfaces together, and assign whatever is attached to them your
    external interface as a gateway.

    Either way, you should consider using those four NICs to create separate
    subnets - which has both advantages and disadvantages, of course.

    Joachim

  4. Re: OpenBSD router

    Begin <-sKdnR87YcoEblrYnZ2dnUVZ_tTinZ2d@comcast.com>
    On 2007-02-06, Tim Judd wrote:
    >> I have a single 10baseT network interface, and a 4-port 100baseT
    >> ethernet card on the system. Am I going about this wrong to create the
    >> same thing as a consumer router?


    The consumer router thing will likely have those four LAN ports on a
    five port switch, the fifth being the internal interface. Or the four
    ports are really on a HUB. Some 10BaseT ``four port'' NICs are really
    hubs, too, so those would be more suitable for this purpose.


    > OK, a bridge operates on a OSI layer not aware of IP data, so assigning
    > a IP address to a bridge will never work. How else can I assign one IP
    > to 4 NICs?


    Bond all of them together, or perhaps `loop' the bridge on some virtual
    interface. I don't know if obsd can do that, though. You could replace
    the four-port NIC with a hub or a switch on a card type thing, if you
    can find it. Or you could give them all different ips and subnets and
    route everything. IIRC isc-dhcp being able to deal with that with a
    single instance, if the config file is setup right. As long as you're
    using RFC1918 addresses, it doesn't have to be a problem.


    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

  5. Re: OpenBSD router

    jpd wrote:
    > Begin <-sKdnR87YcoEblrYnZ2dnUVZ_tTinZ2d@comcast.com>
    > On 2007-02-06, Tim Judd wrote:
    >>> I have a single 10baseT network interface, and a 4-port 100baseT
    >>> ethernet card on the system. Am I going about this wrong to create the
    >>> same thing as a consumer router?

    >
    > The consumer router thing will likely have those four LAN ports on a
    > five port switch, the fifth being the internal interface. Or the four
    > ports are really on a HUB. Some 10BaseT ``four port'' NICs are really
    > hubs, too, so those would be more suitable for this purpose.
    >
    >
    >> OK, a bridge operates on a OSI layer not aware of IP data, so assigning
    >> a IP address to a bridge will never work. How else can I assign one IP
    >> to 4 NICs?

    >
    > Bond all of them together, or perhaps `loop' the bridge on some virtual
    > interface. I don't know if obsd can do that, though. You could replace
    > the four-port NIC with a hub or a switch on a card type thing, if you
    > can find it. Or you could give them all different ips and subnets and
    > route everything. IIRC isc-dhcp being able to deal with that with a
    > single instance, if the config file is setup right. As long as you're
    > using RFC1918 addresses, it doesn't have to be a problem.
    >
    >


    I will test this tonight, but can I assign a single IP to one of the
    4-port NICs, and then bridge them all to use that same IP? Somebody
    recommended trunking them, and it seems good, but trunking seems to be
    used for outbound communication (one source, many outputs). I was
    hoping for a many inputs, one destination kind of thing.

    Any more ideas? I'll use your suggestion, jpd. What "virtual
    interface" would you suggest?

    thanks again.

    --tj

  6. Re: OpenBSD router

    Begin
    On 2007-02-07, Tim Judd wrote:
    >
    > Any more ideas? I'll use your suggestion, jpd. What "virtual
    > interface" would you suggest?


    I wouldn't suggest anything for obsd at this point, it's been too long
    that I seriously played with it. It will probably help you more if you
    don't ask me specifically. :-)


    --
    j p d (at) d s b (dot) t u d e l f t (dot) n l .
    This message was originally posted on Usenet in plain text.
    Any other representation, additions, or changes do not have my
    consent and may be a violation of international copyright law.

  7. Re: OpenBSD router

    This is easy to do with openbsd. You create/modify 6 files and
    reboot:

    hostname.le0
    dhcp NONE NONE NONE

    hostname.hme0
    inet 192.168.1.1 255.255.255.0

    hostname.hme1
    up

    hostname.hme2
    up

    hostname.hme3:
    up

    bridgename.bridge0:
    add hme0
    add hme1
    add hme2
    add hme3
    up

    The IP address is assigned to one nic in the bridge. You do not
    assign the IP address to the bridge itself.

    PF will still filter the bridge interfaces, and pf.conf can be
    confusing when you are trying to block packets for the bridge, so if
    you have trouble and have a default block, try putting this in pf.conf
    for testing:
    pass quick log on { hme0 hme1 hme2 hme3 } keep state

    and then monitor with tcpdump -nei pflog0



  8. Re: OpenBSD router

    ga_obsd wrote:
    > This is easy to do with openbsd. You create/modify 6 files and
    > reboot:
    >
    > hostname.le0
    > dhcp NONE NONE NONE
    >
    > hostname.hme0
    > inet 192.168.1.1 255.255.255.0
    >
    > hostname.hme1
    > up
    >
    > hostname.hme2
    > up
    >
    > hostname.hme3:
    > up
    >
    > bridgename.bridge0:
    > add hme0
    > add hme1
    > add hme2
    > add hme3
    > up
    >
    > The IP address is assigned to one nic in the bridge. You do not
    > assign the IP address to the bridge itself.
    >
    > PF will still filter the bridge interfaces, and pf.conf can be
    > confusing when you are trying to block packets for the bridge, so if
    > you have trouble and have a default block, try putting this in pf.conf
    > for testing:
    > pass quick log on { hme0 hme1 hme2 hme3 } keep state
    >
    > and then monitor with tcpdump -nei pflog0
    >
    >


    Tried that.

    The bridge / hme cards don't pass the IP address between each other if
    not all the links are up.

    Now, (I just thought of this...) since ALL ethernet ports aren't
    bleeding to any other ethernet ports, assigning the same IP to all four
    hme cards might effectively do the same job! Without the need to
    establish a bridge. I will try this too. I do appreciate all of your
    inputs. Thank you ga_obsd.

    --TJ

+ Reply to Thread