Page 1 of 1

grep gateway

Posted: Fri Aug 23, 2013 6:14 pm
by rjobaan
i dont see my gateway when running:

root@raspbmc:~# sudo grep gateway /etc/network/interfaces
root@raspbmc:~#

Re: grep gateway

Posted: Fri Aug 23, 2013 6:33 pm
by itimpi
If you are set to use DHCP then the gateway would not be listed as it is retrieved via DHCP.

Re: grep gateway

Posted: Fri Aug 23, 2013 6:39 pm
by rjobaan
how can i check that if I use DHCP?

Re: grep gateway

Posted: Fri Aug 23, 2013 6:52 pm
by smithg400

Code: Select all

ip route show
will show the whole routing table (which will contain the default route - which is what gateway sets). Alternatively

Code: Select all

ip route show to exact 0/0
will just show the default route.

Re: grep gateway

Posted: Fri Aug 23, 2013 6:52 pm
by rpdom
rjobaan wrote:how can i check that if I use DHCP?
Use the command "ip route" and see what the default line shows.

Re: grep gateway

Posted: Fri Aug 23, 2013 6:57 pm
by rjobaan
thanks all