1

I've tryied release a java socket connection using ppp0 endpoint by this way:

Socket socket = new Socket(InetAddress.getByName("200.147.67.142"), 80, InetAddress.getByName("189.116.7.204"), 4447);

Where 189.116.7.204 is IP address from ppp0 interface and 200.147.67.142 the target.

The problem is: TimeoutException

My network configuration:

ifconfig -a
eth0      Link encap:Ethernet  Endereço de HW b8:27:eb:fb:45:a6
          UP BROADCASTMULTICAST  MTU:1500  Métrica:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          colisões:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

lo        Link encap:Loopback Local
          inet end.: 127.0.0.1  Masc:255.0.0.0
          UP LOOPBACKRUNNING  MTU:16436  Métrica:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          colisões:0 txqueuelen:0
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

ppp0      Link encap:Protocolo Ponto-a-Ponto
          inet end.: 189.116.7.204  P-a-P:10.64.64.64  Masc:255.255.255.255
          UP POINTOPOINT RUNNING NOARP MULTICAST  MTU:1500  Métrica:1
          RX packets:24 errors:0 dropped:0 overruns:0 frame:0
          TX packets:25 errors:0 dropped:0 overruns:0 carrier:0
          colisões:0 txqueuelen:3
          RX bytes:408 (408.0 B)  TX bytes:537 (537.0 B)

wlan0     Link encap:Ethernet  Endereço de HW c8:3a:35:ca:4c:50
          inet end.: 10.0.1.16  Bcast:10.0.1.255  Masc:255.255.255.0
          UP BROADCASTRUNNING MULTICAST  MTU:1500  Métrica:1
          RX packets:35080 errors:0 dropped:1164 overruns:0 frame:0
          TX packets:32267 errors:0 dropped:0 overruns:0 carrier:0
          colisões:0 txqueuelen:1000
          RX bytes:23543046 (22.4 MiB)  TX bytes:11526680 (10.9 MiB)

wwan0     Link encap:Ethernet  Endereço de HW 58:2c:80:13:92:63
          UP BROADCASTRUNNING MULTICAST  MTU:1500  Métrica:1
          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
          colisões:0 txqueuelen:1000
          RX bytes:0 (0.0 B)  TX bytes:0 (0.0 B)

Thanks for any help...

  • If you wish to use a specific interface, see this answer : http://stackoverflow.com/questions/4297356/how-does-a-socket-know-which-network-interface-controller-to-use – KevinDTimm Sep 03 '13 at 20:53
  • 1
    Ok, I understod how bind works. But I can't get why TimeoutException... – Leandro Franchi Sep 03 '13 at 21:07

0 Answers0