Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
it doest't ping my router correctly
View unanswered posts
View posts from last 24 hours

Goto page 1, 2  Next  
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 666

PostPosted: Mon Nov 08, 2004 9:15 pm    Post subject: it doest't ping my router correctly Reply with quote

I have problems with my network. This is my route -n configuration:
Destination gateway genmask flags use iface
192.168.1.0 0.0.0.0 255.255.255.0 U 0 eth0
127.0.0.0 127.0.0.1 255.0.0.0 UG 0 lo

When I tryed to ping 192.168.1.3 (my comp IP) it pinged it OK, but the problem is when I tryed to ping 192.168.1.1 (my router IP), it did not work properly. It gave me an error that the destination host is unreachable. I set everything correctly and it should work, but is don't. Does anybody know what the problem is?
Back to top
View user's profile Send private message
smutt
n00b
n00b


Joined: 23 Aug 2003
Posts: 51
Location: Utrecht, Netherlands

PostPosted: Mon Nov 08, 2004 10:40 pm    Post subject: Reply with quote

As far as your Linux box is concerned there is no difference between .1 and .3. Check to make sure there is no problem with your router. If everything looks good there then check out your arp entries with
Code:

arp -a


This will show you what arp entries you have. If you know the MAC address of the interface on your router you can manually enter an arp entry with

Code:
 
arp -s 192.168.1.1 (ROUTERMAC)


This will help if for some reason your Linux box can't arp for the MAC address of the router.

And of course you can always use a sniffer as well.
Can you ping the router from other hosts on the same subnet as your Linux box?


--Smutt
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 666

PostPosted: Mon Nov 08, 2004 11:07 pm    Post subject: Reply with quote

My router work just fine. This doesn't seem to work. I did this arp -s 192.168.1.1 (ROUTERMAC) and still don't work. Now if I use arp -a I get this:
? (192.168.1.1) at 00:0A:CD:05:E2:82 {ETHER} PERM on eth0

Can you help me?
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 666

PostPosted: Tue Nov 09, 2004 5:42 am    Post subject: Reply with quote

Anybody?
Back to top
View user's profile Send private message
smutt
n00b
n00b


Joined: 23 Aug 2003
Posts: 51
Location: Utrecht, Netherlands

PostPosted: Tue Nov 09, 2004 9:05 am    Post subject: Reply with quote

Did you look at your arp entries before you added the permanent one? It would be interesting to know whether the Linux box can get the MAC via arp normally.

Also have you tried pinging the router from another host on the same subnet?

--Smutt
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 666

PostPosted: Tue Nov 09, 2004 1:02 pm    Post subject: Reply with quote

Before I added the permanent one (arp), there in arp -a was nothing. I don't really know if this is normal, but can you explain it to me?

The router pings nornally when I ping it from another host in tha same subnet.

Do you have any oter idea what to do, that this will work?
Back to top
View user's profile Send private message
befa
Apprentice
Apprentice


Joined: 28 Oct 2004
Posts: 208
Location: rennes

PostPosted: Tue Nov 09, 2004 3:24 pm    Post subject: Reply with quote

you got to add a default gateway in your comp route-table to your router
Code:
 route add default gw ip_router


tell us if it's the solution...

p.s: sorry for my bad english ;) i try my best to improve it! :)
_________________
Open Minds! Open Sources! Open Future!
think_tux@jabber.org
Back to top
View user's profile Send private message
smutt
n00b
n00b


Joined: 23 Aug 2003
Posts: 51
Location: Utrecht, Netherlands

PostPosted: Tue Nov 09, 2004 4:21 pm    Post subject: Reply with quote

When you send IP traffic(like ping) your Linux box first arp's to get the MAC address of the device you are sending to. It broadcasts a query to all devices locally attached asking who has the destination IP address. Then it encapsulates the IP packet in an Ethernet frame with the MAC address it got from the arp. If the dest device is not on the same subnet as you then it asks for its gateways MAC.

These arp entries are stored in a table in the Linux kernel and timeout after a while. To see if your Linux box is getting a reply from your router attempt a ping first and then arp -a immediately afterwards. If there is something in the arp table that means your Linux box got a reply from the router when it queried for the router's IP via arp. So do you see anything in your arp table?

Some more questions:
Can you ping other devices on the same subnet from your Linux box?
What devices are between your router and your Linux box?

--Smutt
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 666

PostPosted: Tue Nov 09, 2004 5:45 pm    Post subject: Reply with quote

After pimgimg my router (a92.168.1.1) there is something in arp -a (but before there wasn't). Its this:
? 192.168.1.1 at <incomplete> on eth0

I can ping my computers IP (192.168.1.3) normally and I can't ping other computers in my network (because they are connected into router - all the computers in my subnet is connected directly into router and the router is the reason for failure of pinging other computers, because the command must passed router, which in this care don't seem to be working).
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 666

PostPosted: Tue Nov 09, 2004 6:06 pm    Post subject: Reply with quote

I figured something. My MAC address is 00:0A:CD:05:E2:82, but in my ifconfig, there are line that is like this: HWaddr 00:0C:29:89:D8:E5. Maybe that is the problem, that the eth0 has wrong MAC address. But I entered mine real MAC address, I don't kno ehere this come from. Does this help a bit, do you know what the problem is?
Back to top
View user's profile Send private message
OdinsDream
Veteran
Veteran


Joined: 01 Jun 2002
Posts: 1057

