Unable to reach the MP from the asterisk server

8 views
Skip to first unread message

Pascal Laurent

unread,
Dec 26, 2009, 11:15:41 PM12/26/09
to village-...@googlegroups.com
Hi,

I'm having problem peering the MP with my asterisk server. It seems to
be a routing issue, but can't seems to figure out how to address it.
Would you please help?

MP (Mesh: 10.0.0.2) and (LAN: 10.30.1.1)
ATA (10.30.1.2)

Super Node (Mesh: 10.0.0.1) and (LAN: 10.3.1.100)

The Super Node is connecting to my router and the router provides
internet access.

Router (Lan: 10.3.1.1)
Asterisk Server (Lan: 10.3.1.2)

The MP is registered with the asterisk server, not the asterisk server
registered with MP. In other work from the asterisk server I could not
ping or peering with the MP.

From MP (sip show peers)
Name/username Host Dyn Nat ACL Port
Status
ast/ast 10.3.1.2 5060
OK (15 ms)

From the asterisk server (sip show peers)
ast/ast 10.0.0.2 N 5060
UNREACHABLE

If I ping 10.0.0.1 from the asterisk server I get this:
[root@astserver ~]# ping 10.0.0.1
PING 10.0.0.1 (10.0.0.1) 56(84) bytes of data.
64 bytes from 10.0.0.1: icmp_seq=1 ttl=64 time=1.66 ms
From 10.3.1.1: icmp_seq=2 Redirect Host(New nexthop: 10.3.1.100)
64 bytes from 10.0.0.1: icmp_seq=2 ttl=64 time=1.32 ms

If I ping the MP from the asterisk server I get this:

[root@astserver ~]# ping 10.0.0.2
PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
From 10.3.1.100 icmp_seq=1 Destination Port Unreachable
From 10.3.1.1: icmp_seq=2 Redirect Host(New nexthop: 10.3.1.100)
From 10.3.1.100 icmp_seq=2 Destination Port Unreachable
From 10.3.1.100 icmp_seq=3 Destination Port Unreachable

If I ping the asterisk server from the MP I get this:
root@OpenWrt:~# ping 10.3.1.2
PING 10.3.1.2 (10.3.1.2): 56 data bytes
64 bytes from 10.3.1.2: seq=0 ttl=63 time=5.649 ms
64 bytes from 10.3.1.2: seq=1 ttl=63 time=5.865 ms
64 bytes from 10.3.1.2: seq=2 ttl=63 time=5.725 ms

Thanks,
--Pascal

David Rowe

unread,
Dec 27, 2009, 12:34:07 AM12/27/09
to village-...@googlegroups.com
Hi Pascal,

This:

> [root@astserver ~]# ping 10.0.0.2
> PING 10.0.0.2 (10.0.0.2) 56(84) bytes of data.
> >From 10.3.1.100 icmp_seq=1 Destination Port Unreachable
> >From 10.3.1.1: icmp_seq=2 Redirect Host(New nexthop: 10.3.1.100)
> >From 10.3.1.100 icmp_seq=2 Destination Port Unreachable
> >From 10.3.1.100 icmp_seq=3 Destination Port Unreachable

suggest you need to set up a route from your Asterisk server to your
Mesh Network, for example:

[root@astserver ~]# route add -net 10.0.0.0/24 gw 10.3.1.100

batman takes care of the routes in the other direction, from the mesh
network through to the Supernode.

Nice example (along with Asterisk configuration) of the sort of tricky
network config task that we need to have automated in the standard
Village Telco set up!

Cheers,

David


Pascal Laurent

unread,
Dec 27, 2009, 8:11:56 AM12/27/09
to village-...@googlegroups.com
David,

I have tried that. It does not seem to resolve the problem. When I
ping the MP from the asterisk server I'm still getting this: From
10.2.1.100 icmp_seq=1 Destination Port Unreachable

I noticed on the MP there is no firewall configuration. On my
supernode, however, I'm running a firewall. I'm guessing, may be I
need to setup some iptables rules.

