Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
pinging outside the network behind two routers
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
rodaz143
n00b
n00b


Joined: 17 Jan 2014
Posts: 4

PostPosted: Fri Jan 17, 2014 10:25 am    Post subject: pinging outside the network behind two routers Reply with quote

Hello everyone. As the topic states, I'm having some difficulty pinging outside my network. I have two routers set up. The master router, and the secondary router, which is acting as a wireless bridge. My Gentoo box is connected to the secondary router. I can ping both routers and all computers on the network, but nothing outside the local network. The main router's IP is 10.0.0.1 and the secondary router's IP is 10.0.0.254

Here is my /etc/conf.d/net:

Code:

config_enp1s0="10.0.0.253/24"
routes_enp1s0="default via 10.0.0.254"
dns_servers_enp1s0="10.0.0.1 8.8.8.8"

And the results of ip route show
Code:

default via 10.0.0.0/24 dev enp1s0 proto kernel scope link src 10.0.0.253
127.0.0.0/8 dev lo scope host

What am I doing wrong?
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Fri Jan 17, 2014 10:17 pm    Post subject: Reply with quote

rodaz143,

Welcome to Gentoo.

Test with
Code:
ping google.com
and
Code:
ping 173.194.34.96

If both fail, its a routing problem.
If the ping by name fails but ping by IP works, its a DNS issue.

Any error messages you get will be useful too.
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
Back to top
View user's profile Send private message
rodaz143
n00b
n00b


Joined: 17 Jan 2014
Posts: 4

PostPosted: Sat Jan 18, 2014 1:21 am    Post subject: Reply with quote

I'm getting this message by pinging the IP address
Code:
From 10.0.0.254: icmp_seq=1 Redirect Host(New nexthop: 10.0.0.1)

And obviously I can't ping any domains.



UPDATE:
well that's odd. I went to eat dinner and forgot that not only was I logged into the server from my laptop via ssh, I was also pinging (or rather, trying to ping) 8.8.8.8, Google's OpenDNS primary server. When I noticed it and stopped it, this was the output
Code:
PING 8.8.8.8 (8.8.8.8) 56(84) bytes of data.
64 bytes from 8.8.8.8: icmp_seq=1702 ttl=47 time=39.5 ms
^C
--- 8.8.8.8 ping statistics ---
13856 packets transmitted, 1 received, 99% packet loss, time 13855083ms
rtt min/avg/max/mdev = 39.589/39.589/39.589/0.000 ms
Back to top
View user's profile Send private message
lexflex
Guru
Guru


Joined: 05 Mar 2006
Posts: 363
Location: the Netherlands

PostPosted: Sat Jan 18, 2014 7:23 am    Post subject: Re: pinging outside the network behind two routers Reply with quote

rodaz143 wrote:
The master router, and the secondary router, which is acting as a wireless bridge.
Code:

config_enp1s0="10.0.0.253/24"
routes_enp1s0="default via 10.0.0.254"
dns_servers_enp1s0="10.0.0.1 8.8.8.8"

And the results of ip route show
Code:

default via 10.0.0.0/24 dev enp1s0 proto kernel scope link src 10.0.0.253
127.0.0.0/8 dev lo scope host

What am I doing wrong?


Hi,

It depends on whether your secondary 'router' is actually configured as a bridge or not.
If it is a bridge, I guess you cannot use it as the default gateway.
Maybe try to change the default routes /gateway to the IP address of your primary router. ( 10.0.0.1) .

One other thing to make sure: If you connect your computer directly to the primary router, everything does work? ( just to make sure nothing else is going on).


Alex.
Back to top
View user's profile Send private message
rodaz143
n00b
n00b


Joined: 17 Jan 2014
Posts: 4

PostPosted: Sat Jan 18, 2014 7:34 am    Post subject: Reply with quote

it's configured as a bridge according to
http://www.dd-wrt.com/wiki/index.php/Wireless_Bridge
It still doesn't work even if I set the main router as my default gateway. I tried plugging it into the main router directly and it worked fine.
Back to top
View user's profile Send private message
lexflex
Guru
Guru


Joined: 05 Mar 2006
Posts: 363
Location: the Netherlands

PostPosted: Sat Jan 18, 2014 7:51 am    Post subject: Re: pinging outside the network behind two routers Reply with quote

Mmm, strange, ' ip route show' in your case doesn't show the gateway but I guess it should (if I try it gives 'default via <correct IP>' )

rodaz143 wrote:

And the results of ip route show
Code:

default via 10.0.0.0/24 dev enp1s0 proto kernel scope link src 10.0.0.253
127.0.0.0/8 dev lo scope host



Can you try to set the default gateway using something like:
Code:
route add default gw 10.0.0.1 enp1s0

and try again ip show route to see if it make any difference ? ( i.e. if it then shows the gateway you defined? ).
Back to top
View user's profile Send private message
lexflex
Guru
Guru


Joined: 05 Mar 2006
Posts: 363
Location: the Netherlands

PostPosted: Sat Jan 18, 2014 7:58 am    Post subject: Reply with quote

One more thing, in /etc/conf.d/net:

Code:
config_enp1s0="10.0.0.253/24"


Shouldn't that be (in order to define the IP address):
Code:
config_enp1s0="10.0.0.253"

Or is this the way to define the netmask ?
Back to top
View user's profile Send private message
rodaz143
n00b
n00b


Joined: 17 Jan 2014
Posts: 4

PostPosted: Sat Jan 18, 2014 9:18 am    Post subject: Reply with quote

never mind, I think the issue may be with my slave router and the fact that it's set as a bridge. Looking at the main router's connected devices panel, it looks like the slave router was doing weird things with the server's IP, so I'm going to try messing with the slave router's configuration
Back to top
View user's profile Send private message
NeddySeagoon
Administrator
Administrator


Joined: 05 Jul 2003
Posts: 54237
Location: 56N 3W

PostPosted: Sat Jan 18, 2014 1:02 pm    Post subject: Reply with quote

lexflex,

Thats an alternate way to define the netmask.
Bold ways are valid syntax
_________________
Regards,

NeddySeagoon

Computer users fall into two groups:-
those that do backups
those that have never had a hard drive fail.
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
Page 1 of 1

 
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