Solved

ping: sendmsg:Invalid argument - resolved if adding to the routing table?

Posted on 2009-05-13
4
4,918 Views
Last Modified: 2013-12-06
Having a weird problem with pinging some (but not all) servers:

[root@azproduction root]# ping e.mx.mail.yahoo.com
PING e.mx.mail.yahoo.com (216.39.53.1) from 192.168.10.11 : 56(84) bytes of data.
ping: sendmsg: Invalid argument
ping: sendmsg: Invalid argument
ping: sendmsg: Invalid argument

--- e.mx.mail.yahoo.com ping statistics ---
3 packets transmitted, 0 received, 100% loss, time 2014ms


For reference, the routing table before:
[root@azproduction root]# route
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
90.0.0.0        *               255.255.255.0   U     0      0        0 eth0
192.168.10.0    *               255.255.255.0   U     0      0        0 eth1
127.0.0.0       *               255.0.0.0       U     0      0        0 lo
128.0.0.0       192.168.10.3    128.0.0.0       UG    0      0        0 ipsec0
default         192.168.10.3    0.0.0.0         UG    0      0        0 eth1

Add the entry:
[root@azproduction root]# route add -host 216.39.53.1 gw 192.168.10.3

Try again:
[root@azproduction root]# ping e.mx.mail.yahoo.com
PING e.mx.mail.yahoo.com (216.39.53.1) from 192.168.10.11 : 56(84) bytes of data.
64 bytes from mta-v12.mail.vip.re4.yahoo.com (216.39.53.1): icmp_seq=1 ttl=54 time=108 ms
64 bytes from mta-v12.mail.vip.re4.yahoo.com (216.39.53.1): icmp_seq=2 ttl=54 time=108 ms
64 bytes from mta-v12.mail.vip.re4.yahoo.com (216.39.53.1): icmp_seq=3 ttl=54 time=108 ms
64 bytes from mta-v12.mail.vip.re4.yahoo.com (216.39.53.1): icmp_seq=4 ttl=54 time=107 ms

--- e.mx.mail.yahoo.com ping statistics ---
4 packets transmitted, 4 received, 0% loss, time 3006ms
rtt min/avg/max/mdev = 107.453/108.124/108.496/0.566 ms

Then, it is working as expected.

One server, 192.168.10.3 is the access point to the internet for the rest of the machines.  It has two interfaces with the first of which being our public IP address.  Various ports are forwarded to the other internal machines from this external address.  The network was kind of an emergency thing, we had the main firewall just up and die, I will have a replacement tomorrow but we're dead in the water for mail off this server.  Before, things were OK.  Below is the forwarding table if that is of any help.  The machine we're looking at above is 192.168.10.11

Incoming port      Routed to IP      Routed to port
990/tcp      192.168.10.5      990/tcp
554/tcp      192.168.10.5      554/tcp
21/tcp      192.168.10.5      21/tcp
8001/tcp      192.168.10.11      8001/tcp
25/tcp      192.168.10.11      25/tcp
22/tcp      192.168.10.11      22/tcp
1352/tcp      192.168.10.11      1352/tcp
1025/tcp      192.168.10.11      25/tcp
8088/tcp      192.168.10.10      8088/tcp
8084/tcp      192.168.10.10      8084/tcp
8083/tcp      192.168.10.10      8083/tcp
8082/tcp      192.168.10.10      8082/tcp
8081/tcp      192.168.10.10      8081/tcp
80/tcp      192.168.10.10      80/tcp
3101/tcp      192.168.10.10      3101/tcp
1533/tcp      192.168.10.10      1533/tcp
1433/tcp      192.168.10.10      1433/tcp
3389/tcp      192.168.10.1      3389/tcp

Other things I can ping and it doesn't have an issue:
[root@azproduction root]# ping 4.2.2.2
PING 4.2.2.2 (4.2.2.2) from 192.168.10.11 : 56(84) bytes of data.
64 bytes from 4.2.2.2: icmp_seq=1 ttl=57 time=51.5 ms
64 bytes from 4.2.2.2: icmp_seq=2 ttl=57 time=51.3 ms
64 bytes from 4.2.2.2: icmp_seq=3 ttl=57 time=50.7 ms

--- 4.2.2.2 ping statistics ---
3 packets transmitted, 3 received, 0% loss, time 2004ms
rtt min/avg/max/mdev = 50.780/51.247/51.598/0.432 ms
[root@azproduction root]#


Any ideas?

Thank you in advance.
0
Comment
Question by:tlmacr
  • 3
4 Comments
 
LVL 10

Accepted Solution

by:
lanboyo earned 500 total points
ID: 24380308
This route is causing the problem

128.0.0.0       192.168.10.3    128.0.0.0       UG    0      0        0 ipsec0

It says to send every ip destination above 127.255.255.255 to the ipsec0 interface, but send it to your normal gateway as a first hop. Since your normal gateway is not on the ipsec interface... it gives you a protocol invalid message. This route is more specifig (by a single bit) than the ddefault route, but is less specific than almost any other route, like your local networks and the /32 you put in for yahoo.

You can down the ipsec interface, or fix its netmask.

Don't know what happens to it if you don't have ipsec running....

You can fix the imediate problem with a few broad route statements,

route add -net  0.0.0.0 64.0.0.0 gw 192.168.10.3
route add -net  64.0.0.0 64.0.0.0 gw 192.168.10.3
route add -net  128.0.0.0 64.0.0.0 gw 192.168.10.3
route add -net  196.0.0.0 64.0.0.0 gw 192.168.10.3

But this is more specific than the ipsec interface, and will break it if it is doing anything. Maybe set it for

route add -net  128.0.0.0 255.0.0.0  ipsec0

and hope for the best.

0
 
LVL 10

Expert Comment

by:lanboyo
ID: 24380782
Actually that one route shpuld be

route add -net  192.0.0.0 64.0.0.0 gw 192.168.10.3
0
 
LVL 10

Expert Comment

by:lanboyo
ID: 24402627
Did any of this work.
0
 

Author Comment

by:tlmacr
ID: 24406720
Yes, we just had to down the ipsec0 interface and everything snapped back into place!  Thanks again, great to have this problem over with.
0

Featured Post

Threat Intelligence Starter Resources

Integrating threat intelligence can be challenging, and not all companies are ready. These resources can help you build awareness and prepare for defense.

Join & Write a Comment

Suggested Solutions

In order for businesses to be compliant with certain information security laws in some countries, you need to be able to prove that a user (which user it was becomes important to the business to take action against the user after an event has occurr…
This article will explain how to establish a SSH connection to Ubuntu through the firewall and using a different port other then 22. I have set up a Ubuntu virtual machine in Virtualbox and I am running a Windows 7 workstation. From the Ubuntu vi…
This video discusses moving either the default database or any database to a new volume.
Illustrator's Shape Builder tool will let you combine shapes visually and interactively. This video shows the Mac version, but the tool works the same way in Windows. To follow along with this video, you can draw your own shapes or download the file…

747 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question

Need Help in Real-Time?

Connect with top rated Experts

13 Experts available now in Live!

Get 1:1 Help Now