eth0 and eth1 on same subnet using netmask

Discussion in 'Linux Networking' started by Martin Klar, Sep 14, 2007.

  1. Martin Klar

    Martin Klar Guest


    is it possible to setup routing:

    eth0 (e.g. ethernet) and eth1 (e.g. WLAN)

    on the SAME subnet (e.g. 192.168.3.x) just specifying
    a special netmask each?

    Thank you for ideas

    Martin Klar, Sep 14, 2007
    1. Advertisements

  2. Martin Klar

    Rick Jones Guest

    What do you mean by setup routing here? You mean such that this
    machine will connect users on the ethernet to users on the WLAN when
    all are in the same IP subnet? If so, then I would think that would
    be a job for _bridging_ (operating at layer2) rather than _routing_
    (operating at layer3 - eg IP).

    Even if you sorted-out netmasks to make things happen at IP (layer3)
    the decision on what to use as a router is made by the client, not the
    router, so each system in the Ethernet would need to be configured to
    use your system to reach the IPs in the WLAN and vice versa.
    UNLESS... you could run proxy-ARP on your system, then while everyone
    on the ethernet and the WLAN think they are in the same subnet, you
    "fake them out" by responding to their ARP requests with your MAC

    Given what you've described thusfar, I think it might be best to
    enable and setup bridging on your system.

    rick jones
    Rick Jones, Sep 14, 2007
    1. Advertisements

  3. With a netmask of and
    are two subnets within 192.168.3.x

    and interfaces on one and interfaces on the other
    no longer are no longer on the SAME subnet.

    Select a different netmask for different granularity.
    Thomas Schodt, Sep 15, 2007
  4. If you mean can two interfaces exist on the same wire with
    non-overlapping networks, then yes, although there are very few
    instances where you'd want that (i.e., run different networks on the
    same wire without using vlans).

    If you mean can two interfaces exist on different wires with
    non-overlapping networks, then yes, of course. Subnet boundaries do not
    have to have masks with lengths that are multiples of 8.

    The only requirement is that networks do not overlap.
    Allen Kistler, Sep 15, 2007
    1. Advertisements

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments (here). After that, you can post your question and our members will help you out.