SocketConnection packets TCP 1 byte

I encounter strange behavior when using SocketConnection. I use JDE 4.6.0 and you encounter the problem on a "Bold" 4.6.0.185 OS as well as the OS 4.6.0.216.

When sending a string/bytes on a SocketConnection device sends each byte as a single TCP packet. Is this a bug in the OS or I do something wrong?

My code looks like this (Simplified):

  public void connect() {      sendThread = new SendThread();      sendThread.start();

      connectionThread = new ConnectionThread();      connectionThread.start();  }

  public void send( String data ) {    /* put data into sending queue */  }

  public class ConnectionThread extends Thread {      public void run() {          SocketConnection connection = (SocketConnection)Connector.open( "socket://" + host + ":" + port + ";deviceside=true;interface=wifi;ConnectionTimeout=1800000" ); 

      InputStream readerStream = connection.openInputStream();      OutputStream writerStream = connection.openOutputStream();

      // put some data into sending queue      send( " version='1.0'>" );

      while( true ) {        readerStream.read();      }    }  }

  public class SendThread extends Thread {      public void run() {            while( true ) {        for( /* sending queue */ ) {          _send( data );        }      }    }

    private void _send( String data ) {            byte [] encodedBuffer = null;          try {            encodedBuffer = xmpp.getBytes("UTF-8");          } catch( UnsupportedEncodingException e ) {            encodedBuffer = xmpp.getBytes();          }        }

        try {          writerStream.write( encodedBuffer );          writerStream.flush();        }        catch(IOException e)        {        }       }    }  } 

I don't change any SocketStream options. Access to the file sending is correctly synchronized. Reading in the ConnectionThread is more sophisticated and actually consume the data.

That's what I see on the network. Using another (Windows) client to connect to the server works properly, so this isn't a problem with the server.

root@Debian-40-etch-32-minimal: ~ #.

signature ngrep w - q r the 76.110.XX host. XX and port 5222
Interface: eth0 (85.10.193.64/255.255.255.224)
filter: (ip or ip6) and (76.110.XX the host. XX and port 5222)

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]
s

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]
t

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]
r

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]
e

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]
one

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]
m

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]
:

(...)

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]
.

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]
0

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]
'

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]
>

T 85.10.XX. XX:5222-> 76.110.XX. XX:55192 [AP]
http://EtheRx.Jabber.org/streams"xmlns =" jabber client: "from =" host.com"id ="59649 b 8"XML: lang ="en"version ="1.0">"

T 85.10.XX. XX:5222-> 76.110.XX. XX:55192 [AP]
arams:XML:ns:XMPP - tls ">arams:xml:ns:xmpp - sasl" >DIGEST-MD5PLAINANONYMOUSCRAM-MD5SHAREDSECRET JIVEhttp://jabber.org/features/compress "' >zlib <> xmlns ="http://jabber.org/features/iq-auth "/ >: features >

(actually two bytes * here seem to Miss! There should be"<' and="">

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]
q

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]
t

T 76.110.XX. XX:55192-> 85.10.XX. XX:5222 [AP]
There

OK, so I found the problem :-)

My code is actually oversimplified, and I left out an important part. I was not using OutputStream but instead to use a derived class, that I would spend the OutputStream of the connection.openOutputStream call.

The problem with my derived class was that she only substitute write (int data) and do not write (byte [] data).

What happens in this case, it's that the default implementation calls OutputStream.write (byte [] data) write (int data) for each single byte.

The fix was also replace write (byte [] data) and call the write method (byte [] data) of the original stream.

Tags: BlackBerry Developers

