rjobaan
Posts: 53
Joined: Sun Aug 18, 2013 1:07 pm

grep gateway

Fri Aug 23, 2013 6:14 pm

i dont see my gateway when running:

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

itimpi
Posts: 1089
Joined: Sun Sep 25, 2011 11:44 am
Location: Potters Bar, United Kingdom
Contact: Website

Re: grep gateway

Fri Aug 23, 2013 6:33 pm

If you are set to use DHCP then the gateway would not be listed as it is retrieved via DHCP.

rjobaan
Posts: 53
Joined: Sun Aug 18, 2013 1:07 pm

Re: grep gateway

Fri Aug 23, 2013 6:39 pm

how can i check that if I use DHCP?

smithg400
Posts: 148
Joined: Sat Dec 24, 2011 3:37 pm

Re: grep gateway

Fri Aug 23, 2013 6:52 pm

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.

User avatar
rpdom
Posts: 15199
Joined: Sun May 06, 2012 5:17 am
Location: Chelmsford, Essex, UK

Re: grep gateway

Fri Aug 23, 2013 6:52 pm

rjobaan wrote:how can i check that if I use DHCP?
Use the command "ip route" and see what the default line shows.

rjobaan
Posts: 53
Joined: Sun Aug 18, 2013 1:07 pm

Re: grep gateway

Fri Aug 23, 2013 6:57 pm

thanks all

Return to “Troubleshooting”