[ Top page ]


Network and communication Archives

November 16, 2007

When connecting multiple computers to a network and making the computers communicate each other through the network, it is convenient to start the communication by kicking a port of the application on one of the computers. For this purpose, I wrote a program that sends a UDP (User Datagram Protocol) message that has no content. (It is easy to replace UDP by TCP, but the receiver program will be a little more complicated.)


A program that receives a two-channel (i.e., stereo) voice by RTP (Real-time Transport Protocol) and that plays by audio. The sound is 16-bit linear by default, but u-Law (G.711) or other codecs can be used. The port number used for receiving the voice is specified in the program (i.e., $IN_PORT_RTP). A detailed description will be given in future, but it will be explained when it becomes necessary.


March 30, 2008

Mail proxies (SMTP proxies) have become much more important to avoid errorneous mail delivery. There is a mail proxy written by Perl: Qsmtpd. However, when you want to build a simple proxy by yourself, this program might not be helpful because the program is too much complicated. So I wrote a proxy, which is as simple as possible.


May 20, 2012

I wrote a program that sends and receives packets with a VLAN tag using Linux promiscuous mode. This program is for playing with a VLAN switch. If you compile it without a switch (#define VLAN), you can send and receive untagged (i.e., normal Ethernet) packets.


To test connectivity through an IP network, "ping" is usually used. However, "ping" cannot be used or it is not convenient when non IP environment or using network interfaces directly. This page shows a simple tool for such situation. This tool can of course be used under an Ethernet environment, but it can also be used when Ethernet is not available but the promiscuous mode of Linux can be used.


Although we can buy a high-performance Ethernet switch at 10 or 20 dollars, a programmable (software) switch is convenient for experimental purpose such as observing the learning steps. The following program is a Ethernet switching program with learning function but not completely conforming to the Ethernet standard.


February 18, 2013

A GRE tunnel can be created between two computers using an ip command. Either IP/GRE or (IP)/Ethernet/GRE tunnel can be created by slightly modifying the commands.


April 13, 2014

I wrote an Ethernet simulator. The main purpose for this development is leaning Ethernet by my students in Kogakuin University. This program is in public domain.

There are simulators that exactly simulates Ethernet networks, but I could not find an appropriate simulator for educational purposes, so I wrote one by myself. You can open multiple command windows and each window can run this program to simulate a switch or a terminal. It is a very simple program, so there are restrictions such as the port number range. However, you can roughly see mechanisms of Ethernet network.


August 5, 2014

Every time I write a program in C, I am quire tired. I thought it was easier to write one by Python. So I wrote a demo program of raw socket communication. It was not so easy as I expected, but the following program sends (and receives) an Ethernet packet almost every second. (Whole this article is licensed by Creative Commons, but the program is in public domain; that is, it can be copied without any restriction.)


June 18, 2017

I developed yet another IP simulator for learning IP. The interface of this simulator is similar to the "Ethernet for learning".



Objects printed by using the new direction-specified design and printing technology are sold in Dasyn Yahoo! Japan shop.

About Network and communication

This page contains an archive of all entries posted to Small and Large Stones of Programming in the Network and communication category. They are listed from oldest to newest.

MultiMedia is the previous category.

Parallel processing is the next category.

Many more can be found on the main index page or by looking through the archives.

Creative Commons License
This weblog is licensed under a Creative Commons License.
Powered by Movable Type