Cant ping to sip provider from freepbx

Hi, I installed freepbx in esxi vm with the ip address of 192.168.200.253 and the gateway is 192.168.200.254 in mikrotik router and I have an other interface with the ip address of 10.177.2.201 its the way to sip proivder and the sip proivder ip address is 10.150.28.252 and media address is 10.150.28.253. my problem is that I can ping both ip addresses 10.150.28.252 and 10.150.28.253 from my mikrotik router but I cant ping these two ip from freepbx. I created the route in freeobx and still it dose not work.

Use tools ping in Mikrotik ping from the port connected to PBX if you can’t ping you need to post on Mikrotik forum you have a router issue

I Can ping from router to sip provider but the issue is I cant ping from freepbx to sip provider
.

Are you selecting the interface to ping from in Mikrotik ? Router OS will look at the routing table and ping from the interface that can reach the destination, select y the interface (port) FreePBX is connected from

no I only write the ip address in tools ping and it works and reach the sip proivder from microtik but when I ping from freepbx cli to ping sip provider it dont work. I can ping 10.177.2.201 from freepbx that is the way to sip provider it reach 10.177.2.201 but cant reach to 10.150.28.252 the sip provider ip.

Sounds like you have a partially multihomed system, which is never a desirable thing. What is your default route set to? Do you have a route, through the correct interface, to 10.150.28.252. You will need to add that explicitly. Have you tried both ICMP and UDP pings?

This article specifically talks about how to add static routes to multi homed systmes on CentOS 7. If you have something different then the latest FreePBX distribution google how to set up static routes for your flavor of the distribution.

I have two external interfaces one is for my internet connection which is default route to 180.94.88.9 and the other interface is 10.177.2.201 which is the way to sip provider and the next hop for sip provider is 10.177.2.1 and I created the route for it but I cant reach it from freepbx.

yes sir I have latest freepbx distru and I already have static route on it the ip address of my freepbx is 192.168.200.253 via gateway of 192.168.200.254 and the static route is

10.150.28.252/32 via 192.168.200.254 dev eth0
10.150.28.253/32 via 192.168.200.254 dev eth0
10.177.2.0/24 via 192.168.200.254 dev eth0

In the PBX, please post the output of
ifconfig
and
ip route

In Mikrotik, please post the output of
/ip route print
/interface print
/ip address print

ifconfig
inet 192.168.200.253 netmask 255.255.255.0 broadcast 192.168.200.255
inet6 fe80::20c:29ff:fe74:d22 prefixlen 64 scopeid 0x20
ether 00:0c:29:74:0d:22 txqueuelen 1000 (Ethernet)
RX packets 23261 bytes 5550976 (5.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 13271 bytes 8164973 (7.7 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10
loop txqueuelen 1000 (Local Loopback)
RX packets 92586 bytes 205700096 (196.1 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 92586 bytes 205700096 (196.1 MiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0

ip route
default via 192.168.200.254 dev eth0
10.150.28.252 via 192.168.200.254 dev eth0
10.150.28.253 via 192.168.200.254 dev eth0
10.177.2.0/24 via 192.168.200.254 dev eth0
169.254.0.0/16 dev eth0 scope link metric 1002
192.168.200.0/24 dev eth0 proto kernel scope link src 192.168.200.253

You do not have an eth0 interface, only a single real interface, called inet.

let’s try iproute2 methods

ip address
ip route

its my microtik config

/ip route print
Flags: X - disabled, A - active, D - dynamic,
C - connect, S - static, r - rip, b - bgp, o - ospf, m - mme,
B - blackhole, U - unreachable, P - prohibit

DST-ADDRESS PREF-SRC GATEWAY DISTANCE

0 A S 0.0.0.0/0 180.94.88.9 1
1 A S 10.150.28.252/32 10.177.2.1 1
2 A S 10.150.28.253/32 10.177.2.1 1
3 ADC 10.177.2.0/24 10.177.2.201 SIP 0
4 S 10.177.2.0/24 SIP 1
5 ADC 172.20.0.0/22 172.20.3.254 ether10 0
6 ADC 172.20.4.0/22 172.20.7.254 ether9 0
7 ADC 172.20.8.0/22 172.20.11.254 ether8 0
8 ADC 172.20.12.0/22 172.20.15.254 ether7 0
9 ADC 172.20.16.0/22 172.20.19.254 VIP 0
10 ADC 180.0.0.0/8 180.94.88.14 ether1 0
11 ADC 192.168.70.0/24 192.168.70.254 ether4 0
12 ADC 192.168.90.0/24 192.168.90.254 ether5 0
13 ADC 192.168.100.0/24 192.168.100.254 Management 0
14 ADC 192.168.200.0/24 192.168.200.254 PBX

/interface print
0 R ;;; WAN
ether1 ether 1500 1580 10222
1 ;;; LAN
ether2 ether 1500 1580 10222
2 ether3 ether 1500 1580 10222
3 R ether4 ether 1500 1580 10222
4 R ether5 ether 1500 1580 10222
5 ether6 ether 1500 1580 10222
6 R ether7 ether 1500 1580 10222
7 R ether8 ether 1500 1580 10222
8 R ether9 ether 1500 1580 10222
9 R ether10 ether 1500 1580 10222
10 ether11 ether 1500 1580 10222
11 R ether12 ether 1500 1580 10222
12 sfp1 ether 1500 1580 10222
13 sfp2 ether 1500 1580 10222
14 sfp3 ether 1500 1580 10222
15 sfp4 ether 1500 1580 10222
16 R Management vlan 1500 1576
17 R PBX vlan 1500 1576
18 R SIP
/ ip address print
180.94.88.14/8 180.0.0.0 ether1
1 172.20.3.254/22 172.20.0.0 ether10
2 172.20.7.254/22 172.20.4.0 ether9
3 172.20.11.254/22 172.20.8.0 ether8
4 172.20.15.254/22 172.20.12.0 ether7
5 192.168.100.254/24 192.168.100.0 Management
6 192.168.70.254/24 192.168.70.0 ether4
7 192.168.90.254/24 192.168.90.0 ether5
8 192.168.200.254/24 192.168.200.0 PBX
9 172.20.19.254/22 172.20.16.0 VIP
10 10.177.2.201/24 10.177.2.0 SIP

This topic was automatically closed 30 days after the last reply. New replies are no longer allowed.