Why Multicast over Ham Radio. Have you ever watched the LAN send the same chat message, or the same PBBS message over and over again to multiple recipients at the same time? This is such a waste, it seems like someone should be working on a solution. The answer is that yes, people have been working on this, and the result is IP Multicasting. IP Multicast is a technology designed to allow broadcast packets to be sent across many lans on the internet. Unlike normal broadcast packets, which are limited to the local networks, multicast packets can travel through routers and over the internet to everyone interested in receiving that data. Applications where data needs to be sent from a single source to many destinations are candidates for using IP multicast rather than a unicast IP program. For example, with a traditional chat room system, typically a set of computers act as chat servers. Users connect to the chat servers, and then the chat servers negotiate among themselves, how data is transmitted among them. For each user connection to a chat server, the server needs to send out a packet for each user -- even if they are on the same LAN. The connections between chat servers result in difficult code in the servers themselves to arrange for routing of packets. In comparison, with with an ip multicast chat room, users would broadcast chat packets, to all users with a single 'sendblock' command. The routers would be responsible for delivering the chat messages to all users. The routers should be smart enough to eliminate duplicate packets sent over the same data pipes. IP Multicast is a unreliable, UDP, style mechanism, so some system needs to be added to ensure the reliable, or even likely, delivery of packets. With an IP Multicast chat system, there would be no chat servers. All of the logic for distributing the chat packets across the network are moved down to the OS level. As multicast routers are added to the system, chat access then is automatically available to each new area -- since, no new chat server is required. That is the job of scaling the size of the application is moved to the network -- and the application itself can remain relatively simple. The ease of programming multicast applications may then result in more experimtation since programmers can create the applications, without having to build a network of servers across the planet -- provided there's a multicast network in place. I believe IP Multicast is a good idea for ham radio networks -- as the data that travels over ham radio is often of a broadcast nature. Whether IP Multicast in its current form is suitable for ham radio networks remains to be seen -- however, the programming API, and socket level interfaces to IP Multicast are well-designed, and should provide a base for applications. Both in Windows and Linux. Here are some basic multicasting concepts that I've picked up. mrouted The program mrouted provides for routing of multicast packets. It's typically used to connect multiple nets, say an ax25 net and an ethernet, or an ethernet to another ethernet via a tunnel. Mrouted doesn't actually route the packets, but instead directs the Linux kernel to forward the packets accordingly. Membership IP Multicast works according to a concept called 'Membership' A setsockopt command called IP_ADD_MEMBERSHIP specifies which of the multicast IP addresses that machine receives packets from. An application just specifies that it wishes membership in one of the multicast IP's in the range 224.0.0.0/4, and then the routers take care of the rest, and deliver all packets for that multicast IP address that are sent anywhere on the network. IGMP IGMP packets are used by applications to indicate to the routers how multicast packets should be routed. What are the advantages? 1. IP Multicast is optimizized so that packets are sent only to the routers that need them. The lastest mrouted 3.9 implements a mechanims to reduce this traffic. IP Multicast will only send a packet once over a tunnel, even if there are multiple recipients on the other end. Compare this to traditional IP programs, which will broadcast a duplicate copy of the same data to everyone on the other end of the pipe. 2. IP Mulitcast is the result of lots of research, and testing. And, should be stable enough for ham radio networks. IP Multicast has in it a level of maturity that would be extremely difficult to duplicate with a ham radio network built from scratch. 3. IP Multicast has a very simple programming interface for the applications programmer. Most of the complexity for distributing of packets over a complicated network is placed in the operating system. 4. By building applications using the existing IP Multicast programming interface, these applications can then take advantage of future advances in IP Multicast routers. 5. IP Multicast, though not universally supported by Internet service providers, is widely supported by OS and software venders. So, Win98 and Linux both have native support for IP Multicast. What are the disadvantages? 1. mrouted, the multicast router is only available for UNIX style machines. Win98 machines can run multicast applications, but as far as I'm aware, they cannot act as routers. 2. Multicast is untested over low speed ham radio links. There are certainly tuning adjustments which will need to be made. 3. There aren't many multicast applications at this time. 4. Multicast routing isn't supported by most ISP's. Anyone interested in exerimenting in multicast routing, will need to build their own network. 5. IP Multicast is an IP based technology, and inevitably involves the overhead associated with IP -- as compared to native AX25 systems. 6. IP Multicast does not guarantee delivery, so applications, developed for TCP/IP or reliable packet delivery will need substantial reworking to use IP multicast efficiently. How do you get started? First, I believe you want to be running a Linux version with multicast enabled, multicast routing enabled and ax25 also enabled. If you haven't done ham radio networking before, get ax25 working first, and then get your ax25 devices running first. Go to linux.org, and look in the support section for the HOWTO's. There you'll find the ax25 howto, and the multicast howto. Make sure to include IP Multicasting and IP Multicast routing when you build your kernel. (These options seem relatively benign, even if you don't use IP Multicasting.) Also, I turn on IP Tunneling, though I'm not absolutely sure this is necessary. My testing is on Linux 2.2.x based kernels. Once, your AX25 network is running, you'll want to setup for IP Multicast. First, you need to set MULTICAST flag for all devices that use multicast. This is done with the following command: '/sbin/ifconfig ax0 multicast' Do a command '/sbin/ifconfig' and you should see the word MULTICAST following each interace that you intend to use for multicast. My eth0 devices comes up with multicast on by default. Then, you need to change your rouring. Make sure to 'add -net 224.0.0.0 netmask 240.0.0.0 eth0' and 'add -net 224.0.0.0 netmask 240.0.0.0 ax0' where eth0 is your local ethernet, and ax0 is your ham radio network. The net of 224.0.0.0/4 is a special set of ip addresses set aside for ip multicast. Then, you'll need to get mrouted up and running. I'll try to make versions available here, though mrouted is also available on the net. For mrouted to be useful, you'll need at least 2 networks or a tunnel. That is for example an ax25 network and an ethernet network. Or, an ethernet network and a tunnel to another ethernet network. I have a beacon test program which will send out multicast packets. With a beacon monitoring program, which I'm working on now, you should be able to see your beacons travel from one net to another. If you're connected to another user via a tunnel, you should see his beacons also. Then send me an email, and either I'll connect your multicast network to my system, or hopefully find someone near you who can connect you. (I'm at cathryn@junglevision.com) Here's how I start IP multicast. /sbin/route add -net 224.0.0.0 netmask 240.0.0.0 ax2 /sbin/route add -net 224.0.0.0 netmask 240.0.0.0 eth0 /sbin/ifconfig ax2 multicast /usr/sbin/mrouted You also might want to try /usr/sbin/mrouted -d To watch mrouted perform its functions. If /usr/sbin/mrouted looks functional, it's time to setup the tunnels. The mrouted.conf file should be at /etc/mrouted.conf. Follow the instructions in mrouted.conf. (I'm currently working this out myself -- that is how to properly setup tunnels.) Finally, watch out for firewall issues. This one bit me for awhile. I run IP Multicast over an inteface with masqueraded IP addresses. The second line sets up the IP Masquerading, and the third line is necessary, in this example, to allow the interface to forward IP Multicast packets. /sbin/ipchains -P forward DENY /sbin/ipchains -A forward -s 192.168.1.0/24 -j MASQ /sbin/ipchains -A forward -d 224.0.0.0/4 -j ACCEPT IP Multicast on Win98 I have been testing small IP Multicast applications on Win98 and AX25 using the SV2AGW software. This combination works pretty good, and can talk to Linux IP multicast with no problems. Win98 works well for running Multicast applications, but does not work as a multicast router. The MSDN website has some sample code for IP Multicast if you're interested in creating multicast applications for Win98. IP Multicast with NOS I don't run currently run any NOS code, so I'm not sure if these work or not. If you're a NOS programmer, give me the scoop, and I'll put that information here. What is the Future? 1. As a short term goal, I'd say it's important to get a few tunnels up and running, and verify the basic functionality of mrouted over ax25. Let's learn the basics of running IP Multicast. 2. Develop beacons and beacon monitoring as an application. Sending and monitoring beacons is trivial from the programming side, but will give us some information on how well the tunnels are working. Also, beacons can possibly serve some use for distributing information widely across the ham radio networks around the world. A beacon system, might be used to find people to meet on 20meters -- or to advertise a ham web page or something. Using ip multicast for beacons will also set up the right expectations about what the network is capable of doing. 3. Develop a chat system. IP Multicast will allow us to make more scalable chat systems. Especially chat systems where many users are in the same chat room. Chat is slightly more advanced than beaconing, since there's an expectation that users will see all the messages that people type -- and this requires some kind of information to be stored by the users or in the network. 4. Adapt existing IP Multicast multimedia applications to the ham radio network. These applications will probably run natively, but may require more bandwidth than we can give them. However, assuming some kind of bandwidth improvement in ham radio networking, (well, we can hope!) IP Multicast is a natural mechanism for delivering, for example, Newsline audio broadcasts to a wide variety of sites. Cathryn Mataga KE6I http://ke6i.com cathryn@junglevision.com