Browsing articles tagged with "tcp - Admins Goodies"
Jul 7, 2013
tom

Why do some connections time out and others get refused?

I have noticed that sometimes while trying to telnet in some random port, I have observed two kind of scenarios: $ telnet example.com 3432 Trying 173.252.110.27…$ telnet example.com 3432 Connection Refused. Can someone explain me what is the difference between the two ? Asked by pradeepchhetri One reason would be the behavior of a firewall on example.com. In the event the firewall simply drops the traffic, you will see the first response. On the other […]

Continue Reading »
Dec 12, 2012
tom

Proxy with netcat forever

I am proxying a VNC TCP server port with netcat. The proxy machine runs linux. This is the comand I use: mkfifo backpipe nc -l 5902 0<backpipe | nc 10.1.1.116 5902 1>backpipe 10.1.1.116 is the “remote” machine with the original VNC service running on port 5902. After this command VNC service is available on localhost for other machines. But after each VNC session the netcat “proxy server” stops, which is how netcat works. How can […]

Continue Reading »
Nov 5, 2012
tom

Difference between tcp recv buffer and tcp receive window size?

The command shows the tcp receive buffer size in bytes. $ cat /proc/sys/net/ipv4/tcp_rmem 4096 87380 4001344 where the three values signifies the min, default and max values respectively. Then I tried to find the tcp window size using tcpdump command. $ sudo tcpdump -n -i eth0 ‘tcp[tcpflags] & (tcp-syn|tcp-ack) == tcp-syn and port 80 and host google.com’ tcpdump: verbose output suppressed, use -v or -vv for full protocol decode listening on eth0, link-type EN10MB (Ethernet), […]

Continue Reading »
Nov 4, 2012
tom

Why do some machines respond with many RST packets instead of RST-ACK to refuse a connection?

I have recently been trying to track down a problem with one of our systems and have noticed that it is simply not allowed to connect to a remote machine. However, the remote machine (not controlled by us) is responding to our request for a connection with many TCP RST packets on a different port (26469, 26497, 26498) than the one we originated on (53). It simply wouldn’t let up at one point and flooded […]

Continue Reading »
Oct 19, 2012
tom

Is TCP/IP encapsulation MSB or LSB?

Application data sent over TCP experiences multiple encapsulations: The application data is encapsulated within one or many TCP fragments The TCP fragment is encapsulated within one or many IP datagrams The IP datagram is encapsulated within an Ethernet frame It turns out Ethernet frames are sent most-significant byte first, and within each byte, most-significant bit first. What about the multiple encapsulations? Are they performed MSB first or LSB first? Asked by Justin First, one correction: […]

Continue Reading »
Oct 18, 2012
tom

How does a server deal with missing TCP segments?

I’m interested specifically in implementations of the FIX protocol over TCP, but I’m happy to discuss the problem in more generality. Suppose that a client sends TCP segments to a server, and some of the IP packets involved get lost. Then for the TCP segments that did not arrive fully, the client will not receive an ACK. Now normally this is a cue for the client to retransmit the TCP segments, after the timeout period […]

Continue Reading »
Oct 6, 2012
tom

How to turn one server into many servers? (Virtualization/VMWare)

I’m hoping for a high level discussion of this problem I know is quickly approaching my application. I have a server that binds on a specific port and manages TCP Sockets from my clients. I know that it is common practice to use VMWare to virtualize servers and run multiple servers at once. How can a single server design be changed to support multiple servers? Multiple servers can’t bind to the same port. If I […]

Continue Reading »
Sep 25, 2012
tom

Mountain Lion, How can I release port?

$ netstat -ltanp tcp | grep 8000 | grep LISTEN tcp4 0 0 *.8000 *.* LISTEN I want to release this port When I do $ lsof -i:8000 I get nothing I even restarted the machine, nothing helps Please let me know how can I release this port Thank you Asked by learner Moving my comment to an answer: Did you run these commands with root privileges? Both the -p option to netstat and the […]

Continue Reading »
Sep 22, 2012
tom

iptables tcp proxy rules not working

I have several servers that need to connect to a remote service. These servers are ec2 instances under my control. The remote service is run on a server managed by my company, but not my department, and I’m not sure where it is hosted. For security reasons, the remote service will only allow a single IP address (it’s an AWS elastic IP) on a specific port to access the service, so all the requests will […]

Continue Reading »
Sep 19, 2012
tom

Why am I seeing dropped packets in the NIC stats on my Ubuntu server?

I see dropped packets using ifconfig on my eth0 interface: eth0 Link encap:Ethernet HWaddr 00:15:17:0d:03:ca inet addr:10.0.1.2 Bcast:10.0.1.255 Mask:255.255.255.0 UP BROADCAST RUNNING MULTICAST MTU:9000 Metric:1 RX packets:30268348 errors:0 dropped:70721 overruns:0 frame:0 TX packets:133076885 errors:0 dropped:0 overruns:0 carrier:0 collisions:0 txqueuelen:1000 RX bytes:8699434077 (8.6 GB) TX bytes:194937313025 (194.9 GB) Interrupt:16 Memory:feae0000-feb00000 When i use ethtool -S i dont see anything wrong: NIC statistics: rx_packets: 30267138 tx_packets: 133074510 rx_bytes: 8699356158 tx_bytes: 194934147340 rx_broadcast: 35296 tx_broadcast: 5435 rx_multicast: 0 […]

Continue Reading »
Pages:1234567...20»