1

I have connected my raspberry pi 3 (running Raspbian) to my company's wifi network. It has connected to wifi, but there is no internet access. I cannot ping also.

I did following modification in my /etc/network/interfaces

source-directory /etc/network/interfaces.d
auto wlan0
iface eth0 inet manual
allow-hotplug wlan0
iface wlan0 inet manual
    wpa-roam /etc/wpa_supplicant/wpa_supplicant.conf

iface default inet manual

but it does not works.

Company has given an static ip for my raspberry pi. 172.16.100.13 But if I make a hotspot from my mobile phone and if I connect to that hotspot from my raspberry pi I can access internet. I have put my mac address also to the company's router. It ping to only the ip addresses in range of 172.16.x.x. It does not ping to any other ip address or at least www.google.com.

what can I do?

4
  • 1
    Try using supported settings rather than the bizarre settings listed
    – Milliways
    Commented Mar 14, 2019 at 9:16
  • Can your work PC ping (e.g.) www.google.com? It might be that your company doesn't allow unfettered internet access and you need to use a proxy. Can your Pi ping devices inside the company, e.g. your PC?
    – Mark Smith
    Commented Mar 14, 2019 at 9:23
  • It has the ip 172.16.100.13 It can ping to ips which are in 172.x.x.x range.. Eg- my laptop's ip is 172.16.20.77. I can ping to my laptop from Pi. But my server is 10.210.12.158. So I cannot ping. ping www.google.com is also not working. when i run ping www.google.com or ping 10.210.12.158 it says network is unreachable. Commented Mar 14, 2019 at 9:30
  • I can ping to any ip or any address from my laptop. so no issues with company Commented Mar 14, 2019 at 9:33

1 Answer 1

1

I assume you are using Raspbian Stretch. You should respect what's written in /etc/network/interfaces:

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

You should just use the Example static IP configuration: given in /etc/dhcpcd.conf to set your static ip_address, static routers and static domain_name_servers. All settings are important if you really want to be static. If you don't know them ask your network admin. Or simply use DHCP.

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Not the answer you're looking for? Browse other questions tagged or ask your own question.