Still celebrating National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

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

Posted on 2009-05-13
4
Medium Priority
?
6,131 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
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 3
4 Comments
 
LVL 10

Accepted Solution

by:
lanboyo earned 2000 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

Learn Veeam advantages over legacy backup

Every day, more and more legacy backup customers switch to Veeam. Technologies designed for the client-server era cannot restore any IT service running in the hybrid cloud within seconds. Learn top Veeam advantages over legacy backup and get Veeam for the price of your renewal

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

This document is written for Red Hat Enterprise Linux AS release 4 and ORACLE 10g.  Earlier releases can be installed using this document as well however there are some additional steps for packages to be installed see Metalink. Disclaimer: I hav…
The purpose of this article is to demonstrate how we can upgrade Python from version 2.7.6 to Python 2.7.10 on the Linux Mint operating system. I am using an Oracle Virtual Box where I have installed Linux Mint operating system version 17.2. Once yo…
How to Install VMware Tools in Red Hat Enterprise Linux 6.4 (RHEL 6.4) Step-by-Step Tutorial
If you're a developer or IT admin, you’re probably tasked with managing multiple websites, servers, applications, and levels of security on a daily basis. While this can be extremely time consuming, it can also be frustrating when systems aren't wor…

705 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