Accepting Incoming Traffic on Interface not configured with an IP - Networking

This is a discussion on Accepting Incoming Traffic on Interface not configured with an IP - Networking ; My understanding is that Linux uses a model where IP addresses are assigned to machines, not to interfaces. I've a PC with two NICs eth0 and eth1. PC is connected to network via eth0. Is it possible that instead of ...

+ Reply to Thread
Results 1 to 4 of 4

Thread: Accepting Incoming Traffic on Interface not configured with an IP

  1. Accepting Incoming Traffic on Interface not configured with an IP

    My understanding is that Linux uses a model where IP addresses are
    assigned to machines, not to interfaces.

    I've a PC with two NICs eth0 and eth1. PC is connected to network via
    eth0.

    Is it possible that instead of configuring IP on eth0, I configure on
    eth1 and still PC is reachable from network.

    Thanks.


  2. Re: Accepting Incoming Traffic on Interface not configured with anIP

    Am Tue, 12 Aug 2008 22:56:57 -0700 schrieb astonishs:

    > My understanding is that Linux uses a model where IP addresses are
    > assigned to machines, not to interfaces.


    Nope, a machine can have more than one IP on the same interface.

    > I've a PC with two NICs eth0 and eth1. PC is connected to network via
    > eth0.
    > Is it possible that instead of configuring IP on eth0, I configure on
    > eth1 and still PC is reachable from network.
    >


    make sure that ip_forward is 1 and set the default gw via eth0

    cheers

  3. Re: Accepting Incoming Traffic on Interface not configured with anIP

    astonishs@yahoo.com wrote:
    > My understanding is that Linux uses a model where IP addresses are
    > assigned to machines, not to interfaces.
    >
    > I've a PC with two NICs eth0 and eth1. PC is connected to network via
    > eth0.
    >
    > Is it possible that instead of configuring IP on eth0, I configure on
    > eth1 and still PC is reachable from network.


    IP addresses are assigned to interfaces.

    If you don't configure eth0, you're not going to be able to use it for
    much of anything.

    Depending on how your two interfaces are wired, you can put different
    addresses from either the same or different networks on each of them.
    Using interface bonding, you can also put the same address on both of
    them for high availability, but that's a different topic.

  4. Re: Accepting Incoming Traffic on Interface not configured with anIP

    Hello,

    astonishs@yahoo.com a écrit :
    > My understanding is that Linux uses a model where IP addresses are
    > assigned to machines, not to interfaces.


    In a way, yes. It is called the "weak model".

    > I've a PC with two NICs eth0 and eth1. PC is connected to network via
    > eth0.
    >
    > Is it possible that instead of configuring IP on eth0, I configure on
    > eth1 and still PC is reachable from network.


    Yes, if eth0 has been bound to the IP stack (ifconfig eth0 0.0.0.0 up
    can do it). It will reply to ARP requests for eth1's address and accept
    incoming IP packets on eth0. But in order to be able to send IP packets
    through eth0, the routes still need to be set on eth0.

+ Reply to Thread