Put:
(load-module "net")
In your ~/.stumpwmrc
~/.stumpwmrc
Then you can use "%l" in your mode line format.
This is specific to Linux.