1827853 Members
1717 Online
109969 Solutions
New Discussion

Linux bridge

 
jpcast_real
Regular Advisor

Linux bridge

Hello ,

I have configured in my office a private network and a public network. I have connected both networks with a Linux PC ,redhat 8 , with 2 network cards . Traffic between both networks work correctly but when a try to open a web page form the public network to a web serve in the private network , the speed is very slow . I think it is caused when there are some java applications involved. In the private network every thing works correctly and we do not experience any other kind of problem

My questions:

-How can affect java to the network traffic.
-Is there any java configuration which can affect to this issue??
-Is there any log file I can enable in the linux.

I wait your comments , regards
Here rests one who was not what he wanted and didn't want what he was
17 REPLIES 17
Vitaly Karasik_1
Honored Contributor

Re: Linux bridge

1) are you sure your NICs work with 100MB full-duplex mode?
2) do you see any errors in "ifconfig" output? "dmesg" output?
3) you may use "ftp" in order to check your network bandwitch.

Rgds,
Vitaly
jpcast_real
Regular Advisor

Re: Linux bridge

In my opinion , the bandwith is correct and I do not find any kind of error in the Linux bridge . The main problem happens when I try to open any kind of Java application remotely . I do not know exactly what java does to the bridge but it makes remote connection to the web server be too slow.
Here rests one who was not what he wanted and didn't want what he was
Vitaly Karasik_1
Honored Contributor

Re: Linux bridge

can you transfer some big file betwen networks and let us know hwta is speed?
jpcast_real
Regular Advisor

Re: Linux bridge

Yes of course , ftp and telnet work correctly

Here rests one who was not what he wanted and didn't want what he was
Vitaly Karasik_1
Honored Contributor

Re: Linux bridge

when you run command-line ftp client, it provides you with a speed meter [like 8e+03 Kbytes/sec, for example]. I'd like to receive such number from your servers.

Regarding webserver - do static webpages open fast? You can check this with some benchmark tool.

Source for your problem may be DNS issues too, but in order to confirm this, we need to know more about your web application.
jpcast_real
Regular Advisor

Re: Linux bridge

Hello ,

this is an example of ftp transfer from the public to the private network , crossing the linux bridge:
200 Type set to I.
ftp> put aoml*
200 PORT command successful.
150 Opening BINARY mode data connection for aoml.zip.
226 Transfer complete.
ftp: 8064365 bytes enviados en 0,77 segundos 10459,62 a KB/s.

this is the same ftp example but not crossing the linux bridge.
ftp> put aoml.zip
200 PORT command successful.
150 Opening BINARY mode data connection for aoml.zip.
226 Transfer complete.
ftp: 8064365 bytes enviados en 0,71 segundos 11342,29 a KB/s.



I agree with you that DNS has much to do with web browsing , for this reason I have tried just to use the IP address of the remote server , but the result is the same
Here rests one who was not what he wanted and didn't want what he was
jpcast_real
Regular Advisor

Re: Linux bridge

Static web pages open fast ....
Here rests one who was not what he wanted and didn't want what he was
Sergejs Svitnevs
Honored Contributor

Re: Linux bridge

Your problem seems to be Java code.
What type of Java applications do you use?
If a Java applet is embedded in a WEB page, a browser from the public subnet downloads it and executes it automatically. In example, an applet and server can communicate by having the applet establish a socket connection.
If your linux router doesn't allow raw socket connections then it disallows this sort of applet-server communications.

Regards,
Sergejs
Vitaly Karasik_1
Honored Contributor

Re: Linux bridge

2 Javier - I spoke not about DNS record for your webserver - your Java code may ask, for example, reverse DNS record for webclient.

2 Sergey - are you sure Java web-applications can use raw-sockets? AFAIK, raw sockets won't work for non-root [regular] users.
jpcast_real
Regular Advisor

Re: Linux bridge

I have configured a correct DNS in the client and in the server but it does not work . How can I know if the application is using raw sockets???

When I make the connection from the external network I can see how sockets are opened but the die very fast....

In the internal network , communication is correct...
Here rests one who was not what he wanted and didn't want what he was
Sergejs Svitnevs
Honored Contributor

Re: Linux bridge

Vitaly,

With a raw socket approach, an applet can establish persistent and biderectional connection with the database server rather than POST's to a CGI-bin script on a WEB-server. It is a standart Java programming solution.

Regards,
Sergejs
jpcast_real
Regular Advisor

Re: Linux bridge

Yes but I must know if this is the problem in the network . Is there any tool to test it or is there any way to make the Linux router capable to transfer this packages???

Thanks
Here rests one who was not what he wanted and didn't want what he was
Vitaly Karasik_1
Honored Contributor

Re: Linux bridge

2 Sergey [sorry for offtopic] - I've read some explanation about "Java raw sockets" and as far as I understand, in Java world "raw socket" has different meaning when in Linux world. I'm right?

And regarding Javier's problem - IMHO, if router/firewal [BTW, do you run iptables on your linux router?] denied "java raw socket" application won't run at all; and in our case application runs, but slow.

Do both client boxs have the same configuration?
jpcast_real
Regular Advisor

Re: Linux bridge

I do not use any kind of iptables as far as I now. We have moved the java web server to another environment withouth linux router but with L3 nortel switches and the problem is the same.... Finally i have used a laptop to make a final test . This laptop in the internal network works perfect and in another network it takes 30 minustes to open the java application. The only configuration difference is the IP address of the laptop.

In my opinion , java application is doing something which makes it slow when it jumps to another network . I have analized sockets in the clients side and I have seen how many of this sockets die . It seems that the client open the sockets but they do not receive the answer the wait ......

Strange problem.....
Here rests one who was not what he wanted and didn't want what he was
Vitaly Karasik_1
Honored Contributor

Re: Linux bridge

IMHO, you should learn java code [or ask developers for a details].

Meanwhile can you run small test:

on your webserver please run "nslookup client" and "nslookup client_ip" commands in two situations - when your client in internal and external networks.

jpcast_real
Regular Advisor

Re: Linux bridge

We have used ethereal in the linux brige and we have discovered that the java web server sends broadcast messages querying the netbios name for the client system. Adding the client system in the host file form the java server the problem has been solved partially .


I just wonder why java application is searching the netbios client name sending packages to the broadcast IP form the local network ?????
Here rests one who was not what he wanted and didn't want what he was
Vitaly Karasik_1
Honored Contributor

Re: Linux bridge

Do you have heterogenous network? do you have samba on your webserver?

I see two solutions:

1) provide correct WINS (netbios) name resolution for both networks
2) to force java code to use DNS only