Thanks,
--Pascal

> --
>
> You received this message because you are subscribed to the Google Groups "village-telco-dev" group.
> To post to this group, send email to village-...@googlegroups.com.
> To unsubscribe from this group, send email to village-telco-...@googlegroups.com.
> For more options, visit this group at http://groups.google.com/group/village-telco-dev?hl=en.
>
>
>

elektra

unread,
Dec 27, 2009, 10:56:37 PM12/27/09
to village-...@googlegroups.com
Hello Pascal -

the text in this email could become part of the documentation of a VT provider
routing howto, so I'll provide some general comments.

There are a few useful questions one should ask in case of network/routing
problems.

1) Is a firewall blocking access?

It is always a good idea to test routing first without having a firewall
running, to rule out firewall issues. Once you have the routing sorted out you
can begin locking down connectivity to certain ports / peers.

2) Do I have a route to the destination?

3) Is there a route back from the destination?

4) Is there a physical link?

5) Note: Batman is performing policy routing. It will set up a host route to
all destinations in the mesh i.e. to all WiFi mesh IPs. If there is no host
route to the MP that you are trying to connect to, it will immediately tell
you that the node is not available - even if it might actually be link local.
So it is mandatory to run Batman on all mesh nodes.


> I'm having problem peering the MP with my asterisk server. It seems to
> be a routing issue, but can't seems to figure out how to address it.
> Would you please help?

Sure.

In general it is good to be a bit more specific about the current setup to make
remote network debugging easier and quicker ;-)

Helpful information:

- how did you set up the routing so far?
- on which nodes/interfaces are you running Batman?
- how did you configure Batman i.e. are you using Batman HNA messages to
announce subnets?
- you are using IP subnet ranges - what is their netmask/network class?
- how are the nodes physically connected to each other?

I'll try to do some guesses.

From the IP settings you have provided I'm assuming the following:

You have a ATA connected to the LAN port of a "MP". I assume you are using
10.30.1.0/24 subnet here in this LAN segment.

Router, supernode and Asterisk server are on the same LAN segment with subnet
10.3.1.0/24. These three devices are interconnected via LAN cables connected
to the switch build into the router.

So you got two different LANs and a WiFi mesh. To route them all together you
have to run Batman on the supernode and on the MP.

In order to allow the LAN segment connected to the MP to talk to the LAN
segment connected to the supernode, you need to announce each LAN segment with
Batman HNA messages to the mesh.

Stop Batman in supernode and in MP (On the ssh/telnet command line: killall
batmand). Start Batman in the supernode with:

batmand -a 10.3.1.0/24 ath0

This will tell batmand to announce the supernodes LAN segment to the mesh.


Start Batman in the MP with:

batmand -a 10.30.1.0/24 ath0

This will tell batmand to announce the MPs LAN segment to the mesh. The ATA
needs a default route (destination 0.0.0.0/0) via the MPs LAN IP 10.30.1.1.
This step is specific to your setup (ATA on LAN port of "MP"). Users of actual
MP hardware don't need to do that.

The Asterisk server will probably already have a default route to the Internet
via the router. However, the supernode - not the router - is the gateway to
the mesh and the LAN segments behind mesh nodes. Hence you need to set up a
route to 10.0.0.0/8 via the LAN IP of the supernode in the Asterisk server.
This will include all the mesh WiFi IPs and subnets.

ip r add 10.0.0.0/8 via 10.3.1.100 dev eth0 (assuming the Asterisk servers LAN
interface is eth0)

You should do the same step in your router, otherwise it can't route traffic
into the mesh.

I haven't covered Internet access for the MP yet. Need some sleep now ;-)

Cheers,
Elektra

Rael Lissoos

unread,
Dec 27, 2009, 11:57:55 PM12/27/09
to village-...@googlegroups.com
Hi

On the asterisk  do a sip show peers to see if registered, if regi okay and routing okay then look into the codec settings