Similar Questions

  • TCP read bytes to read

    Hello! I have a small question on ports TCP read palett in labview, im trying to send 1 bit from a server to a client. This works when I put 4 digital in the bytes to read TCP entry read client-side. But when I change the value to 1, as it should be efficiant, this work dosent. Any ideas?

    Your number of bytes value is a number of I32 (32 bits, or 4 bytes), so you send 4 bytes followed by 1 byte for the boolean itself.   You can convert the number of bytes in an I8 to make a byte (but I wouldn't bother because the IP header information is the number of bytes, which means 1 to 4 bytes means little).

  • How to stop the series 'VISA read' the sends packets instead of bytes available.

    Dear Labvillians,

    Highlights:

    How can I stop series "VISA read" send me packages rather bytes?

    Background:

    I have a system which publishes series of 14 bytes on a semi-regular interval packets.

    At busy times, the producer of these these queues of data packets, effectively producing Super-paquets multiple of 14 times larger than 8 packages (112 bytes) bytes.

    My protocol handler is designed to process bytes, packets, or packets Super.

    Now, my request has multiple devices and the order of message processing is essential to the proper functioning.

    My observation is that read VISA waits until the end of a package / super package before moving the data to the application code. (See chart below)

    My expectation is that VISA read should give me bytes available, get too smart for itself and not wait for a package.

    .

    I noticed this on PXI, PC shipped, PSC and, more recently, cRIO

    I've experimented with Scan interface the cRIO rate, which helps to reduce the backlog of packages but don't decide to package under read byte.

    I understand that a solution is FPGA code write to handle and pass the bytes by R/T-FIFO, and there are some great examples on this site.

    Unfortunately, it does not help with FPGA devices not.

    I have also dabbled in the event based sequential reads, but he is evil on vxWorks devices.

    Any help is appreciated

    It is helpful to sometimes talk to yourself.

    I hope that is useful for someone sprinkle in the future

  • Switch Cisco Nexus 6004 removes more than 300 bytes IP packets

    Hi all

    We have a circuit of wave level 3 10 G running between two switches Cisco Nexus 6004. The circuit came online between our two data centers (in the same city) without problem.

    When attempting to ping to the remote-end 10G interface, it works very well with packets of 64 bytes. CDP is enabled and that we see the CDP information remote switch. However, if we increase the size of the ping to more than 300 bytes packets, we lose 1 in every 20.

    We settings MTU verifed, type of cable of 10G and duplex settings.

    Level 3A tested clean and we will move forward with more testing.

    Any ideas on the problem? We feel the carrier out and end to test with their testers. But so far, the circuit's own test. I was not sure if it is something related to Cisco. I am at a loss at the moment.

    Thank you.

    Mike

    Hi Mike,.

    There is nothing wrong with your switches or circuit.  NEXUS devices have a default COPP on the control plan that limit the size and the amount of traffic that must be the CPU process.

    http://www.Cisco.com/en/us/docs/switches/Datacenter/SW/6_x/NX-OS/security/configuration/guide/b_Cisco_Nexus_7000_NX-OS_Security_Configuration_Guide__Release_6.x_chapter_011001.html

    HTH

  • Difficulty in communicating through TCP BIS-B socket

    I have tries to establish a TCP via BIS - B connection and run into some problems.  Before describing the situation, I just want to clarify:

    -We are members of the BlackBerry Alliance program;
    -We have received permission to use BIS-B;
    -L'application now works under direct TCP. and
    -L' sample application supplied with the BIS-B information kit works well on the device.

    So, it seems that the camera has access BIS-B and that our application should be able to connect through BIS-B without difficulty.  Previously, I have forwarded this issue to the Alliance but has been achieved here for support, so I will briefly the question not to mention that all aspects of BIS - B covered under the NDA.

    Here's the situation:

    The connection string that I use to create a TCP socket in our program the device server is:
    Socket://IP_ADDRESS:TCP_SERVER_PORT; BIS_B_CONNECTION_STRING

    Where:
    Ip_address is the IP address of the server, the connection program is made for;
    TCP_SERVER_PORT is the TCP port; and
    BIS_B_CONNECTION_STRING is provided to access BIS-B connection string.

    As with direct TCP, the SocketConnection object is created:
    (SocketConnection) Connector.Open (connString, Connector.READ_WRITE);

    Where connString is the above connection string.  Once the connector is created, threads separate send and receive support are started.

    To connect to the server, a packet of 76 bytes of data is written to the socket with OutputStream.write (byte [] b, int off, int len) and rinse with OutputStream.flush ().  Data are received on the server without problem and a 32-byte ACK packet is sent to the server to the device subsequently.

    Here is where the problem appears: the client application on the device never receives the data sent from the server.  Even if the socket has been established and data can be sent on this socket of the device to the server, not a single byte sent from the server to the device is received by the device.  However, when you use TCP direct to establish awareness, data are transmitted between the server and the device without problem.

    This leads me to conclude that one or both of the following ways are produced:

    (1) I'm not creates the socket correctly for a BIS - B connection.

    The examples in the documentation for BIS - B are all for HTTP connections and no demo code is provided to show how a TCP socket should be created.  It is quite possible, there is a minor adjustment for the BIS-B connection string which I am unaware or I create the socket incorrectly.

    (2) my BlackBerry service provider incorrectly configured their BIS-B network connections.

    My device is connected to TELUS and the situation I am facing to sounds a bit like the one described by this man in 2008:

    http://supportforums.BlackBerry.com/T5/General-BlackBerry-smartphone/TELUS-confirmed-BlackBerry-bis-...

    Given that the problem occurs when the data is passed from the server to the device, it seems possible that the IP addresses of device are not properly being NATted on the public address that the server transmits data.  I called people of the TELUS DNA to confirm the BIS-B service is available, but (as the related post described), which does not necessarily eliminate the possibility of a misconfigured NAT.

    So my questions to you people are:

    -If a TCP server program receives data from a device via BIS - B, does indicate that the BIS - B has been correctly established (and so the problem of receiving data server-device is specific to the device or carrier)?

    -J' I am doing something obviously wrong when establishing a TCP via BIS - B socket?

    -Are there a required additional parameter in the connection string (beyond those provided by the HTTP BIS-B connection example) which creates a TCP via BIS - B socket?

    Cause of the problem proved to be the use of InputStream.available () to check the amount of bytes available to entrants on the socket.

    Although InputStream.available () worked well for direct TCP (at least for CDMA Networks), the method returns always 0 when it receives on BIS - B bytes.  As a result, it appeared that the side Server-device of the TCP socket was not receiving data when in fact, the data were available for playback.  With the help of InputStream.read () instead, block and read each byte it received on the socket has resolved the problem.  Given that the incompatible features, I would recommend avoiding the use of InputStream.available ().

    For all those looking at the creation of BIS-B TCP taken in the future, here an answer to my original question:

    The connection string to use to create a TCP socket BIS - B is the same as that shown in the code examples in the RIM for an HTTP connection (examples of code and your BIS - B connection string are received once approval has been given to use BIS-B under the program of the Alliance).

    For example, if your connection string to create a direct TCP socket would be:

    Socket://IP_ADDRESS:TCP_PORT; deviceside = true

    where ip_address is the IP address of your server TCP program and port_tcp is the network port on which traffic is received by the server, you need to replace only the "; deviceside = true' part of your connection string with the string supplied by RIM for your BIS - B connection.  The resulting string would then serve to create a standard TCP socket, such as the following:

    (SocketConnection) Connector.Open (connString, Connector.READ_WRITE);

    where connString is your ' socket: / /... ". ' connection string.

  • TCP / HTTP overhead

    I apologize if this isn't the right place to ask this question... I'm trying to understand overhead with tcp and HTTP response that I see in the capture of packages (wireshark) that I join you the topic.

    My understanding is:

    I can calculate the portion of TCP data by subtracting the ip/tcp headers of the total length field in the IP header. My confusion is when watching the payload data tcp and then seeing the overhead that is specified in the body of message/response HTTP header.  In my view, it has 1448 bytes which corresponds to the part of the packet tcp data.

    However, the HTTP response header is 347 bytes and the Content-Length entity 3867 bytes message body. I am trying to wrap my head on how to determine the correct load for this specific package. Normally, it's very simple, but it's the rsponse HTTP header which throws me off the power.

    Can someone break down and help me understand how I can have 1448 for TCP data but larger values for the HTTP part?

    Because the HTTP message is fragmented.

    You can see the somdwhere message back in the next Wireshark screen.

  • Treatment of packets

    When I read of a SocketChannel sometimes the ByteBuffers merges with those before or just after it. For example, I send 2 128 bytes, on the client side, it becomes just a 256 byte packet.

    I look in other implementations of server Ian and I know that tcp is not intended to sort my packets just the byte order, so this also happens for the ordinary Io servers. I thought that maybe I needed to make use of ByteBuffer.compact (), but how can I imitate who with arrays of bytes on my client side.

    This thread seemed to make the connection between my linkproblem, but there have only been a solution as to use delimiters or read lengths of packages but vary the lengths of my packages.

    The duration may vary, but the solution remains the same. Use delimiters without ambiguity or prefix of a word of length for each message.

    NB send you messages, not packages. Sends IP packets and TCP sends segments. At the end of the back all you can get is bytes. Message limits and packages and segments are lost. TCP is a byte stream protocol. It doesn't matter which API you use at each end. Your entry at the end of the reception is just a stream of bytes.

  • Series Packet Question: How to calculate CRC

    Hi all, I have tryied to find an answer on how to calculate the CRC on a RS232 packet received, its really driving me crazy!

    im a beginner, learned how to use labview read on different forums, and I had managed to build really good applications, but im stuck in this, hope someone can help me...

    OK, so im constantly receive packets of 15 bytes:

    A5 09 0C 00 61 05 1F A0 10 00 05 00 04 05 3F

    A5 09 0C 00 61 05 10 00 05 0C 2F 03 A0 1F-3F

    A5 09 0C 00 61 05 10 09 05 09 04 09 A0 1F-3F

    the supplier for material gave me the following code to calculate the CRC:

    Control CRC program:

    #define unsigned char uchar
    UCHAR CRC_Bitwise8 (uchar * buf, uchar size)
    {
    UCHAR i, j, b;
    UCHAR crc = 0;
    for (j = 0; j<>
    {
    b = * buf ++;
    for (i = 0; i<>
    {
    If (((CRC^b) & 0x01)! = 0)
    CRC ^ = 0x18;
    CRC > = 1;
    b >> = 1 ;
    }
    }
    return crc;
    }

    so my question is, how can we insert this code in labview? any example?

    Thanks in advance, this forum has really helped me learn labview in a practical way.

    You can use my code for the thread that I've referenced.  To play with a web version of my code go here. My code is based on the code on this Web site.

    My code to the following parameters:

    Calculation of the CRC: Other (specify)

    Order of the CRC: 8

    Polynomial CRC: 0 x 30

    CRC initial value: 0

    CRC XOR final value: 0

    Reflect the preprocessing of data: TRUE

    Match the data before Final XOR: TRUE

    In your messages, the A5 09 0c is certainly a header.  I think that the 00 following is also part of the header, but without the manual, I can't confirm.  00 will not affect the calculation of the CRC, in order to get the same results with it and without it.  So, in your first example, I use 61 05 3F 1E A0 00 05 00 04 10 and the result is 0x05.

  • Incoming packets were discarded on Dell 6248 switch

    Hello guys,.

    I'm having a problem on my network. From time to time the icmp echo packets are lost and this causes our monitoring system trigger false alarms.

    I checked interfaces for switches and found the discarded packet counter is incremented in one of them.

    Flow control is enabled on the interface and there is no frame break sent.

    The duplex on both ends are correct are the port speeds.
    The firmware of the switch is 3.3.9.1 and the model is a PowerConnect 6248 switch.

    view statistics ethernet 1/g48

    Total packets received (bytes)... 2019770477
    Packets received 64 bytes... 945800
    Packets received from 65 to 127 bytes. 1105872
    Packets received from 128 to 255 bytes... 152970
    Packets received 256-511 bytes... 445738
    Packets received 512-1023 bytes... 155436
    Packets received 1024-1518 bytes... 414040
    Packets received > 1518 bytes... 634118
    64 bytes of RX and TX packets... 946019
    RX and TX 65-127 bytes packet... 3294655
    Packet RX and TX 128 to 255 bytes... 235082
    RX and TX 256-511 byte packets... 893732
    RX and TX 512-1023 byte packets... 311408
    RX and TX 1024-1518 byte packets... 436671
    RX and TX 1519-2047 bytes packets... 873826
    RX and TX 2048-4095 bytes packets... 0
    RX and TX-9216 4096 bytes packets... 0

    Total packets received without errors... 3853974
    Unicast packets received... 3421088
    Received multicast packets... 211575
    Received broadcast packets... 221311
    -Other - or ITU (q)
    Receive packets ignored... 506

    Total packets received with errors of MAC... 0
    Jabbers received... 0
    Fragments / sousdimensionnés has received... 0
    Alignment defects... 0
    FCS Errors..................................... 0
    Overruns....................................... 0
    802. 3 x Pause frames received... 0
    Unacceptable frame type... 0

    Total of transmitted packets (bytes)... 858789293
    64 byte packets transmitted... 219
    65-127 bytes transmitted packets... 2188783
    Packets transmitted 128 to 255 bytes... 82112
    256-511 bytes transmitted packets... 447994
    512-1023 bytes transmitted packets... 155972
    1024-1518 bytes transmitted packets... 22631
    Transmitted packets > 1518 bytes... 239708
    Size of the image of max... 1518

    Total packets transmitted successfully... 3137419
    Transmitted unicast packets... 3034928
    -Other - or ITU (q)
    Multicast packets transmitted. 1628
    Broadcast packets transmitted. 100863
    Transmit packets ignored... 0

    Total transmit packets ignored... 0
    Single Collision frames... 0
    Several images of Collision... 0
    Excessive Collision management... 0

    802. 3 x Pause frames transmitted... 0
    GVRP PDU received... 0
    GVRP PDUs of transmitted... 0
    GVRP failure records... 0
    BPDU: 0 sent, received 0

    EAPOL frames transmitted... 0
    EAPOL Start received frames... 0

    Thanks in advance.

    Humm,

    We have changed our duo of remote of a failure wan link and the interface mistakes of count stop. Everything is the same: traffic, applications, etc. Not a clue about what happened because there is a Linux between the equipment of the carrier and the switch (bad packets would have fallen in the interface of linux machine).

    We turn now to the carrier of the explanations/solutions.

    Thank you for your time!

  • TCP resets

    Hi all

    I would like to get your comments on TCP resets sent from IPS running inline.  If the sensor is configured to deny the striker, refuse the connection or even refuse to package, is there a reason to send a TCP reset?  It seems to me that send a just reset confirms a valid IP address to the attacker.

    I can see the reason to reset if the IPS is running in "Promiscuous" mode, as you would like the host to severe inside the connection, but I do not see the advantage to send it when the IPS is already denied the connection in one form or another.

    Thoughts?

    Thank you

    Jeff S.

    The document says:

    Excerpt from http://www.cisco.com/en/US/docs/security/ips/5.1/configuration/guide/cli/cliEvAct.html

    Inline package deny action is represented as an action of package ignored in the alert. When a package inline deny occurs for a TCP connection, it is automatically upgraded to an inline action to refuse the connection and considered a refusal flow in the alert. If IPS denies a single packet, TCP continues to try to send this packet even again and again, so IPS denies any connection to ensure forever, he succeeds with sends it again.

    In the case of a connection line refuse, the IPS automatically sends a one-way TCP reset, which appears as a unidirectional reset TCP sent in the alert. When the SPI refuses the connection, it leaves an open connection on the client (usually the attacker) and the server (usually the victim). Too many open connections can lead to problems of resources on the victim. So the IPS sends a TCP delivered the victim to close the connection on the side of victim (usually the server), who keeps the resources of the victim. It also prevents a switch which would also connect to switch to a different network path and reach the victim. The IPS leaves the side attacking and rejects all traffic of it.

    Deny connection line and deny attacking pair victim line seems to have the same effect in the end, except that "Deny the perpetrator victim pair Inline" has an entry in the big "Deny".

    I hope that answers your query

  • Random Tunnel IPSec Packet drops

    Hi experts,

    I am trying to solve a problem of fall of random package for tunneling IPSec between two VTI. For more than a month, we could not see not any question, and from today, we have 30% through a tunnel packet loss IPSec.

    After analysis, I have concluded that packet loss is located somewhere on the way to the uc520 to the 2921. Package account see the correctly on the output interface physics uc520, but the number of packets is low on the interface of penetration on the 2921.

    Pings outside of the tunnel by the way are very good.

    I also deleted the tunnels on both ends and after they have recovery, the question was always present.

    Pointers on research where packets get lost?

    RR-hq-2921 #ping 10.1.13.1 g0/1 source rep 100

    Type to abort escape sequence.

    Send 100, echoes ICMP 100 bytes to 10.1.13.1, wait time is 2 seconds:

    Packet sent with a source address of 10.1.1.1

    !!..!.!!!!!!!!!..!!!!!!!!!!!!!!.!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!

    ..!!.!!!!!!!!!!!.!!!!!!!!.!!!!

    Topology:

    [uc520] == HAVE == {{{cloud}}} == MODEM == [2921]

    Test:

    Claire 2921 # counters g0/0

    Disable "show interface" counters on this interface [confirm]

    % CLEAR-5-COUNTERS: claire counter on interface GigabitEthernet0/0

    Execute on uc520: ping source timeout 0 rep 4000

    This is supposed to increase rapidly the number of packets at a distance of 4000 packages, as it has done on the output uc520 interface

    # 2921 sho int g0/0 | I entered the packages

    3348 packets input, 607812 bytes, 0 no buffer< missing="" ~650="">

    # 2921 sho int g0/0

    GigabitEthernet0/0 is up, line protocol is up

    Material is CN Gigabit Ethernet, the address is XXXXXXXX

    Description: Outdoors - WAN port

    The Internet address is XXX.XXX.XXX.XXX/YY

    MTU 1500 bytes, BW 35000 Kbit/s, 10 DLY usec,

    reliability 255/255, txload 1/255, rxload 1/255

    Encapsulation ARPA, loopback not set

    KeepAlive set (10 sec)

    Full-Duplex, 1 Gbps, media type is RJ45

    control output stream is XON, control of input stream is XON

    Type of the ARP: ARPA, ARP Timeout 04:00

    Last entry of 00:00:00, 00:00:00 exit, exit hang never

    Final cleaning of the counters 'show interface' 00:00:42

    Input queue: 0/75/0/0 (size/max/drops/dumps); Total output drops: 0

    Strategy of queues: fifo

    Output queue: 0/40 (size/max)

    30 second entry rate 75000 bps, 51 packets/s

    exit rate of 30 seconds 77000 bps, 52 packets/s

    3456 packets input, 619794 bytes, 0 no buffer

    Received 0 emissions (0 of IP multicasts)

    0 Runts, 0 giants, 0 shifters

    entry 0, 0 CRC errors, frame 0, saturation 0, 0 ignored

    Watchdog 0, multicast 0, break 0 comments

    3454 packets output, 632194 bytes, 0 underruns

    0 output errors, 0 collisions, 0 resets interface

    unknown protocol 0 drops

    0 babbles, collision end 0, 0 deferred

    carrier, 0 no carrier, lost 0 0 interrupt output

    output buffer, the output buffers 0 permuted 0 failures

    Good infor

    Now, did you ask your ISP if they made the last changes made?

    I think that your suspcious is correct and if the number of packets do not match, then probably something in the environment has changed, since it worked before with the same configuration and IOS versions.

    HTH.

  • PIX does not allow packets loarge

    I can ping with l - 992, but fail with-l 993.

    Ping 172.16.17.1 with 992 bytes of data:

    Reply from 172.16.17.1: bytes = 992 time = 1ms TTL = 254

    Reply from 172.16.17.1: bytes = 992 time = 1ms TTL = 254

    Reply from 172.16.17.1: bytes = 992 time = 1ms TTL = 254

    Reply from 172.16.17.1: bytes = 992 time = 1ms TTL = 254

    Ping statistics for 172.16.17.1:

    Packets: Sent = 4, received = 4, lost = 0 (0% loss),

    Time approximate round trip in milli-seconds:

    Minimum = 1ms, Maximum = 1ms, average = 1ms

    Ping 172.16.17.1 with 993 bytes of data:

    Request timed out.

    Request timed out.

    Request timed out.

    Request timed out.

    Ping statistics for 172.16.17.1:

    Packets: Sent = 4, received = 0, lost = 4 (100% loss),

    I also see that attached to the devices in the DMZ are taken excessively long time.

    The MTU size on all interfaces is always the default value of 1500.

    Hi Jimmysturn:

    Which is likely happened here is that you have ID political attack linked to your external interface with the action 'drop' or 'reset' all packages that match the signature in the category of the attack.

    Signature 2151 (large ICMP) will drop packets hit the PIX off interface or those who pass through the PIX outside interface when you ping with large packet size (+ 993 bytes):

    From your post, you must have had the following policy of IDS on your PIX:

    IP audit name attackpolicy attack action fall

    (or

    IP audit name attackpolicy action fall attack alarm

    or

    attack IP audit name attackpolicy raz action alarm

    or both)

    If you want to ping with big package, there are several things you can do:

    (1) remove the policy of "attackpolicy" completely from your external interface. It will turn off all of the IDS signatures in the category of the attack.

    Carefully look at this and see if it's what you want to do.

    To achieve the above, issue the following command:

    "no interface verification ip outside of attackpolicy"

    (2) turn off the signature 2151 by running the command:

    "disable signature verification ip 2151.

    That would disable only the big signing of ICMP attack while leaving the other signatures of attacks in the category of GIS attack ON.

    (3) set signature action to open a session (a syslog server or the internal buffer) large ICMP packets instead of dropping. Again, this should be determined carefully as option 1.

    To achieve the above goal, issue the following command:

    IP audit alarm action name attackpolicy attack

    It will be useful.

    Please indicate the position accordingly if you find it useful.

    Sincerely,

    Binh

  • How to debug the image won't load does not intermittently exclusively on Firefox?

    The image (GIF67) is to be generated and sent through binary stream from the server (using the secure connection), Explorer and Chrome still display the image, Firefox intermittently fails to load without separate ground of success-failure.

    I checked that it is a matter of Firefox, by analyzing the tcp packets and confirmed that the response from the server still the same bytes either on the success that the scenario of the failure of level.

    How could configure Firefox to log the process of rendering the requested image?

    Action taken:

    -Tested with versions of Firefox from 10 to 28, fails
    -Tested with Chrome and IE, image still renders correctly
    -Follow-up:
    https://support.Mozilla.org/en-us/KB/Firefox-cant-load-websites-other-browsers-can?ESAB=a & As = AAQ
    https://support.Mozilla.org/en-us/KB/fix-problems-images-not-show?ESAB=a & As = AAQ
    -Updated the Chrome and IE require headers to imitate demand of Firefox, image renders correctly
    -Updated the headers to mimic Firefox asks chrome, fails
    -Packet tcp analyzed, answer is the same for failure and success restore
    -Reconstruct the image correctly retrieving the tcp packets of the application for a successful rendering, as well as for a bad record.

    Sometimes, it is possible to make 50 applications and see the image correctly, some other times you could do 50 applications and not see the image displayed, but above all it is possible to load the image 20 times and have 1 fail.

    Thanks in advance!

    The mime type was wrong: "Image/png".

    I currently have shame because it was the second thing to check on my list and in some way I missed it.

    I faked a stressed server by creating a Web Service to send the image via streaming and the thread to sleep after the rinse a small amount of data, I was able to reproduce the problem (Chrome and explore renders fine image and fails in Firefox) and I could also see fixed it by setting the right mimetype (don't you?).

    This surely isn't a bug, but I find it interesting that Chrome and Explorer are both able to accept that the data and show the Gif so that Firefox gives up on the stream if it takes a few milliseconds after receiving a package and mimic the gif type is not correctly set.

    I thank very you much for the people who have helped me through.

    PD: Anyone knows the real reason for Firefox to get this behavior differently than Chrome/Explorer at the level of the stream/encoder?

  • Telenet service should run in order to connect via telnet?

    I'm a developer.

    In my Windows XP Pro SP3 I service windows (in services.msc) TlnSrv (full name: Telnet) Description:

    • Allows a remote user to connect to this computer and run programs and supports various TCP/IP Telnet clients, including UNIX and Windows-based computers. If this service is stopped, remote user access to programs may be unavailable. If this service is disabled, any services that explicitly depend on will initially fail *.

    Also, I read various articles that telnet service is required on the host to be telnet-ted.

    In his comments to my answer to the question "connect SQL Server 2008", the "militants" serverfault.com squillman and MarkM wrote several times:

    • "Telnet on a host does not require a telnet service on the remote host. This requires an open socket, that's all. "

    After that, I was banned by serverfault.com in 2 min without warning or notification

    Well, I've never used before telnet. Now I see that the telnet service is stopped on my Windows XP, but opening cmd and enter 'telnet localhost 1433' open 'telnet localhost' window, i.e. telnet session (?), without any error with my MS SQL Server local default instance.

    Telnet-ing require the telnet service to run on the remote Windows host or not?
    What is the telnet service for?

    Telnet is now obsolete, but Microsoft is to keep shipping with Windows for some reason. Nobody knows why?

    Function of Telnet in the era pre-IPv4 Pre-internet, was to connect your modem through a limited number of ports available (1023) on the server side. Is that a connectivity based on characters is one of the oldest protocols package-transfer, with packet as a byte. Telnet is mainly used to make the connection, and then a large part of the transmission of data would take by transfer of UDP packets. If Telnet would allow quick "handshake" or equivalent authentication on the server. We are talking about the end of the 1960s - mid1970s lead-time. Since there was no viruses or Trojans at the time and most of the work done was by researchers across the Atlantic, it became easier to telnet first and then transfer UDP packets, because you know that the UDP that will reach the destination.

    In the early 1990s Telnet was preferred to how to hack computers, which basically confirmed the status "online". Thus, we could send viruses to macro-type via telnet. Still, firewalls have not yet discovered.

    You don't need Telnet Service to send and receive packets through port23. However you can send a datagram UDP on port 23, without need to Telnet, being UDP, confirmationless data transfer protocol sense... If it reached the sender does not know that this receiver has received. In Telnet, the sender knows what telnet transmission moved not, by the non receipt of confirmation.

    So, for purposes of security, disable the Telnet Service (most modern firewall prohibit connections port 23 by default)

  • Load Balancing does not not on 2911

    Hello people,

    I have some difficulty to operate the Load Balance on my 2911.

    I have followed the editing on this site:

    http://www.Cisco.com/en/us/Tech/tk648/tk361/technologies_configuration_example09186a0080950834.shtml

    and APARENTLY it works, but not in reality, because I see packets using a NAT IPS bot thru, but when I check on the interfaces I see we're not receive / send anything.

    Background:

    G0/0, I have one ISP, other 1/G0, G0/2 my network.

    Building configuration...

    Current configuration: 6045 bytes

    !

    ! Last configuration change to 15:47:49 UTC Tuesday, January 28, 2014 by alan

    ! NVRAM config update at 14:32:59 UTC Tuesday, January 28, 2014 by alan

    ! NVRAM config update at 14:32:59 UTC Tuesday, January 28, 2014 by alan

    version 15.1

    horodateurs service debug datetime msec

    Log service timestamps datetime msec

    encryption password service

    !

    ROUTER1 hostname

    !

    boot-start-marker

    boot-end-marker

    !

    !

    logging buffered 51200 warnings

    !

    No aaa new-model

    !

    !

    No ipv6 cef

    IP source-route

    IP cef

    !

    !

    !

    !

    dhcp LAN_DHCP_POOL IP pool

    network 192.168.0.0 255.255.0.0

    default router 192.168.2.2

    domain g_bacon

    DNS 8.8.8.8 Server 208.67.222.222

    0 8 rental

    !

    !

    no ip domain search

    IP host ROUTER1 192.168.2.2

    8.8.8.8 IP name-server

    name-server IP 208.67.222.222

    IP-server names 8.8.4.4

    IP-server names 208.67.220.220

    !

    Authenticated MultiLink bundle-name Panel

    !

    !

    Crypto pki token removal timeout default 0

    !

    Crypto pki trustpoint TP-self-signed-2101532551

    enrollment selfsigned

    name of the object cn = IOS - Self - signed - certificate - 2101532551

    revocation checking no

    rsakeypair TP-self-signed-2101532551

    !

    !

    TP-self-signed-2101532551 crypto pki certificate chain

    certificate self-signed 01

    3082022B 30820194 02020101 300 D 0609 2A 864886 F70D0101 05050030 A0030201

    2 060355 04031326 494F532D 53656 C 66 2 AND 536967 6E65642D 43657274 31312F30

    69666963 32313031 35333235 6174652D 3531301E 32313137 OF 31323239 170 3131

    31335A 17 0D 323030 31303130 30303030 305A 3031 06035504 03132649 312F302D

    4F532D53 5369676E 656C662D 43 65727469 66696361 74652 32 31303135 65642D

    33323535 3130819F 300 D 0609 2A 864886 01050003, 818, 0030, 81890281 F70D0101

    8100DEA3 06574FDF B2B2113F 84A1EF39 9969F4D9 04131994 A3FCC466 D0328CCF

    B219F1AE A3DCC204 CD993BB2 F59C9A7F C251024E 382162 5 D9277CEB F1A575A5

    0356 C 896 A7A1BB48 8EA4CFF6 DA77B72C 9904A73B 6731A6E0 3004E5EA B44C1F7F

    5667496C 1E8E603D BE9B1AA1 1065E449 F6110C17 1A5FE3B9 3593BF87 96E14DEC

    010001A 3 53305130 1 130101 FF040530 030101FF 301F0603 0F060355 87FF0203

    551 2304 18301680 14E5F8C8 C30593C3 CEAB1874 F94F070B 9674F152 AD301D06

    03551D0E 04160414 E5F8C8C3 0593C3CE AB1874F9 4F070B96 74F152AD 300 D 0609

    2A 864886 F70D0101 A 05050003 81810092 51314, 50 EA812CDA AC97A8D1 2CA06BCC

    6FD5B4A6 DA888322 E2166AB4 0CF340BB E0407C95 584A1BDF 5DC3A6EE 2862E9CF

    7BF0C831 54F06ABF 011664 D 3 75269FF3 02D434BD 0FD15F32 EB34730C 47FE29D9

    7C2BBF9D 5BDB1D4F EEBFBED5 9B07450E 83DA57B2 1F296D0A 52D39A8F 6A 679244

    05C0924C F3FA9A05 53198E BDB28409

    quit smoking

    license udi pid CISCO2911/K9 sn FTX1553AJQU

    !

    !

    username privilege 15 secret 5 alan $1$ b6Jk$ 8iz3K3cTUgSZ.VePkKl5a.

    !

    redundancy

    !

    !

    !

    !

    !

    class-map correspondence-any PROHIBIDAS

    Protocol httpwww.facebook.comhost game «»

    Protocol httpwww.youtube.comhost game «»

    match Protocol http host 'www.pornotube.com.

    Protocol http host «www.xvideos.com» game

    match Protocol http host 'www.mega.co.nz'.

    match Protocol http host 'www.radios-on-line.com.ar'.

    match Protocol http host 'www.enlaradio.com.ar'.

    Protocol http host «www.cienradios.com.ar» game

    match Protocol http host 'www.radios-argentina.com.ar'.

    match Protocol http host 'www.fmyam.com.ar'.

    Protocol http host «www.piratebay.org» game

    class-map match-all P2P

    winmx Protocol game

    gnutella Protocol game

    bittorrent Protocol game

    match Protocol kazaa2

    !

    !

    Policy-map DROP_PROHIBIDAS

    class PROHIBIDAS

    drop

    class P2P

    drop

    !

    !

    !

    !

    !

    !

    !

    !

    the Embedded-Service-Engine0/0 interface

    no ip address

    Shutdown

    !

    interface GigabitEthernet0/0

    Fibertel description

    DHCP IP address

    IP access-group acl101 in

    IP access-group out acl101

    NAT outside IP

    IP virtual-reassembly in

    automatic duplex

    automatic speed

    No cdp enable

    out of service-policy DROP_PROHIBIDAS

    !

    interface GigabitEthernet0/1

    Arnet description

    IP 186.153.125.138 255.255.255.248

    IP access-group acl101 in

    IP access-group out acl101

    NAT outside IP

    IP virtual-reassembly in

    automatic duplex

    automatic speed

    No cdp enable

    out of service-policy DROP_PROHIBIDAS

    !

    interface GigabitEthernet0/2

    IP 192.168.2.2 255.255.0.0

    IP access-group block_FB in

    IP access-group out acl101

    IP nat inside

    IP virtual-reassembly in

    IP tcp adjust-mss 1452

    automatic duplex

    automatic speed

    No cdp enable

    !

    router RIP

    version 2

    network 192.168.0.0

    !

    IP forward-Protocol ND

    !

    IP http server

    IP 8180 http port

    20 class IP http access

    IP http secure server

    IP http timeout policy slowed down 60 life 86400 request 10000

    !

    IP nat inside source map route address interface GigabitEthernet0/1 overload

    IP nat inside source map route fibertel interface GigabitEthernet0/0 overload

    IP route 0.0.0.0 0.0.0.0 track GigabitEthernet0/0 123

    IP route 0.0.0.0 0.0.0.0 200.122.102.1 254

    !

    block_FB extended IP access list

    deny ip 192.168.0.0 0.0.255.255 welcome 173.252.100.16

    deny ip 192.168.0.0 0.0.255.255 173.252.64.0 0.0.63.255

    deny ip 192.168.0.0 0.0.255.255 31.13.24.0 0.0.7.255

    deny ip 192.168.0.0 0.0.255.255 31.13.64.0 0.0.63.255

    deny ip 192.168.0.0 0.0.255.255 66.220.144.0 0.0.15.255

    deny ip 192.168.0.0 0.0.255.255 69.63.176.0 0.0.15.255

    deny ip 192.168.0.0 0.0.255.255 69.171.224.0 0.0.31.255

    deny ip 192.168.0.0 0.0.255.255 74.119.76.0 0.0.3.255

    deny ip 192.168.0.0 0.0.255.255 103.4.96.0 0.0.3.255

    deny ip 192.168.0.0 0.0.255.255 204.15.20.0 0.0.3.255

    IP 192.168.0.0 allow 0.0.255.255 everything

    allow an ip

    !

    access-list 110 permit ip 192.168.0.0 0.0.255.255 everything

    !

    !

    !

    !

    route allowed fibertel 10 map

    corresponds to the IP 110

    is the interface GigabitEthernet0/0

    !

    arnet allowed 10 route map

    corresponds to the IP 110

    is the interface GigabitEthernet0/1

    !

    !

    !

    control plan

    !

    !

    exec banner ^ C ^ C

    connection of the banner ^ C ^ C

    Banner motd ^ C ^ C

    !

    Line con 0

    local connection

    line to 0

    line 2

    no activation-character

    No exec

    preferred no transport

    transport of entry all

    transport output pad rlogin lapb - your MOP v120 udptn ssh telnet

    StopBits 1

    line vty 0 4

    access-class 23 in

    privilege level 15

    local connection

    transport input telnet ssh

    line vty 5 15

    access-class 23 in

    privilege level 15

    local connection

    transport input telnet ssh

    !

    Scheduler allocate 20000 1000

    end

    So far so good, I have check the transactions of NAT:

    ROUTER1 #show ip nat trans

    Inside global internal local outside global local outdoor Pro

    TCP 200.122.102.74:62114 192.168.0.1:62114 17.151.239.110:443 17.151.239.110:443

    TCP 200.122.102.74:62119 192.168.0.1:62119 17.172.233.134:5223 17.172.233.134:5223

    TCP 200.122.102.74:34945 192.168.0.2:34945 181.30.241.103:443 181.30.241.103:443

    TCP 200.122.102.74:37444 192.168.0.2:37444 173.194.42.230:443 173.194.42.230:443

    TCP 200.122.102.74:37695 192.168.0.2:37695 181.30.241.109:80 181.30.241.109:80

    TCP 200.122.102.74:40662 192.168.0.2:40662 173.194.74.188:5228 173.194.74.188:5228

    TCP 186.153.125.138:41426 192.168.0.2:41426 216.115.101.179:443 216.115.101.179:443

    TCP 200.122.102.74:41484 192.168.0.2:41484 216.115.101.179:443 216.115.101.179:443

    TCP 200.122.102.74:42381 192.168.0.2:42381 181.30.241.31:80 181.30.241.31:80

    TCP 186.153.125.138:42553 192.168.0.2:42553 98.136.223.39:8996 98.136.223.39:8996

    and I see they're going through the two connections.

    Buuuuuuuuuuuuut, when I check the interfaces...

    ROUTER1 #show int g0/0

    GigabitEthernet0/0 is up, line protocol is up

    Material is CN Gigabit Ethernet, the address is c464.1354.b8c0 (BIA c464.1354.b8c0

    )

    Description: Fibertel

    The Internet address is 200.122.102.74/24

    MTU 1500 bytes, BW 100000 Kbit/s, DLY 100 usec,

    reliability 255/255, txload 1/255, rxload 1/255

    Encapsulation ARPA, loopback not set

    KeepAlive set (10 sec)

    Full-Duplex, 100 Mbps, media type is RJ45

    control output stream is XON, control of input stream is XON

    Type of the ARP: ARPA, ARP Timeout 04:00

    Last entry of 00:00:00, 00:00:00 exit, exit hang never

    Final cleaning of "show interface" counters never

    Input queue: 0/75/0/0 (size/max/drops/dumps); Total output drops: 0

    Strategy of queues: fifo

    Output queue: 0/40 (size/max)

    5 minute input rate 774000 bps, 161 packets/s

    5 minute output rate 423000 bps, 102 packets/s

    2133521 package, 1223904205 bytes, 0 no buffer entry

    Received 615778 broadcasts (0 of IP multicasts)

    0 Runts, 0 giants, 0 shifters

    entry 0, 0 CRC errors, frame 0, saturation 0, 0 ignored

    Watchdog 0, multicast 0, break 0 comments

    1065308 packets output, 214203455 bytes, 0 underruns

    0 output errors, 0 collisions, 1 interface resets

    unknown protocol 0 drops

    0 babbles, collision end 0, 0 deferred

    1 lost carrier, 0 no carrier, interrupt the output of 0

    output buffer, the output buffers 0 permuted 0 failures

    ROUTER1 #show int g0/1

    GigabitEthernet0/1 is up, line protocol is up

    Material is CN Gigabit Ethernet, the address is c464.1354.b8c1 (BIA c464.1354.b8c1

    )

    Description: arnet

    The Internet address is 186.153.125.138/29

    MTU 1500 bytes, BW 100000 Kbit/s, DLY 100 usec,

    reliability 255/255, txload 1/255, rxload 1/255

    Encapsulation ARPA, loopback not set

    KeepAlive set (10 sec)

    Full-Duplex, 100 Mbps, media type is RJ45

    control output stream is XON, control of input stream is XON

    Type of the ARP: ARPA, ARP Timeout 04:00

    Last entry 00:04:01, 00:00:06 exit, exit hang never

    Final cleaning of "show interface" counters never

    Input queue: 0/75/0/0 (size/max/drops/dumps); Total output drops: 0

    Strategy of queues: fifo

    Output queue: 0/40 (size/max)

    5 minute input rate 0 bps, 0 packets/s

    5 minute output rate 0 bps, 0 packets/s

    208948 packages, 153515983 bytes, 0 no buffer entry

    Received 1236 broadcasts (0 of IP multicasts)

    0 Runts, 0 giants, 0 shifters

    entry 0, 0 CRC errors, frame 0, saturation 0, 0 ignored

    Watchdog 0, multicast 0, break 0 comments

    190283 packets output, 45657373 bytes, 0 underruns

    0 output errors, 0 collisions, 0 resets interface

    unknown protocol 0 drops

    0 babbles, collision end 0, 0 deferred

    carrier, 0 no carrier, lost 0 0 interrupt output

    output buffer, the output buffers 0 permuted 0 failures

    Everything happens through G0/0 and nothing in G0/1!

    Any ideas on why this is happening?

    Thank you in advance for your help!

    Kind regards

    Alan

    Hello

    Yes here you only have a single default route installed (one from the DHCP server) so it can't NAT on the other interface as it can route on this one.

    Change your configuration like this:

    no ip route 0.0.0.0 0.0.0.0 track GigabitEthernet0/0 123

    no ip route 0.0.0.0 0.0.0.0 200.122.102.1 254

    IP route 0.0.0.0 0.0.0.0 dhcp

    IP route 0.0.0.0 0.0.0.0 200.122.102.1 254

    Now if you want to follow the first route look at this document:

    http://www.Cisco.com/en/us/docs/iOS/dial/configuration/guide/dia_rel_stc_rtg_bckup.html#wp1065528

    Concerning

    Alain

    Remember messages useful rate.

Maybe you are looking for