networking

Why does NFS use UDP by default?

I'm sure there's some ancient legacy reason for it, but what is it? It seems like a service that's geared towards reliable data delivery. ...

Can't access Windows 2008 NLB cluster from internet

I have two dedicated servers with Limestone Networks, each with two network cards. One of them is connected to the Internet and gives me access to 5 public IPs per server. The second card is connected to their private network (they call it "Private Tunnel") which allows me to connect to the servers without wasting my bandwidth. I could ...

How to detect when a Protocol Buffer message is fully received?

This is kind of a branch off of my other question. Read it if you like, but it's not necessary. Basically, I realized that in order to effectively use C#'s BeginReceive() on large messages, I need to either (a) read the packet length first, then read exactly that many bytes or (b) use an end-of-packet delimiter. My question is, are eith...

What is the difference between a port and a protocol?

What is the difference between a port and a protocol? ...

Asynchronous IO in Java?

What options for async io (socket-based) are there in java other then java.nio? Also does java.nio use threads in the backround (as I think .NET's async-socket-library does, maybe it's been changed) or is it "true" async io using a proper select call? ...

How to bring down a socket on a windows machine?

I have a application which I suspects to get into problems because network nodes closes its sockets to various other servers it communicates to. I would like to mimic that behaviour by shutting down one or severel connections that can be seen in netstat. I'm not an expert in networking on OS level, so this question may be stupid, if so d...

games using phone line

I remember years ago my friend and i were playing command and conquer red alert and there was a mode were we put the others phone number and the game would dial up and connect. What was this called? and where can i find resource to program for this? ...

What is the upper limit on the number of open sockets i can have in win2003 server

Hi. i'm building a chat server with .net i need to know is there a limit on the number of open sockets i can have on windows 2003 server box Also, i tried opening about 2000 client connections and my linksys WRT54GL router (with tomato firmware) drops dead each time. The same thing happens when i have several connections open on my Azur...

Python - query network interface setting

Hi, My dream is to query the network card setting on WIN using python. What I need is to query if the NIC is set to full duplex and if it is set to 1000Mb full. WMI class named Win32_NetworkAdapterConfiguration doesn't provide these info.Alternatively a cmd command line sulution can be insteresting as well (via calling from python). Th...

Why have DHCP and static IP address at the same time?

At my current place of employment, on my Windows box, when I do an ipconfig /all from my command prompt I see that I have both a static IP address as well as a dynamic IP address. Why could that be? I am trying to diagram our network structure for a new software project that I'm on...knowing the answer to this question could help out a l...

How to get amount of non-ACK-ed TCP data for the socket?

Linux has ioctl SIOCOUTQ described in man-page tcp(7) that returns amount of unsent data in socket buffers. If I understand kernel code right, all the non-ACKed data is counted as "unsent". The ioctl is available at least since 2.4.x. Is there anything alike for {Free,Net,Open,*}BSD, Solaris, Windows? ...

NetXtreme II (BCM 5708) UDP Packets Per Second?

Does anyone else have any benchmarks on how many packets per second this NIC can receive without dropping any UDP traffic? Using 64 byte UDP packets, I'm seeing roughly 100k packets/sec until drops. ...

Python: Getting an IPv6 socket to receive packets destined for the Subnet-Routers Anycast address

How do you get a socket to receive packets destined for the IPv6 Subnet-Routers Anycast address? I haven't been able to find any informationn on how to do this. In a fit of desparation, I've tried using socket.setsockopt as you would to join a multicast group: # 7 is the interface number s = socket(AF_INET6, SOCK_DGRAM) packed_iface_...

How to synchronize media playback over an unreliable network?

I wish I could play music or video on one computer, and have a second computer playing the same media, synchronized. As in, I can hear both computers' speakers at the same time, and it doesn't sound funny. I want to do this over Wi-Fi, which is slightly unreliable. Algorithmically, what's the best approach to this problem? EDIT 1 Wh...

TextReader.ReadLine returns incomplete lines

I am using a Socket to receive data via TCP, and TextReader.ReadLine to read lines from the connection. There is a problem where a full line has not been received -- TextReader.ReadLine returns an incomplete string. I want it to return null, indicating that a full line could not be read. How can I do this? Basically, I have this data...

Can libpcap reassemble TCP segments

I need to sniff TCP traffic into my application. Can libpcap reassemble TCP segments or I have to do it manually? The home page says "Full documentation is provided with the source packages in man page format". After I sudo apt-get install libpcap-dev I only find one man pcap. Is it all the documentation available or I simply missed so...

From programmer to Sys Admin

Hey! I am web programmer and I deal with html, css, javascript, php and asp.net. Is there some good books/sites that I can use to become also a bit of a sys admin? And by sys admin I mean to have knowledge of TCP/IP, Linux/Win Networks etc. Please don't say "google is your friend" I know it is but I just want either good sites or book...

Is broadcasting faster than a random SYN/ACK scan for a particular port?

The project I'm working on uses P2P to transfer data between peers much unlike Bittorrent. This component does a random scan on each interface to see what devices are on the network. So far it has been implemented as a Socket connection which checks whether it has succeeded in connecting by trying to connect to the program's listening po...

How to get IP addresss of boost::asio::ip::tcp::socket?

Hello, I'm writing a server in C++ using Boost ASIO library. I'd like to get the string representation of client IP to be shown in my server's logs. Does anyone know how to do it? ...

How to tell which interface the socket received the message from?

If a socket is bound to IN6ADDR_ANY or INADDR_ANY and you use a call such as recvfrom() to receive messages on the socket, is there a way to find out which interface the message came from? In the case of IPv6 link-scope messages, I was hoping that the from argument of recvfrom() would have the scope_id field initialized to the interfac...