Pascal Laurent

unread,
Dec 28, 2009, 12:55:55 AM12/28/09
to village-...@googlegroups.com
Elektra,

I will certainly try your suggestions.

Thanks a bunch,
--Pascal

David Rowe

unread,
Dec 28, 2009, 7:28:19 PM12/28/09
to village-...@googlegroups.com
Hello all,

Thanks Elektra, good documentation. Pascal's experiences are a very
good example of all the intricate little steps we need to build a
Village Telco.

I figure strong themes for VT should be:

1/ Design the GUIs, default configurations etc so that the person
setting up a basic VT network requires no knowledge of these steps.

2/ Add little tell tales/alarms/blinken-lights to the GUI (or mesh
potato UI such as audio or LEDs) to lead the VT-person straight to the
problem:

i) For example have a certain dial tone on the MP if a good,
bi-directional link is not present to the outside world.

ii) Have the server/supernode regularly evaluate the quality of the
links so we know that voice quality will be good.

iii) the server calls the VT-persons mobile (or sends an email) when
connectivity to a node or the ITSP is lost.

Cheers,

David

Pascal Laurent

unread,
Dec 29, 2009, 7:23:01 AM12/29/09
to village-...@googlegroups.com
Elektra,

After following the instruction and make the changes the problem I'm
having still persisted. I'm writing a document of my network setup and
provide it to the group in future email. Please note everything works
fine using a simple setup (2 AP and one asterisk server). Where I'm
having problem is integrating the setup to my existing network.

Thanks,
--Pascal

On Sun, Dec 27, 2009 at 10:56 PM, elektra <onel...@gmx.net> wrote:

Steve Song

unread,
Jan 6, 2010, 5:46:56 AM1/6/10
to village-...@googlegroups.com
Hi all,

I've been meaning to reply to this but go sidetracked over the
holidays. I just want to say that if the Village Telco succeeds at
all, it will be on the basis of how well we have done in making the
Village Telco and the Mesh Potato so ridiculously easy-to-use that no
manuals will be required.

I love David's ideas below. Seems like we need a place to record
feature requests for the Mesh Potato. I've added a Feature Request
forum at http://villagetelco.org/forum/forum/3

Cheers... Steve

2009/12/29 David Rowe <da...@rowetel.com>:

--
Steve Song
Telecommunications Fellow, Shuttleworth Foundation

email: steve...@shuttleworthfoundation.org
work: +27 21 970 1220
mobile: +27 83 482 2088
skype: steve_l_song
blog: http://manypossibilities.net
twitter: stevesong

Alexander Chemeris

unread,
Jan 6, 2010, 6:11:46 AM1/6/10
to village-...@googlegroups.com
Hi David,

On Tue, Dec 29, 2009 at 03:28, David Rowe <da...@rowetel.com> wrote:
> i) For example have a certain dial tone on the MP if a good,
> bi-directional link is not present to the outside world.

Good idea. Though it will be non-obvious for first-time users.
Could we add background voice (kinda "ghost voice") to dial
tone which constantly repeats "Connection to outside world
is broken atm... Connection to outside world is broken atm..."

This way it's less annoying then if warning are read before you
get to dial tone, but you still stay informed.

PS I assume that for MP dial-tone has no signalling meaning
and is left just for people convenience.

> ii) Have the server/supernode regularly evaluate the quality of the
> links so we know that voice quality will be good.

Yes, yes, yes. Probably BATMAN quality reports are enough
as a basic measurement?

> iii) the server calls the VT-persons mobile (or sends an email) when
> connectivity to a node or the ITSP is lost.

Or send SMS. It's cheaper and easier to handle.

--
Regards,
Alexander Chemeris.

Mngani Mkhize

unread,
Jan 7, 2010, 3:55:50 AM1/7/10
to village-...@googlegroups.com
Hi David,

I'm a Linux beginner and I've just started experimenting with espeak. Would it be possible to use espeak on the MPs to "speak out" status information on the handset like Alexander suggested?

