One Ethernet connection for Everything - Suse

This is a discussion on One Ethernet connection for Everything - Suse ; Hello, I have some boxes and a switch. Each box has only one Ethernet connector. Is it possible to make a box with only one Ethernet connector a gateway? All the local boxes are connected to the hub and the ...

+ Reply to Thread
Results 1 to 11 of 11

Thread: One Ethernet connection for Everything

  1. One Ethernet connection for Everything

    Hello,

    I have some boxes and a switch. Each box has only one Ethernet connector.

    Is it possible to make a box with only one Ethernet connector a gateway?

    All the local boxes are connected to the hub and the hub is connected with
    my cable modem (with one WAN IP only).

    Can I set up one of the boxes as a router / gateway to the Internet for the
    other boxes on the hub through only one Ethernet patch cable to the hub
    acting as Internet gateway AND router?

    I mean - Can it be done?

    Many Thanks

    Guy



  2. Re: One Ethernet connection for Everything

    On Fri, 2007-11-02 at 14:16 +0000, Guy Ollerearnshaw wrote:
    > Hello,
    >
    > I have some boxes and a switch. Each box has only one Ethernet connector.
    >
    > Is it possible to make a box with only one Ethernet connector a gateway?


    Yes.

    You can create an alias interface (e.g. eth0:1) with a different
    address.

    So for example, your box could be IP'd to your ISP and the alias
    interface could be set to your private network. Then you can
    set up the NAT'ing and DHCP or whatever to set on your
    private alias'd network.

    It's been awhile since I've done this... but I know I did it
    in the past.

    You box should be plugged into a switch. Not sure if things
    will work right through a hub.

    >
    > All the local boxes are connected to the hub and the hub is connected with
    > my cable modem (with one WAN IP only).
    >
    > Can I set up one of the boxes as a router / gateway to the Internet for the
    > other boxes on the hub through only one Ethernet patch cable to the hub
    > acting as Internet gateway AND router?
    >
    > I mean - Can it be done?
    >
    > Many Thanks
    >
    > Guy
    >
    >



  3. Re: One Ethernet connection for Everything

    Guy Ollerearnshaw wrote:
    > Hello,
    >
    > I have some boxes and a switch. Each box has only one Ethernet connector.
    >
    > Is it possible to make a box with only one Ethernet connector a gateway?
    >
    > All the local boxes are connected to the hub and the hub is connected with
    > my cable modem (with one WAN IP only).
    >
    > Can I set up one of the boxes as a router / gateway to the Internet for the
    > other boxes on the hub through only one Ethernet patch cable to the hub
    > acting as Internet gateway AND router?
    >
    > I mean - Can it be done?


    No. Just buy a cheapo network card and do it the normal way. Perhaps
    somebody you know has a card lying around. The connection to your cable
    will probably only need be 10MB.

    I would go for the free card somebody has lying around. Ask your IT
    department. Perhaps they have some extra they do not need, because they
    went to 100MB.

    houghi
    --
    It's people. Source code is made out of people! They're making our
    source out of people. Next thing they'll be breeding us like cattle
    for code. You've gotta tell them. You've gotta tell them!

  4. Re: One Ethernet connection for Everything

    On 2 Nov, 15:17, houghi wrote:
    > No. Just buy a cheapo network card and do it the normal way. Perhaps
    > somebody you know has a card lying around. The connection to your cable
    > will probably only need be 10MB.


    On 2 Nov, 15:06, Chris Cox wrote:
    >
    > Yes.
    >
    > You can create an alias interface (e.g. eth0:1) with a different
    > address.
    >


    But confusing....Chris is right, i can be done, but adding a 2nd
    network card is a lot simpler.

    C.


  5. Re: One Ethernet connection for Everything

    Thank you all for your encouragement. With an Ethernet card it would be as
    simple (almost) as plug n' pray but my machines have no PCI slots. They are
    Dell SX270's I found in a skip. I need the 'one armed router' or 'router on
    a stick' solution.

    Off topic - How to repair a Dell SX270:

    http://www.theinquirer.net/default.aspx?article=24596

    and a picture of some faulty capacitors:

    http://img.photobucket.com/albums/v711/whurd/Bad.jpg

    Chucked because of a motherboard failure. I have put some new caps on the
    mobo and they run fine! 8-)




  6. Re: One Ethernet connection for Everything

    On Fri, 02 Nov 2007 20:43:13 GMT
    "Guy Ollerearnshaw" wrote:

    > Thank you all for your encouragement. With an Ethernet card it would
    > be as simple (almost) as plug n' pray but my machines have no PCI
    > slots. They are Dell SX270's I found in a skip. I need the 'one
    > armed router' or 'router on a stick' solution.
    >
    > Off topic - How to repair a Dell SX270:
    >
    > http://www.theinquirer.net/default.aspx?article=24596
    >
    > and a picture of some faulty capacitors:
    >
    > http://img.photobucket.com/albums/v711/whurd/Bad.jpg
    >
    > Chucked because of a motherboard failure. I have put some new caps
    > on the mobo and they run fine! 8-)
    >

    USB->Ethernet adaptor then?

    --
    Cheers Malcolm (Linux Counter #276890)
    SLED 10.0 SP1 x86_64 Kernel 2.6.16.53-0.16-smp
    up 6 days 22:17, 2 users, load average: 0.31, 0.24, 0.20

  7. Re: One Ethernet connection for Everything

    One trap you may fall into though is that iptables (aka the SusE
    firewall stuff) doesn't like using the alias interface names and MAC
    addresses are useless too.. (I have only checked this as far as 10.1 though)

    The trick then is to rewrite the firewall script from scratch with no
    reference to the physical devices, but (mainly) just to the IP
    addresses. I have a 9.3 based server setup that way. It's not difficult!

    Good luck!

    Bob

    Guy Ollerearnshaw wrote:
    > Thank you all for your encouragement. With an Ethernet card it would be as
    > simple (almost) as plug n' pray but my machines have no PCI slots.


  8. Re: One Ethernet connection for Everything

    Chris

    The term "switch" use to always mean something that worked in layer 2.
    This meaning the client MAC address in most networks. Nowadays you often
    see the term "layer 2 switch" or "layer 3 switch". Layer 3 implying IP
    addresses in most cases and not being that common in cheaper boxes. (A
    router is in a sense layer 3 switch)

    Layer 3 switching may be problematic for an aliased interface if not
    setup correctly. Layer 2 however works fine.

    Hubs (layer 1 if you like) will also work fine with an aliased
    interface. Hubs are "stupid" in that they "repeat" everything that
    appears on one input to all outputs. Layer 2 switches on the other hand
    learn what MAC addresses are on what physical ports and only output data
    to that port if that MAC is the destination. This of course can give
    better throughput than a hub.

    Apologies for the waffling..

    Bob



    Chris Cox wrote:

    >
    > You box should be plugged into a switch. Not sure if things
    > will work right through a hub.
    >
    >> All the local boxes are connected to the hub and the hub is connected with
    >> my cable modem (with one WAN IP only).


  9. Re: One Ethernet connection for Everything

    Bob Bob wrote:
    > Chris
    >
    > The term "switch" use to always mean something that worked in layer 2.
    > This meaning the client MAC address in most networks. Nowadays you often
    > see the term "layer 2 switch" or "layer 3 switch". Layer 3 implying IP
    > addresses in most cases and not being that common in cheaper boxes. (A
    > router is in a sense layer 3 switch)
    >
    > Layer 3 switching may be problematic for an aliased interface if not
    > setup correctly. Layer 2 however works fine.
    >
    > Hubs (layer 1 if you like) will also work fine with an aliased
    > interface. Hubs are "stupid" in that they "repeat" everything that
    > appears on one input to all outputs. Layer 2 switches on the other hand
    > learn what MAC addresses are on what physical ports and only output data
    > to that port if that MAC is the destination. This of course can give
    > better throughput than a hub.


    Oh.. the issue with regards to isolation. That's all I meant.
    If you are wanting to setup a gateway with a firewall, it's
    probably best on a switch vs. a hub.

    >
    > Apologies for the waffling..


    No problem... I liked the explanation.

    >
    > Bob


  10. Re: One Ethernet connection for Everything

    On Nov 4, 8:45 pm, Chris Cox wrote:
    > Bob Bob wrote:
    > > Chris

    >
    > > The term "switch" use to always mean something that worked in layer 2.
    > > This meaning the client MAC address in most networks. Nowadays you often
    > > see the term "layer 2 switch" or "layer 3 switch". Layer 3 implying IP
    > > addresses in most cases and not being that common in cheaper boxes. (A
    > > router is in a sense layer 3 switch)

    >
    > > Layer 3 switching may be problematic for an aliased interface if not
    > > setup correctly. Layer 2 however works fine.

    >
    > > Hubs (layer 1 if you like) will also work fine with an aliased
    > > interface. Hubs are "stupid" in that they "repeat" everything that
    > > appears on one input to all outputs. Layer 2 switches on the other hand
    > > learn what MAC addresses are on what physical ports and only output data
    > > to that port if that MAC is the destination. This of course can give
    > > better throughput than a hub.

    >
    > Oh.. the issue with regards to isolation. That's all I meant.
    > If you are wanting to setup a gateway with a firewall, it's
    > probably best on a switch vs. a hub.
    >
    >
    >
    > > Apologies for the waffling..

    >
    > No problem... I liked the explanation.
    >
    >
    >
    > > Bob


    It can be done with using subinterfaces. Just write your one iptables
    firewall-script so you can use alias names. This isn't the savest
    solution because the other hosts in the network can bypass the router
    be setting an other gateway (this problem allways exists when a
    lollypop-gateway).

    It will work with a hub also, the only thing to prefer a switch is the
    speed in the network. A switch will be faster if there are more than 4
    hosts in the network (thats some basic rule I use), this ios because a
    router copy's all the input on one port too al the others, so if 2
    hosts send something at the same time, the packets will interfere with
    eatch other and a collesion will be created (after this both hosts
    would resend there packets after a random time of waiting).


  11. Re: One Ethernet connection for Everything

    Perhaps I was using an older version of iptables. I tried using the
    alias interface names and it didn't work, found various references to
    the problem so had to do it differently. In my case it was just as easy
    to define an IP range as being private (protected) and not (!)

    Collisions aren't so bad on an Ethernet network. I actually prefer to
    run half duplex because collision detecting and resending is done at a
    very basic hardware level on the NIC. It doesn't use PC CPU cycles to
    retransmit. I'll admit I haven't stayed up with more recent technology,
    but I remember that differing brands of FDX NICs of some years ago had a
    different "pause frame" implementation such that you had to force select
    HDX to stop overruns. As I recall the problem I had was with a Cisco
    2924 switch and a Compaq DL380 NIC. (Possibly an old IOS/BIOS) No doubt
    NIC's nowadays handle that better, but having the OS actually handle FDX
    traffic handshaking seemed a little pointless back then.

    Given that your Internet speed would be some fraction of a 100MB LAN
    bandwidth I doubt you'd suffer an noticeable problem with packet
    crashes. It does of course depend on what else the router/server box is
    doing.

    My 2c - and waffle

    Cheers Bob

    blackd wrote:
    > It can be done with using subinterfaces. Just write your one iptables
    > firewall-script so you can use alias names.


    > hosts send something at the same time, the packets will interfere with
    > eatch other and a collesion will be created (after this both hosts
    > would resend there packets after a random time of waiting).


+ Reply to Thread