java - Issue with DSCP marking using setTrafficClass and WireShark -
I'm trying to mark DSCP values using setTrafficClass. My servers and clients are installed on two separate machines and I am able to print the cost of DSCP but I can not see it in WireShark. I have gone online through some posts but nothing helped, I am using Windows 7 Professional Any help would be appreciated. Thanks!
I am testing to see how this can be done. Here is the client code:
Try { Server: In the console on server side: Current DSCP value: 10 My server code and client are on different machines. I I see I: Differential Services Areas: 0x00 (DSCP 0x00: Default; ECN: 0x00: NT-ECT (not ECN-worthy transport)) I expect to see a change in wirehark And I only see the default value of zero. The last time I worked with DSCP values in Java, due to a bug in JVM, In addition to this, you may have to call the socket socket = new socket (edit, 2345); Socket.setTrafficClass (10); PrintWriter = New PrintWriter (socket.getOutputStream (), true); Out.println ("Current DSCP Price:" + socket.getTrafficClass ()); Out.close (); Socket.close (); } Hold (exception e) {e.printStackTrace (); }}
try {serverSocket serverSocket = new ServerSocket (1234); Socket ClientSocket = serverSocket.accept (); BufferedReader = New in BufferedReader (New InputStreamReader (clientSocket.getInputStream ())); String fromClient = in.readLine (); Println (fromClient); in.close (); ClientSocket.close (); ServerSocket.close (); } Hold (exception e) {e.printStackTrace (); }}
java.net.preferIPv4Stack The system property had to be set to
true . OVERTHERWARE DSCP PRICES Javascript Despite working in the socket API, the built-in socket will not be set on.
setTrafficClass before adding the socket, it can not work after a connection on some platforms.
java -djava Net.preferIPv4Stack = true ...
Comments
Post a Comment