[Solved] Can't ping my gateway or host?

Hello,

I have configured FreePBX on my pc and it’s working on GSM Gateway with Sim Cards but I want now to connect fixed (home) number on it but don’t work.

I have 2 Lan cards (eth0 integrated) and (eth1 non-integrated)

eth0 it’s connected internet connection with IP address 192.168.88.250

eth1 it’s modem of ISP with IP address 192.168.47.178

The IP Address of HOST (phone number) it’s 192.168.15.70

When I try to ping 192.168.15.70 I don’t get any request ?
image

This is my routing table:

I have checked the eth0 port and this is result

I have tried to set my ip address on my notebook 192.168.47.178 and I can ping 192.168.15.70.

Can anyone help me to fix this ?

This is my routing table:
image

I have checked the eth0 port and this is result

image
I have tried to set my ip address on my notebook 192.168.47.178 and I can ping 192.168.15.70.

This is in no way a FreePBX issue. Troubleshooting your LAN routing set up is not something that’s going to really happen here. Specially with three subnets and not a single clue as to how your have your network topology or logic.

Hello @BlazeStudios

This is the topology
image

So all I want is how to ping 192.168.15.70 from VoIP FreePBX server ?

If I were you, I would first connect the ISP phone modem directly to eth1 on FreePBX. Then you need to configure an IP on the same subnet of the modem, either static or dynamic, if the modem is providing a DHCP. Lastly you need to set a static route so the communication to your phone ISP always goes through eth1.

So to change ISP phone modem to eth1 and the mikrotik on eth0 ?

Sorry, I might have messed up the names. I just meant to connect the isp phone modem directly to freepbx, on whichever NIC that might be.

But you can see the topology here that it’s on eth0

https://community.freepbx.org/uploads/default/original/2X/b/b9c277c0b82c32abbc1c47c63fa43f379b873fbd.png

That’s why I said I might have messed up the names. I just meant that I would connect freepnx to the isp modem directly, without going through the switch. Anyway, the important part is the rest of the post: IP address and static routes.

Uhm is the 192.68.15.x subnet programmed on the router?

This is more a Mikeotik issue then anything else. Oh and do you have VLANs setup? And what kind of switch?

You should be asking that question to your phone provider. They should have explained you how to connect to their equipment.

@BlazeStudios

I have setup on my notebook IP: 192.168.47.148 subnet 255.255.255.0 gateway 192.168.47.1 and I have tried to ping the HOST IP: 192.168.15.70 and I got replay from it.

And i use this switch https://www.google.com/search?q=switch+3com+2024+baseline&source=lnms&tbm=isch&sa=X&ved=0ahUKEwif4tzu1LjeAhXF1ywKHUaLCdQQ_AUIDigB&biw=1366&bih=657#imgrc=K8fxcwhqJXb2qM:

But from VoIP FreePBX I can’t ping the gateway of eth0 192.168.47.1 ?

@arielgrin
Yes it was directly then I have changed it but nothing I have just turned back from modem to eth0 directly but still don’t have any result about it.

Yes i’m using static IP address.

If you are using a static IP it must be in the sane subnet as the modem. But then again, your provider should have explained you how to connect your equipment to theirs.

As far as I understand, this is an issue with two NICs and no default route.

See this topic: Routing with two network cards

OK there is a lot wrong with this.

  1. You have yet to confirm how the Mikrotik is setup. Just putting those IPs on your laptop is not enough. The router needs to know what to route for these subnets to “talk”

  2. You are using multiple subnets and “trunking” them from the Mikrotik to the switch. So you need VLANs.

  3. You have an unmanaged switch. So it can’t support VLANs. That is a huge problem.

This is just the tip of the iceberg. This is 100% a network setup issue. You have multiple things to fix before even worrying about the PBX. Until you fix those things, the PBX is going to not work in this setup.

1 Like

@BlazeStudios, @PitzKey, @arielgrin Thanks to all for help I have fixed this.

But now I have other problem when I make a call we can’t hear each other talking ?

Those are TRUNK Sip Settings:

Outgoing:
type=peer&user
nat=auto
insecure=very
port=5060
host=192.168.15.70
dtmfmode=rfc2833
allowguest=yes
allow=g.711&ulaw&alaw&gsm

Incoming:
type=peer
nat=auto
insecure=very
port=5060
host=192.168.15.70
dtmfmode=rfc2833
allow=g.711&ulaw&alaw&gsm

any help about this one ?

Well some of these are wrong.

type=peer&user <-- You can only have one type, Peer, User or Friend. Can’t have two.
nat=no <-- Your provider is not behin NAT
insecure=port,invite (very is depreciated and hasn’t been used since 1.8 almost)
alloweguest=no <-- yes let’s anyone in.
allow=ulaw&alaw (g.711 is an invalid choice)

None of the above in the Incoming section is needed the Outgoing is used first and that’s all you need. However, both of these groups of settings is missing an important part of accepting calls, the context to send them to. Add this to the outgoing after you make your changes:

context=from-trunk

But again the same can you are the changes correct ?

image

image

You need to have

context=from-trunk
disallow=all

For incoming and outgoing.

What Trunk information did you get from your provider?