Networks

Service overview and network port requirements for the Windows Server system

"This article discusses the essential network ports, protocols and services that are used by Microsoft client and server operating systems, server-based programs and their subcomponents in the Microsoft Windows server system."

A very nice collection of all the Windows network services and their protocol+port usages.

tcpmon: an open-source utility to monitor a TCP connection

"tcpmon is an open-source utility for monitoring the data flowing on a TCP connection. tcpmon is used by placing it in-between a client and a server. The client is made to connect to tcpmon, and tcpmon forwards the data to server along-with displaying it in its GUI."

Theoretically the above link takes you to the most recent version of tcpmon. However the project started as an Apache tool. At tcpmon.dev.java.net you can get v1.1 and at ws.apache.org v1.0. But the two are not identical featurewise! The new version lacks the ability to switch between horizontal and vertical layout and more importantly it lacks the XML rendering mode. The latter displays XML content structured, ie. the various nodes are indented based on their level in the XML tree. Unfortunately the old version uses some fixed size font which gets pretty much unreadable at higher resolutions.

Bandwidth throttling on the Mac

Four popular solutions:
  1. Mac OS X (starting with Tiger) provides bandwidth throttling capabilities through the built-in ipfw firewall. It's well described in this macosxhints.com article. You'll need a bit of commandline knowledge though.
  2. WaterRoof is a GUI frontend to ipfw and somebody posted a nice tutorial on how to use it to throttle network bandwidth.
  3. There's an even easier way and it's called Entonnoir. It's a small GUI app that requires almost no networking knowledge. However it's not open-source so you can never know what you get your hands on.
  4. If you're just in need to limit your browsing bandwidth (eg. for web development and testing), you can always use one of the many HTTP proxies that support bandwidth throttling. One of them is the excellent Charles Web Debugging Proxy (but it's only a 30-day shareware so you either buy it or look for an open-source alternative).

Bandwidth throttling/control on linux

The two most popular solutions:
  • trickle, a userspace bandwidth shaper. It's just this easy:
    trickle -d 200 -u 30 firefox
  • Wonder Shaper, a kernelspace bandwidth shaper. More efficient for interface-level bandwidth shaping (but does not support per application control at all).

How to query network interfaces and MAC addresses in Java

It's not a big deal, really. However the MAC address is only available since Java6 and to create a Java5 compatible class for working with network interfaces, you've to use the Java reflection API. My demo class might be of help to those who have not yet used reflection. See the attachment for the source of my ListNetworkInterfaces class which will print MAC and IP addresses of all available network interfaces. It'll print MAC addresses only if invoked in a JRE6 (or later). Compilation and invocation is as usually:
javac ListNetworkInterfaces.java
java ListNetworkInterfaces

How to use traceroute on Linux behind a Vigor router

I've found the info at Draytek's LAN FAQ page.
In the Linux system, the traceroute function utilizes UDP packets that are blocked by Vigor routers for security concerns. Therefore, please kindly use the following command:
traceroute -I www.example.com
The -I switch forces traceroute to use ICMP ECHO (instead of the default UDP) packets for probes.

How to determine the proper MTU size with ICMP pings

There's a nice intro on the topic in one of the Linksys knowledgebase articles. I copy the info here so it won't vanish once their knowledgebase goes offline. The original article used the Windows ping command in its examples, but I've added linux and Mac specific examples too.

PRTG Network Monitor (freeware ed. available)

"PRTG Network Monitor is the powerful network monitoring solution from Paessler AG. It ensures the availability of network components while also measuring traffic and usage. It saves costs by avoiding outages, optimizing connections, saving time and controlling service level agreements (SLAs)."

I was looking for a free solution to monitor the uptime of an internet connection (using a Windows PC) and stumbled on this one. I admit it's a bit more than I was looking for, but there're not that many free utilities for network monitoring so grab it while you can. Smiling The freeware edition handles at most 10 "sensors" (ie. you can setup monitoring of 10 network resources). For monitoring the uptime of your network connection you need only one, so it's more than enough.

How to spoof the MAC address in Leopard

I've googled quite a bit and did not find an answer to the problem. You'll get a lot of hits on the subject though and most people tell it cannot be done. In Tiger the following one liner worked like a charm:
ifconfig en0 ether AA:BB:CC:DD:EE:FF
But in Leopard not anymore. Or at least not for the wired (Ethernet) network adapter. The above method still works for the Wi-Fi interface though, but that's not much of a solace to most of us.
The solution is quite easy to guess and pretty easy to do: simply replace the network driver of Leopard with the one of Tiger. Smiling

Finding the top bandwidth-users on an LTSP server

To cut it short, use the nethogs utility. You'll see an output like this:
NetHogs version 0.6.0
  PID USER     PROGRAM                      DEV        SENT      RECEIVED       
19276 user1    rdesktop                     eth0       6.673      71.440 KB/sec
31777 root     sshd: user3 [priv]           eth0    1644.454      57.780 KB/sec
16792 root     sshd: user1 [priv]           eth0    1330.156      52.727 KB/sec
25846 root     sshd: user2 [priv]           eth0     767.100      32.171 KB/sec
(...)

  TOTAL                                             3751.003     215.619 KB/sec
Nethogs is not the perfect tool despite of its ease of use. Read more for some further tips.

Syndicate content