PostPosted: Tue Nov 09, 2004 7:18 pm    Post subject: Reply with quote

Is your router set to reply to pings?
_________________
s/(?<!gnu\/)linux(?! kernel)/GNU\/Linux/gi

Don't blame me. I didn't vote for him.

http://john.simplykiwi.com
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 666

PostPosted: Tue Nov 09, 2004 8:15 pm    Post subject: Reply with quote

Yes it is. It ping just fine under other computers. Any idea what to do?
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 666

PostPosted: Wed Nov 10, 2004 1:03 pm    Post subject: Reply with quote

Does anybody even have a clue what the problem might be, that I at least know what the problem is? A router can't be the problem, bacause it is workinig just fine!
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 666

PostPosted: Wed Nov 10, 2004 6:59 pm    Post subject: Reply with quote

I just remembered one information that might help, but I am not sure. On my network, I don't run dhcp, for avtomatic configuration of IP addresses, I configured them by hand. Does this help a bit? I really need this to work!! I would appreciate some answers.
Back to top
View user's profile Send private message
OdinsDream
Veteran
Veteran


Joined: 01 Jun 2002
Posts: 1057

PostPosted: Wed Nov 10, 2004 11:15 pm    Post subject: Reply with quote

Is the gateway set up correctly? I'm at a loss... sorry! Could you try using DHCP for awhile to see if it fixes your problem?
_________________
s/(?<!gnu\/)linux(?! kernel)/GNU\/Linux/gi

Don't blame me. I didn't vote for him.

http://john.simplykiwi.com
Back to top
View user's profile Send private message
befa
Apprentice
Apprentice


Joined: 28 Oct 2004
Posts: 208
Location: rennes

PostPosted: Wed Nov 10, 2004 11:30 pm    Post subject: Reply with quote

can you put your
Code:
 /etc/conf.d/net


check if you have that line [code] gateway="eth0/192.168.1.1"
if not add it then restart your network
[code]/etc/init.d./net.eth0 restart[/code]
_________________
Open Minds! Open Sources! Open Future!
think_tux@jabber.org
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 666

PostPosted: Thu Nov 11, 2004 2:46 pm    Post subject: Reply with quote

I have that line, still doesn't work. Any new ideas? And even the dhcp doesn't work, so that isn't the problem.
Back to top
View user's profile Send private message
befa
Apprentice
Apprentice


Joined: 28 Oct 2004
Posts: 208
Location: rennes

PostPosted: Thu Nov 11, 2004 2:51 pm    Post subject: Reply with quote

is your router a gateway aswell?
_________________
Open Minds! Open Sources! Open Future!
think_tux@jabber.org
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 666

PostPosted: Thu Nov 11, 2004 2:58 pm    Post subject: Reply with quote

Yes it is!
Back to top
View user's profile Send private message
befa
Apprentice
Apprentice


Joined: 28 Oct 2004
Posts: 208
Location: rennes

PostPosted: Thu Nov 11, 2004 3:03 pm    Post subject: Reply with quote

you have iptables on your gateway?
_________________
Open Minds! Open Sources! Open Future!
think_tux@jabber.org
Back to top
View user's profile Send private message
OdinsDream
Veteran
Veteran


Joined: 01 Jun 2002
Posts: 1057

PostPosted: Thu Nov 11, 2004 3:35 pm    Post subject: Reply with quote

I think this thread is lacking a solid understanding of your network layout. Can you describe it from the source to your computer? What devices do you have, and how are they plugged in to one another?
_________________
s/(?<!gnu\/)linux(?! kernel)/GNU\/Linux/gi

Don't blame me. I didn't vote for him.

http://john.simplykiwi.com
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 666

PostPosted: Thu Nov 11, 2004 3:56 pm    Post subject: Reply with quote

Iptables hmmmmmm, I don't know. I don't even know, what this is! My router is working just fine and it understannds just fine with my computer, because my network on comuter is workink correctly (BTW: I run gentoo linux with vmware in this computer on whis network is working just fine).
Back to top
View user's profile Send private message
OdinsDream
Veteran
Veteran


Joined: 01 Jun 2002
Posts: 1057

PostPosted: Fri Nov 12, 2004 1:51 am    Post subject: Reply with quote

Ah! VMware may be your issue! It handles networking by acting as its own NATed network. I'm not sure if it passes pings along correctly.
_________________
s/(?<!gnu\/)linux(?! kernel)/GNU\/Linux/gi

Don't blame me. I didn't vote for him.

http://john.simplykiwi.com
Back to top
View user's profile Send private message
eleanor
l33t
l33t


Joined: 01 Nov 2004
Posts: 666

PostPosted: Fri Nov 12, 2004 12:09 pm    Post subject: Reply with quote

Yes I am aware of that, but it should still work. If not pinging, the WAN would have to work.
Back to top
View user's profile Send private message
OdinsDream
Veteran
Veteran


Joined: 01 Jun 2002
Posts: 1057

PostPosted: Fri Nov 12, 2004 2:13 pm    Post subject: Reply with quote

I haven't used VMware in quite some time, but I'd suggest reviewing the VMware network settings, also make sure that the virtual IP address of your virtual Gentoo installation is on a different subnet from your actual private IP addresses.
_________________
s/(?<!gnu\/)linux(?! kernel)/GNU\/Linux/gi

Don't blame me. I didn't vote for him.

http://john.simplykiwi.com
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Goto page 1, 2  Next
Page 1 of 2

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum