LinuxQuestions.org
Welcome to the most active Linux Forum on the web.
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices


Reply
  Search this Thread
Old 11-05-2004, 07:11 AM   #1
filippo.crea
LQ Newbie
 
Registered: Nov 2004
Posts: 9

Rep: Reputation: 0
Problem using Virtual IP


I have defined two different virtual IP on the same network card. I start an application that use the first virtual IP on port 1000 and everything works fine. When I run another application that use the second virtual IP on the same port number (1000), the listen function fails. If I change the port number even the second application works correctly. This is the right behavior or I do something wrong? I mean, I must use two different port or there is another workaround? thanks
 
Old 11-05-2004, 08:20 AM   #2
Matir
LQ Guru
 
Registered: Nov 2004
Location: San Jose, CA
Distribution: Debian, Arch
Posts: 8,507

Rep: Reputation: 128Reputation: 128
make sure they're not also trying to listen on the local interface (127.0.0.1). You have to bind them to different addresses.

Also, can you provide ifconfig -a and application code snippets?
 
Old 11-05-2004, 09:14 AM   #3
filippo.crea
LQ Newbie
 
Registered: Nov 2004
Posts: 9

Original Poster
Rep: Reputation: 0
The conflict is on the virtual IP address not on the 127.0.0.1

I don't have the sources of the application.

This is the output of the ifconfig -a

ifconfig -a
eth0 Link encap:Ethernet HWaddr 00:11:0A:30:16:64
inet addr:10.201.232.20 Bcast:10.201.232.63 Mask:255.255.255.192
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:1413194 errors:0 dropped:0 overruns:0 frame:0
TX packets:1663285 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:268959925 (256.5 Mb) TX bytes:949122359 (905.1 Mb)
Interrupt:28

eth1 Link encap:Ethernet HWaddr 00:0A:5E:09:70:CB
inet addr:10.10.50.2 Bcast:10.10.50.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:2356707 errors:0 dropped:0 overruns:0 frame:0
TX packets:1785641 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:185969013 (177.3 Mb) TX bytes:524518813 (500.2 Mb)
Interrupt:22

eth1:1 Link encap:Ethernet HWaddr 00:0A:5E:09:70:CB
inet addr:10.10.50.10 Bcast:10.255.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:522738 errors:0 dropped:0 overruns:0 frame:0
TX packets:545206 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:50757562 (48.4 Mb) TX bytes:60658728 (57.8 Mb)
Interrupt:22

eth1:2 Link encap:Ethernet HWaddr 00:0A:5E:09:70:CB
inet addr:10.10.50.11 Bcast:10.255.255.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:522738 errors:0 dropped:0 overruns:0 frame:0
TX packets:545206 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:50757562 (48.4 Mb) TX bytes:60658728 (57.8 Mb)
Interrupt:22

eth2 Link encap:Ethernet HWaddr 00:02:B3:3A:30:10
inet addr:9.10.50.2 Bcast:9.10.50.255 Mask:255.255.255.0
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:522738 errors:0 dropped:0 overruns:0 frame:0
TX packets:545206 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:50757562 (48.4 Mb) TX bytes:60658728 (57.8 Mb)
Interrupt:18 Base address:0x2040 Memory:f7df0000-f7df0038

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:4462347 errors:0 dropped:0 overruns:0 frame:0
TX packets:4462347 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:1761852151 (1680.2 Mb) TX bytes:1761852151 (1680.2 Mb)
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
problem with a virtual package kreat0r Debian 1 04-03-2005 04:50 AM
virtual hosts problem newuser455 Linux - Software 0 08-29-2004 08:01 PM
Virtual desktop Problem.......Help!! hkstandard Linux - Software 3 08-13-2004 11:29 PM
Help!!! My virtual desktop problem... hkstandard Linux - General 2 08-12-2004 06:53 PM
virtual host problem Michele Linux - Newbie 5 08-18-2003 11:05 AM

LinuxQuestions.org > Forums > Non-*NIX Forums > Programming

All times are GMT -5. The time now is 04:57 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration