Routin from / to multiple nics - Slackware

This is a discussion on Routin from / to multiple nics - Slackware ; Dear, I have a linux slackware 10 box with a kernel 2.4.32 (ancient but ok). The computer has no keyboard/monitor interface, everything is routed to a serial port ttyS0. This box also has 3 nics (eth0, eth1 & eth2). These ...

+ Reply to Thread
Results 1 to 7 of 7

Thread: Routin from / to multiple nics

  1. Routin from / to multiple nics

    Dear,

    I have a linux slackware 10 box with a kernel 2.4.32 (ancient but ok).
    The computer has no keyboard/monitor interface, everything is routed
    to a serial port ttyS0.

    This box also has 3 nics (eth0, eth1 & eth2). These ports are detected
    and working. I want to be able to perform the following:

    Connect an ethernet device with IP 192.168.0.X to _any_ of the 3 ports
    and have another ethernet device in the same subnet as the first
    device (e.g. IP 192.168.0.X+1) connected to any of the 2 available
    ports and they can "see" eachother.

    Run a service on this box (box with 3 ports) and let those other 2
    devices use it (service might be FTP or something)

    I've got ifconfig so far, as that it configures each port to
    192.168.0.250, 192.168.0.251 & 192.168.0.252. I can reach each of this
    via eth0 (192.168.0.250) using ping. I've enabled ip_forward. But I
    cannot 'see' any devices attached to eth1 or eth2...

    What's wrong?

    Basically, the 3 ports should function as some kind of 'hub'

    Max

  2. Re: Routin from / to multiple nics

    TheMaxer wrote:
    > Dear,
    >
    > I have a linux slackware 10 box with a kernel 2.4.32 (ancient but ok).
    > The computer has no keyboard/monitor interface, everything is routed
    > to a serial port ttyS0.
    >
    > This box also has 3 nics (eth0, eth1 & eth2). These ports are detected
    > and working. I want to be able to perform the following:
    >
    > Connect an ethernet device with IP 192.168.0.X to _any_ of the 3 ports
    > and have another ethernet device in the same subnet as the first
    > device (e.g. IP 192.168.0.X+1) connected to any of the 2 available
    > ports and they can "see" eachother.
    >
    > Run a service on this box (box with 3 ports) and let those other 2
    > devices use it (service might be FTP or something)
    >
    > I've got ifconfig so far, as that it configures each port to
    > 192.168.0.250, 192.168.0.251 & 192.168.0.252. I can reach each of this
    > via eth0 (192.168.0.250) using ping. I've enabled ip_forward. But I
    > cannot 'see' any devices attached to eth1 or eth2...
    >
    > What's wrong?
    >
    > Basically, the 3 ports should function as some kind of 'hub'


    You need to configure a "bride" with those ethernet interfaces.
    On a Slackware 10.2 you might want to start by reading
    /usr/doc/bridge-utils-1.0.6/doc/HOWTO


    Regards,

    Kees.

    --
    Kees Theunissen.

  3. Re: Routin from / to multiple nics

    TheMaxer wrote:
    > Connect an ethernet device with IP 192.168.0.X to _any_ of the 3 ports
    > and have another ethernet device in the same subnet as the first device
    > (e.g. IP 192.168.0.X+1) connected to any of the 2 available ports and
    > they can "see" eachother.


    > I've enabled ip_forward. But I cannot 'see' any devices attached to eth1
    > or eth2...


    > What's wrong?


    By default all outgoing traffic on the same subnet will go through eth0
    even if the outgoing traffic comes from an IP on another NIC like eth1. It
    is possible to change this default behavior by adding rules with the "ip"
    command.

    > Basically, the 3 ports should function as some kind of 'hub'


    I don't know if it is possible to send all outgoing traffic on the same
    subnet on all NICs connected to that subnet. Doing such a thing would be
    very wrong by definition. If two nics in the same computer are connected
    to the same subnet they should also be connected to the same network. Now,
    as you connect them to different networks the right solution would be to
    have different subnets for the different networks.

    Still, if it would be possible to build a hub out of a linux box with many
    nics you might find a clue on how to do that in the Linux Advanced Routing
    & Traffic Control HOWTO at http://lartc.org/howto/index.html

    regards Henrik
    --
    The address in the header is only to prevent spam. My real address is:
    hc3(at)poolhem.se Examples of addresses which go to spammers:
    root@localhost postmaster@localhost


  4. Re: Routin from / to multiple nics

    On Sat, 14 Jun 2008 07:35:02 -0700, TheMaxer wrote:

    > Dear,
    >
    > I have a linux slackware 10 box with a kernel 2.4.32 (ancient but ok).
    > The computer has no keyboard/monitor interface, everything is routed
    > to a serial port ttyS0.
    >
    > This box also has 3 nics (eth0, eth1 & eth2). These ports are detected
    > and working. I want to be able to perform the following:
    >
    > Connect an ethernet device with IP 192.168.0.X to _any_ of the 3 ports
    > and have another ethernet device in the same subnet as the first
    > device (e.g. IP 192.168.0.X+1) connected to any of the 2 available
    > ports and they can "see" eachother.
    >
    > Run a service on this box (box with 3 ports) and let those other 2
    > devices use it (service might be FTP or something)
    >
    > I've got ifconfig so far, as that it configures each port to
    > 192.168.0.250, 192.168.0.251 & 192.168.0.252. I can reach each of this
    > via eth0 (192.168.0.250) using ping. I've enabled ip_forward. But I
    > cannot 'see' any devices attached to eth1 or eth2...
    >
    > What's wrong?
    >
    > Basically, the 3 ports should function as some kind of 'hub'
    >
    > Max
    >

    I am not sure I have the answer. I recently setup some firewalls using
    proxy-arp. Proxy-arp is used to partition the IP numeric range of an
    assigned subnet. I setup the router with iptable firewall to monitor
    across the subnets. The key principal of proxy-arp is having a router with
    at least two network cards. The "WAN" facing card is assigned as a
    member of the entire assigned network. The "LAN" facing card is assigned
    to be an address (and netmask) for a smaller subset of the addresses
    assigned to the WAN interface; the key point is that both ranges
    overlap. When enabled, proxy-arp relays the hardware addresses (MAC
    addresses, not IP addresses) of devices connected to the LAN
    interface. Routing is handled by the standard routing table. Your problem
    is a bit more tricky because you seem to be insisting that the IP address
    is arbitrary regardless of the interface. AFAIK, MAC addresses can
    move around arbitrarily, and be relayed via proxy-arp, but IP addresses
    (at least with this topology/design are "well known" and controlled).

    I have not read the bridging-howto (well, I have not carefully read it.)
    Perhaps, by reading about bridging and proxy-arp, you will arrive at
    something which does what you want.

    BTW, when I read the proxy-arp howto, I found some commands were a bit out
    of date. A simpler form of the /sbin/arp command was all that was
    necessary to setup permanent subnetting.

    --
    Douglas Mayne


  5. Re: Routin from / to multiple nics

    Dear all,

    The answer was indeed the bridge stuff already available. Just a
    couple of lines added to rc.local and it works like a charm!

    One last problem though. I work with the box via RS232. I've re-routed
    everything to a serial port, and that works, however. the kernel keeps
    complaining about a keyboard which isn't there (like 5000x the same
    message) and it concludes that it might not be there....how to fix
    this?

    Max

  6. Re: Routin from / to multiple nics

    On Jun 15, 1:37 pm, TheMaxer wrote:
    > Dear all,
    >
    > The answer was indeed the bridge stuff already available. Just a
    > couple of lines added to rc.local and it works like a charm!
    >
    > One last problem though. I work with the box via RS232. I've re-routed
    > everything to a serial port, and that works, however. the kernel keeps
    > complaining about a keyboard which isn't there (like 5000x the same
    > message) and it concludes that it might not be there....how to fix
    > this?
    >
    > Max


    In your boot image (lilo, I would believe for you), change the
    "APPEND" line and add the following:

    "APPEND= console=ttyS0,38400,n,8,1"

    Use appropriate entries for console as needed;
    ttyS0 {serial_port}
    38400 {actual speed}
    n,8,1 {flow control}

  7. Re: Routin from / to multiple nics

    On 16 jun, 19:56, alisonken1 wrote:
    >
    > "APPEND= console=ttyS0,38400,n,8,1"


    Yes, I already did that. That works fine. My problem is, that the
    kernel, during booting is looking for a 8042 keyboard controller which
    isn't there. This causes a flood of error messages (all identical) and
    large time outs (30-60sec!), and on top of that, it happens 2 times.

    Error:

    pc_keyb: error controller jammed (0xFF) <- this gets printed a lot of
    times...
    Keyboard timed out[1]
    pty: 512 Unix98 ptys configure

    Then a quick message I did nnot get and then the above once more. Then
    everything works fine. I get a normal login at the prompt at the end
    of the boot.

    I must day, that my append does contain 2 entries:"console=tty0
    console=ttyS0,38400n8"

    So I allow both "normal" console and serial port console....

    Any hints?

    Max

+ Reply to Thread