One Process on the machine having two IP address and two ethernet interface.

One Process on the machine having two IP address and two ethernet interface.

Post by Pusik Par » Sat, 12 Oct 2002 09:19:37



Hi~ all.. :)

My machine has two ethernet cards. its ethernet cards are assigned IP
address each.
One server process works on my machine.
If this server process wanna deal with packets from all two interfaces, two
IPs.
that is, clients can be on two interfaces.

Is it possible?
If not, Does it need each server process according to each IP. need two
server process ?

Help me..
Beg your advice..
Happy Happy day..

Korean)
| PC ??? ?3? ?3Y ???? ?? ?? IP ?? A.A.A.A ? A.A.A.B ?
???.
?? PC ?? ??3a? ?-1? ??? ????? ???.
?-1?? ????? ??????? ????e??? A.A.A.A, A.A.A.B ? ?e????-
??? ?? ???.
? ?-1?? ??? LAN ?e?? ????? 1T?? ?3?? ? ?? ????? ? ??.

.. ???? ?y?o???? ?-1??| ??? ? ??????~?
(1) ??3a? ?-1?? ?3? IP ??? ???? ??????~?

(2) ??? ???? ??, ?3? ?-1? ?????o?| ? IP ?? ??????
??3a??~?

??e o??1??3?.

 
 
 

One Process on the machine having two IP address and two ethernet interface.

Post by ScriptOmati » Sat, 12 Oct 2002 09:32:57



> Hi~ all.. :)

> My machine has two ethernet cards. its ethernet cards are assigned IP
> address each.
> One server process works on my machine.
> If this server process wanna deal with packets from all two interfaces, two
> IPs.
> that is, clients can be on two interfaces.

> Is it possible?
> If not, Does it need each server process according to each IP. need two
> server process ?

> Help me..
> Beg your advice..
> Happy Happy day..

> Korean)
> | PC ??? ?3? ?3Y ???? ?? ?? IP ?? A.A.A.A ? A.A.A.B ?
> ???.
> ?? PC ?? ??3a? ?-1? ??? ????? ???.
> ?-1?? ????? ??????? ????e??? A.A.A.A, A.A.A.B ? ?e????-
> ??? ?? ???.
> ? ?-1?? ??? LAN ?e?? ????? 1T?? ?3?? ? ?? ????? ? ??.

> .. ???? ?y?o???? ?-1??| ??? ? ??????~?
> (1) ??3a? ?-1?? ?3? IP ??? ???? ??????~?

> (2) ??? ???? ??, ?3? ?-1? ?????o?| ? IP ?? ??????
> ??3a??~?

> ??e o??1??3?.

If I understand you, the machine has two NIC cards and you are writting
that
will open a server socket (i.e. will BIND) to one of the IP addresses --
but you will use the name naturally and not the ip address.

So, you should write the server so that, on the command line, you can
tell it what name and port it should bind to.  That way, you can run
two copies, one for each nic.

But I do not know, this might happen automatically if the service
is controlled by "inetd" or "xinetd".

Anyone else know about this ??

--
http://ftp.opensysmon.com is a shell script archive site with an
opensource system monitoring and network monitoring software package.
Many platforms are supplied already compiled.

 
 
 

One Process on the machine having two IP address and two ethernet interface.

Post by /dev/nul » Sat, 12 Oct 2002 09:41:27


Quote:> My machine has two ethernet cards. its ethernet cards are assigned IP
> address each.
> One server process works on my machine.
> If this server process wanna deal with packets from all two interfaces,
two
> IPs.
> that is, clients can be on two interfaces.

> Is it possible?

Yes.  Set the server process to receive connections on the IP address
0.0.0.0.  This is the "any ip" address which means that with one listening
socket your server can receive connections on all the ip addresses on your
machine.

If your server process doesn't have a command line option or conf file to
specify the ip address we'll have to try something else.  In which case you
need to tell us which process it is and how it is started and configured.

 
 
 

1. two ip addresses / two gateways / one machine?

    Can someone please help me out.  I have a linux box at work with one
network card.  The computer resides on two networks, the internal
network for the business (at 10.200.3.18) and the Internet (at
209.107.24.146).  I have no problem getting the computer to connect to
either network individually through their respective gateways (at
10.200.3.1 and 209.107.3.129), but I'd like to be able to configure eth0
to claim both IP addresses at the same time (I've been able to set up
IP-aliasing without any problems) and use both gateways at the same
time, chooing the appropriate one to connect to either network.
    It's setting up route to use both gateways that I've been unable to
do, yet.  Is there someway to do this?  I've been throught the manpages,
the how-tos, and have even visited the LDP, but I haven't found what I'm
looking for.
    This is what I've got so far:

ifconfig lo 127.0.0.1
ifconfig eth0 up
ifconfig eth0 209.107.24.146
ifconfig eth0:0 10.200.3.18
route add -net 127.0.0.0
route add -net 209.107.24.128 dev eth0
route add -host 209.107.24.146 dev eth0
route add default gw 209.107.24.129

No problems so far...  My computer sees the Internet with no problems.
Now how do I go about setting it up so it can see the internal network?
I've tried:

route add -net 10.200.3.0 dev eth0:0 but I get the error "SIOCADDRT:
Invalid argument"

Anyway, I'm stumped.  Any help would be apprecated.

Adam K

2. tty not refreshed

3. two IP's on one machine using two differnet NIC's

4. chmod not working for me

5. problem in pinging...: linux having two interfaces and on the same subnet ip addresses.

6. lilo hangs... help!

7. two ip address / two gateways / one computer?

8. PLIP problems

9. Two IP addresses on one interface?

10. Two IP addresses on one interface

11. Two interfaces - one IP address?

12. Two IP addresses on one interface?

13. Two IP address over one physical interface