LinuxQuestions.org
Share your knowledge at the LQ Wiki.
Home Forums Tutorials Articles Register
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 03-30-2005, 12:33 PM   #1
br_sriram
Member
 
Registered: Sep 2004
Posts: 30

Rep: Reputation: 15
Angry ping: sendmsg: operation not permitted


Dear Friends,

My Intel (865GBF) system runs Mandrake 10.0 Official. It was having one D-Link LAN Card and worked fine as our server. We wanted to attach an ADSL to it and so we have added another LAN Card (This time Realtek). The configuration of the new LAN Card is all right, i suppose. But, later, both of the LAN cards refuse to work. I have removed the new Lan Card but, still my Lan does not work.

I am able to ping 127.0.0.1 and the server IP 192.168.2.3 (original IP of the same server).

When I ping other machine on the Lan, I am getting the following error:

From 192.168.2.3 icmp_seq=1 Destination Host Unreachable
Ping: sendmsg: Operation not permitted

Anyone to help?
Thanks and regards,
Sriram.
 
Old 03-30-2005, 12:42 PM   #2
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Rep: Reputation: 33
Please post the output of "ifconfig"
 
Old 03-30-2005, 12:53 PM   #3
br_sriram
Member
 
Registered: Sep 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Thanks Avatar,

Here is the ifconfig result. As the server on which the linux runs is not networked, I had to type the ifconfig output manually to post it here.... ( So, please forgive the spelling mistakes, if any.
-----------
#ifconfig
eth0 Link encap:Ethernet HWaddr 00:80:48:35:EC:64
inet addr:192.168.2.3 Bcast:192.168.2.255 Mask: 255.255.255.0
inet6 addr: fe80::280:48ff:fe35:ec64/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:763 errors:0 dropped:0 overruns:0 frame:0
TX packets:10 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:61237 (59.8 Kb) TX bytes:678 (678.0 b)
Interrupt:18 Base address:0xec00

lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.255.255.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:16436 Metric:1
RX packets:62 errors:0 dropped:0 overruns:0 frame:0
TX packets:62 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:0
RX bytes:4598 (4.4 Kb) TX bytes:4598 (4.4 Kb)


-----------




Thanks in advance.
Sriram.
 
Old 03-30-2005, 01:13 PM   #4
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Rep: Reputation: 33
Well, everything looks good... except the mask for lo should be 255.0.0.0

Let's do the obvious first.. I assume you checked the cables are plugged in securely, and you have also tried a known good cable to the LAN switch.

I also assume you tried shutting down and restarting the server.

What is "route -n?" (sorry, this will mean more typing, but it might help)
 
Old 03-30-2005, 01:23 PM   #5
br_sriram
Member
 
Registered: Sep 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Hi Avatar,
Thanks for your quicker reply.

If I have to change the lo's Mask, how can I do that?

Secondly, the cable are tested and good ones. I restarted my Linux box several times. The output of 'route -n' is given below.

------
#route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
------

I think the output of route -n must be something more. But, I dont get any result than the above. I logged in as root user only to generate this empty output.!!!

Thanks and regards,
Sriram.
 
Old 03-30-2005, 01:36 PM   #6
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Rep: Reputation: 33
To change the mask for lo, type this
"ifconfig lo netmask 255.0.0.0"

Yes route -n should have some routes in it! Here is mine, for example.

Code:
[root@IBMFB1L0DH etc]# route -n
Kernel IP routing table
Destination     Gateway         Genmask         Flags Metric Ref    Use Iface
192.168.1.0     0.0.0.0         255.255.255.0   U     0      0        0 eth0
127.0.0.0       0.0.0.0         255.0.0.0       U     0      0        0 lo
0.0.0.0         192.168.1.1     0.0.0.0         UG    0      0        0 eth0
[root@IBMFB1L0DH etc]#
Note; my computer is a client, not a server.

try to add some routes to your routing table. More information can be found in the man pages for route, and here: http://linux-ip.net/html/tools-ip-route.html

"route add 192.168.2.0 netmask 255.255.255.0 gw 0.0.0.0"
"route add 127.0.0.0 netmask 255.0.0.0 gw 0.0.0.0"
"route add 0.0.0.0 netmask 0.0.0.0 gw 192.168.2.3"

Note; gateway for the last one should be the IP for whatever machine serves the Internet/DNS - if it's you, your own IP.

Try it and see if it helps.
 
Old 03-30-2005, 01:56 PM   #7
br_sriram
Member
 
Registered: Sep 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Avatar,
Thanks for your quick reply.

I applied ifconfig to change the netmask of lo. It did change the netmask.

I tried applying the commands "route add 192.168.2.0 netmask 255.255.255.0 gw 0.0.0.0" etc, but, it did not get through. I got the error message while running the above command.

It is :
---
route: netmask 000000ff doesn't make sense with host route.
---
The rest of the error message is the "man" pages of route.

Please help.

Thanks,
Sriram.
 
Old 03-30-2005, 02:09 PM   #8
br_sriram
Member
 
Registered: Sep 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Avatar,

I searched the man pages and found that 'route add' command example. I modified your command to look like the following.

--
route add -net 192.168.2.0 netmask 255.255.255.0 eth0
--
Note that I have added -net portion on your command and removed gw portion, instead added eth0. When I tried the above command, I got the following error:

---
SIOCADDRT: File exists
---


Please help.

Thanks,
Sriram.
 
Old 03-30-2005, 02:19 PM   #9
br_sriram
Member
 
Registered: Sep 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Avatar,

I read the man pages carefully and ran the commands to create routes. Now my route -n looks like this. What next has to be done? Can you makeout anything further?

----------
# route -n
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
192.168.2.0 0.0.0.0 255.255.255.0 U 0 0 0 eth0
127.0.0.0 0.0.0.0 255.0.0.0 U 0 0 0 lo
0.0.0.0 192.168.2.3 0.0.0.0 UG 0 0 0 eth0
----------

Please help.

Thanks,
Sriram.
 
Old 03-30-2005, 02:24 PM   #10
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Rep: Reputation: 33
Good, glad you got some routing tables set up. Now... what happens when you try to connect? Like if you try to ping another computer on the same subnet? Ping 192.168.2.XXX?
 
Old 03-30-2005, 02:28 PM   #11
br_sriram
Member
 
Registered: Sep 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Avatar,

When I ping'ed 192.168.2.80, I got the following (same) reply.
-----
Ping: sendmsg: Operation not permitted
From 192.168.2.3 icmp_seq=1 Destination Host Unreachable.
-----
Please help.

Thanks,
Sriram.
 
Old 03-30-2005, 02:31 PM   #12
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Rep: Reputation: 33
Also make sure your "named" service is running (DNS)
 
Old 03-30-2005, 02:32 PM   #13
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Rep: Reputation: 33
Blast! Hm.... don't worry we will find the solution just give me a moment
 
Old 03-30-2005, 02:35 PM   #14
br_sriram
Member
 
Registered: Sep 2004
Posts: 30

Original Poster
Rep: Reputation: 15
Avatar,
Thank you very much for your help and hopes.

But, how to find out if the named service is running?

Thanks,
Sriram.
 
Old 03-30-2005, 02:38 PM   #15
Avatar
Member
 
Registered: May 2001
Location: Canada
Distribution: old ones
Posts: 555

Rep: Reputation: 33
What about IPTABLES? Do you have a firewall running and if so, try clearing it. Check with the command "iptables -L INPUT" and "iptables -L OUTPUT" to see if there are any DENY rules.

(More on iptables command options: http://www.faqs.org/docs/iptables/commands.html)
 
  


Reply



Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
Can't ping localhost (ping: sendto: Operation not permitted) mentor99us Linux - Networking 7 09-05-2012 02:11 PM
Operation not permitted jakkals Linux - General 3 09-26-2005 07:30 PM
su - operation not permitted jrtayloriv Linux - Newbie 2 06-09-2005 09:27 PM
operation not permitted jamaso Slackware 2 05-08-2004 05:55 AM
Operation not permitted FrozenShadow23 Linux - Newbie 6 10-05-2003 05:13 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:22 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration