Active Diald does not work occasionally

I have a typical setup with a local network and a Linux server on a single phone line. I have diald and IP masq installed. It works great, but once in a few days diald makes the connection completely, but no IP traffic is possible. Here is some output:

#ping (the other end of connection)
ping: sendto: Operation not permitted
PING ( 56 data bytes
ping: wrote 64 chars, ret=-1

#ifconfig ppp0
ppp0      Link encap:Point-Point Protocol  
          inet addr:  P-t-P:
          UP POINTOPOINT RUNNING  MTU:1500  Metric:1
          RX packets:193 errors:0 dropped:0 overruns:0
          TX packets:237 errors:0 dropped:0 overruns:0

I am not even sure if the problem is with diald or IP masq.
Any suggestions?

Who is Participating?
I wear a lot of hats...

"The solutions and answers provided on Experts Exchange have been extremely helpful to me over the last few years. I wear a lot of hats - Developer, Database Administrator, Help Desk, etc., so I know a lot of things but not a lot about one thing. Experts Exchange gives me answers from people who do know a lot about one thing, in a easy to use platform." -Todd S.

Try the above again, from both your masqueraded machine, and from your directly connected machine. This will tell you whether the problem is with the masquerading setup, or the PPP link.

The output from route -n on both machihnes when the problem manifests would also be useful in tracking this one down.
simonffAuthor Commented:
Alas, I cannot ping from other machines - UDP is not allowed through the masq setup, and I cannot use ifconfig because they are Win 95 machines. The above output applied to the directly connected machine.
I will monitor the 'route -n' output when this strange thing happens again, but I do not quite like what I have even under the normal conditions (note the multiple entries). Here is our local network.

Fresh after reboot:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface UH    1      0        0 sl0   U     0      0        1 eth0       U     0      0        0 lo         U     1      0        0 sl0

While online:
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface UH    0      0        0 ppp0 UH    1      0        0 sl0 UH    0      0        1 ppp0   U     0      0      316 eth0       U     0      0      129 lo         U     0      0        3 ppp0         U     1      0      110 sl0
After a reboot, you have a route to your local network, using eth0, a loopback route, a host route to, using sl0, and a default route over sl0.

The last 2 are set by diald, and monitored - when a packet is routed over the sl0 interface, it brings the link up, and adds the ppp0 routes you seen in the second table.

You can see that you only have a route to the remote end of your ppp link ( when the link is up - the fake sl0 route goes to - when the link comes up diald sets up this route over the ppp0 interface. I would guess that the route you have to (your real route) is negotiated by the remote end of your link, and if the negotiation goes a little slow sometimes, then this route may not get registered, leaving outgoing packets on the ppp link trying to reach - an address which is on a different class C network, and will be unreachable, thus your error message.

Check you diald.conf, and look for that bogus ip address - if you replace that with, it'll probably cure your problem. You might also want to look in the /etc/syconfig/network-scripts directory, and set up to be your default gateway, to tidy up your routing table.

Experts Exchange Solution brought to you by

Your issues matter to us.

Facing a tech roadblock? Get the help and guidance you need from experienced professionals who care. Ask your question anytime, anywhere, with no hassle.

Start your 7-day free trial
OWASP Proactive Controls

Learn the most important control and control categories that every architect and developer should include in their projects.

simonffAuthor Commented:
Silly me... :) I had this bogus IP address as remote_IP in diald.conf... Thanks. Say, do you know where I can get wildmat sources or the whole implementation of XPAT command?
simonffAuthor Commented:
Oops, it was premature. I have just had the same problem again. See the routing table, it is quite good now. What else can be wrong?

Destination     Gateway         Genmask         Flags Metric Ref    Use Iface UH    0      0        1 ppp0 UH    1      0        0 sl0   U     0      0      263 eth0       U     0      0       77 lo         U     0      0        2 ppp0         U     1      0        4 sl0
Routing table looks fine to me now - I have a very similar setup, and my routing table looks just like that, so I'd say your routing is set up right.

You're getting 'Operation not permitted' as well, so that seems to suggest that something else is up. What you might want to do, is , next time the problem occurs, try running tcpdump on the ppp0 interface, then trying to ping. See if any packets go out at all - if they don't, something is wrong with the logic somewhere, as opposed to the physical connection being at fault. You could put diald into debug mode - add 'debug 31' to the end of your diald.conf - this logs *loads* of stuff to syslog, and might give you some pointers.
simonffAuthor Commented:
OK, here is something that I have caught during the last trouble period.

Diald debug messages (debug flags at 255, rule 30 is the very last one - accept any):
Jul  5 19:01:18 rrg diald[216]: filter accepted rule 30 proto 89 len 64 packet,0 =>,0
Jul  5 19:01:18 rrg diald[216]: Adding connection 134680648 @ 868114878 - timeout 30

Tcpdump results:
22:21:06.090000 > OSPFv2-hello 44: backbone [tos 0xc0] [ttl 1]
22:21:16.090000 > OSPFv2-hello 44: backbone [tos 0xc0] [ttl 1]
And so on...

Does that help to diagnose the problem, or should I run tcpdump in a more verbose mode?
It's more than this solution.Get answers and train to solve all your tech problems - anytime, anywhere.Try it for free Edge Out The Competitionfor your dream job with proven skills and certifications.Get started today Stand Outas the employee with proven skills.Start learning today for free Move Your Career Forwardwith certification training in the latest technologies.Start your trial today
Linux Networking

From novice to tech pro — start learning today.