2010/1/6 Alexander Chemeris <alexander...@gmail.com>

David Rowe

unread,
Jan 7, 2010, 6:08:13 PM1/7/10
to village-...@googlegroups.com
Hello Alex,

> Good idea. Though it will be non-obvious for first-time users.
> Could we add background voice (kinda "ghost voice") to dial
> tone which constantly repeats "Connection to outside world
> is broken atm... Connection to outside world is broken atm..."

Sure, just another recorded prompt.

> PS I assume that for MP dial-tone has no signalling meaning
> and is left just for people convenience.

Yes.

> Yes, yes, yes. Probably BATMAN quality reports are enough
> as a basic measurement?

It's a start, then there's ping, and checking the SIP trunk (e.g. "show
sip peers" at the * CLI) on top of that. And perhaps even sending test
voice calls across the mesh. A special extension could be placed on
each MP01 that answers the call without ringing the analog phone. This
extension might run the Asterisk "echo" application that simply echos
speech back to the server. The server could then run a bunch of tests
to checkout jitter, packet loss etc.

This might be a really useful development tool - we could characterise
Voice-Over-mesh-Wifi without bothering any actual users. For example we
could load the mesh up to full capacity at 3am and test various
algorithms.

> > iii) the server calls the VT-persons mobile (or sends an email) when
> > connectivity to a node or the ITSP is lost.
>
> Or send SMS. It's cheaper and easier to handle.

Yep.

Cheers,

David


David Rowe

unread,
Jan 7, 2010, 6:10:27 PM1/7/10
to village-...@googlegroups.com
Hello Mngani,

> I'm a Linux beginner and I've just started experimenting with espeak.
> Would it be possible to use espeak on the MPs to "speak out" status
> information on the handset like Alexander suggested?

Yes we could do that. Asterisk also has a bunch of pre-recorded prompts
like numbers that we could put together with a "Your status is" prompt
to make the complete status sentence. We left plenty of spare flash on
the MP for just this sort of reason.

Cheers,

David

> To unsubscribe from this group, send email to village-telco-dev
> +unsub...@googlegroups.com.

Alexander Chemeris

unread,
Jan 8, 2010, 5:14:12 AM1/8/10
to village-...@googlegroups.com
On Fri, Jan 8, 2010 at 02:08, David Rowe <da...@rowetel.com> wrote:
>> Good idea. Though it will be non-obvious for first-time users.
>> Could we add background voice (kinda "ghost voice") to dial
>> tone which constantly repeats "Connection to outside world
>> is broken atm...  Connection to outside world is broken atm..."
>
> Sure, just another recorded prompt.

Right. Missed this and was thinking more about real-time mixing
of tone and voice.

>> Yes, yes, yes. Probably BATMAN quality reports are enough
>> as a basic measurement?
>
> It's a start, then there's ping, and checking the SIP trunk (e.g. "show
> sip peers" at the * CLI) on top of that.  And perhaps even sending test
> voice calls across the mesh.  A special extension could be placed on
> each MP01 that answers the call without ringing the analog phone.  This
> extension might run the Asterisk "echo" application that simply echos
> speech back to the server.  The server could then run a bunch of tests
> to checkout jitter, packet loss etc.
>
> This might be a really useful development tool - we could characterise
> Voice-Over-mesh-Wifi without bothering any actual users.  For example we
> could load the mesh up to full capacity at 3am and test various
> algorithms.

Yep. I was thinking about the same. But there should be some ways to
measure quality of real network, not just emulation. Good network should
be monitored constantly and records should be available to network
owner. E.g. if user complain that every second his call has awful quality,
tech.support should be able to check this claim with facts. I think it would
be very much useful to monitor jitter/loss/etc for every call in a mesh and
store this into RRD with ability to easily retrieve this values from management
(web-)application.

--
Regards,
Alexander Chemeris.

Reply all
Reply to author
Forward
0 new messages