[Xorp-users] Xorp debug messages
Pavlin Radoslavov
pavlin@icir.org
Wed, 01 Mar 2006 11:46:09 -0800
> I'm currently testing my Click router multicast elements against Xorp.
>
> What is the easiest way to make Xorp print information about the PIM
> messages it received? Is there a way to enable Debug output for PIM only?
Add the following to your XORP configuration:
protocols {
pimsm4 {
...
traceoptions {
flag all {
disable: false
}
}
}
}
In addition, you could add the following to the top of
pim/pim_node.cc and recompile:
#define DEBUG_LOGGING
#define DEBUG_PRINT_FUNCTION_NAME
With the latter solution PIM will print "Received message from ..."
for any message received from the MFEA.
> My PIM Hello messages have the following format (captured with
> tethereal). I do not see the point why Xorp's PIM does not recognise them:
>
> -----------------
> Capturing on eth3
> Frame 1 (72 bytes on wire, 72 bytes captured)
> Arrival Time: Mar 1, 2006 13:05:56.263655000
> Time delta from previous packet: 0.000000000 seconds
> Time since reference or first frame: 0.000000000 seconds
> Frame Number: 1
> Packet Length: 72 bytes
> Capture Length: 72 bytes
> Protocols in frame: eth:ip:pim
> Ethernet II, Src: Intel_08:f0:a8 (00:04:23:08:f0:a8), Dst:
> 01:00:5e:00:00:0d (01:00:5e:00:00:0d)
> Destination: 01:00:5e:00:00:0d (01:00:5e:00:00:0d)
> Source: Intel_08:f0:a8 (00:04:23:08:f0:a8)
> Type: IP (0x0800)
> Internet Protocol, Src: 172.20.12.1 (172.20.12.1), Dst: 224.0.0.13
> (224.0.0.13)
> Version: 4
> Header length: 24 bytes
> Differentiated Services Field: 0xc0 (DSCP 0x30: Class Selector 6;
> ECN: 0x00)
> 1100 00.. = Differentiated Services Codepoint: Class Selector 6
> (0x30)
> .... ..0. = ECN-Capable Transport (ECT): 0
> .... ...0 = ECN-CE: 0
> Total Length: 58
> Identification: 0xf45f (62559)
> Flags: 0x00
> 0... = Reserved bit: Not set
> .0.. = Don't fragment: Not set
> ..0. = More fragments: Not set
> Fragment offset: 0
> Time to live: 1
> Protocol: PIM (0x67)
> Header checksum: 0x9716 [correct]
> Good: True
> Bad : False
> Source: 172.20.12.1 (172.20.12.1)
> Destination: 224.0.0.13 (224.0.0.13)
> Options: (4 bytes)
> Router Alert: Every router examines packet
> Protocol Independent Multicast
> Version: 2
> Type: Hello (0)
> Checksum: 0x8447 [correct]
> PIM parameters
> Holdtime (1): 105s
> LAN Prune Delay (2)
> T bit is not set
> LAN Delay: 500ms
> Override Interval: 2500ms
> DR Priority (19): 2
> Generation ID (20): 1331494912
> ------------------
There is nothing unusual I can see about the above message, so the
starting point would be to see whether the PIM-SM module receives it
at all. If not, then try to find whether the MFEA receives it.
In general, if you want to print something for debug purpose inside
the PIM-SM module or MFEA, use the XLOG_* facility (recommended) or
fprintf(stderr), but don't use printf() or fprintf(stdout).
Pavlin