2006-10-20

Beryl on Xgl

Finally I have Beryl running on my desktop at home. If you want to better feel how it works (this is very dynamic gadget) then check this video. I don't like this wavy animation of window [un]minimization, so I've changed it to something else. Beryl setting manager allows you to change almost everything without pain in the ass. Usually all changes take affect immediately and you don't have to restart window manager, but in random cases it doesn't work.

JGrups on Linux With Multiple Network Interfaces

Few hints for those, who want to run JBoss Cache in clustered mode ([a]synchronous replication/invalidation) on Linux machine with multiple network interface cards (NICs) and using UDP/multicasting in OSI layers 4/3 . Here is situation overview: We need multicast communication through eth1 to other JBoss Cache nodes.
JBoss Cache uses JGroups for network communication. And I'm going to focus on configuration of this service (Cache configuration is very easy). First of all, for device with multiple NICs, you need to specify a bind address in configuration file (of course if use xml file to configure services) in section ClusterConfig/UDP. AFAIK this can't be 0.0.0.0. Probably you can use any address from your NICs, but I would suggest using the one from eth1 (this will be logical but it won't change process of packet generation and sending). Without this parameter service won't start throwing an exception.


Second thing is to specify outgoing NIC. On Linux platform process run by non-root user can't specify source address and outgoing interface for it's packets. The only way to control this is through routing table. Without special entry in routing table for your cache's multicast address, all packets will go outside of machine using DEFAULT route, which in case from above picture will mean eth0. This is not what we want to archive. You can correct it like this:

$ ip r a 228.1.2.3/24 dev eth0
The last thing is packet fragmentation issue. Maybe only I had this problem, but I spend a lot of time trying to solve it. Every replication of bigger amount of data resulted in timeout exception. To get things working I had to set timeout to 120 seconds! Of course that wasn't right solution. Finally I've changed max_xmit_size and frag_size parameters to MTU minus approximate size of all headers. This is about 1400 B.


If you still have problems then check your Ethernet switch connected to eth1. For example if it has IGMP SPAN mode enabled then check if it works correctly. I had problems with it on 3Com SuperStack 3 Switch 3870 with software version 1.01.

2006-10-17

Cisco MIBs horror

Suppose you want to know what vlans are configured/allowed on individual ports in one of recent Cisco Catalyst switches - quite basic information. SNMP seems to be right protocol for this task. Structure of most Catalyst switches can be discovered using ENTITY-MIB and that's good news. In entPhysicalTable you can find ports, modules, chassis and many other parts with defined relationships between them. Now you want to find vlans for discovered ports and this is where scary part starts. Since port can have many vlans and vice versa, such mapping can be done in SNMP using one column table with row index build by combination of two numbers (portID.vlanID). As value of this row could be:
  • 1 meaning native vlan
  • 2 meaning tagged vlan
Lack of port-vlan combination in table would mean that this port isn't present in given vlan. Simple? Yes, but too simple for Cisco engineers.

Cisco found another solution. In order to get via SNMP vlans per port information for Cat2950, Cat2970, Cat4500 and Cat6500 (with recent IOSes) you have to correctly combine following tables:

ifTable from IF-MIB entPhysicalTable from ENTITY-MIB, entAliasMappingTable from ENTITY-MIB, vtpVlanTable from CISCO-VTP-MIB, vlanTrunkPortTable from CISCO-VTP-MIB, vmMembershipSummaryTable from CISCO-VLAN-MEMBERSHIP-MIB, dot1dBasePortTable from BRIDGE-MIB

Some of those tables are 3D, have thousands of columns (one bit per column) and all of them use different, non-continuous indexes. But that would be still to easy. To get mapping from ports in vmMembershipSummaryTable to ports in ifTable you have to query dot1dBasePortTable using separate SNMP community for every vlan. Thank you Cisco!

Does anyone have any other idea how to solve this problem?

2006-10-15

E-mail Posting Test

Currently I try to combine Eclipse Platform (OSGi, EMF, GMF) with Spring Framework (as Beans container and factory) and JBoss Cache (synchronous distributed cache) and many other useful pieces of software (like SNMP4J) in order to build network management application.

All this software is very good. The problem is that Eclipse and JBoss suffer lack of documentation for newly developed stuff while I'm mostly interested in newly developed stuff.

Some measures for today: Execution time analysis for cached/direct access to following SNMP tables: VlanTrunkPortTable(from Cisco MIBS) and IfTable combined with InterfacesTable:

  • direct run time: 1308
  • cached run time: 2684 (empty cache)
  • cached run time: 6 (full cache)

So building and propagating cache takes: 1376 milliseconds. That's not good.

About This Blog

As always my first choice wasn't good. I had to immediately change blog template to completely different. The old one could break your eyes. I like new things, so I've converted my blog to http://beta.blogger.com. It's one way process, but I have nothing to loose. Let's see how this all works. In the mean time I'll worm up my tea in microwave. This blog will be mostly about me versus resistance of some cutting edge software development technologies (usually open-source Java and Python frameworks, libraries and tools).

Let's start

World comes to the an end. I have a blog.