I'm on a school network (dorm) with a predefined ip address, gateway address, DNS, and mask.


  1. I've burned Raspbian to a SD card.
  2. connected the Raspberry Pi to the wall with an ethernet cable.
  3. opened putty and inserted the ip address given to me by the school and.

Nothing happened... timeout.


  1. opened the SD card on the PC and added to the cmdline.txt ip=

  2. I then put the SD card in the Raspberry Pi and successfully connected to it through my PC. (Raspberry Pi connected to the wall and not directly to the PC)


enter image description here

So I altered the /etc/network/interfaces

Looks like this but without the comments! I then retried with the comments. I was always able to connect to it with putty in all cases. but the Raspberry won't connect to the outside world.

enter image description here

Also, after configuring the interfaces I removed the ip=... form the cmdline.txt. Same problem as I first stated at the beginning.

What am I missing here??

Also the Ethernet socket works just fine.

  • 2
    Campuses that use static IPs are likely to register the first MAC address that connects to the network using that IP and only white-list that MAC address. Ask the IT department to see if this is the case.
    – tlhIngan
    Jun 11, 2016 at 23:05
  • 1
    DO NOT post images they are almost illegible. Copy the text and paste this into your question.
    – Milliways
    Jun 11, 2016 at 23:08
  • just curious, are you sure that your campus give public ip instead of private ip? In my campus, we never get public ip, and we always get different private ip for each room/lab.
    – xdhe
    Jun 12, 2016 at 0:18
  • i have four plugs in the wall. i have two of them activated. they have different static ips. Jun 12, 2016 at 9:33
  • IMO, raspberry pi/computer network in general works by contacting router (if it's connected to the router, in your case it is) and then the router translating the private IP to the public IP so that your raspberry pi could connect to the internet. You only get public IP which is I could ping and get your location by looking through it, which is not supposed to.
    – xdhe
    Jun 12, 2016 at 10:33

3 Answers 3


If you're on the latest raspbian release, then you will edit the file /etc/dhcpcd.conf to configure a static address. The sample config has the lines # commented out, just insert what you need. Leave the /etc/network/interfaces/ COMPLETELY ALONE. It screws with dhcpcd service.


You don't specify which OS you are using but assuming Raspbian.

What you appear to have done appears to be based on old tutorials.

See How do I set up networking/WiFi/Static IP

I am surprise the school would have "given" you a static address. This is a nightmare for network maintainers.

Is there any reason you are not using DHCP?

  • isnt dhcp the default? i started with that at the beggining by not altering anything. after succefully scanning with nmap finding various hosts. i could not find the pi. Jun 12, 2016 at 9:35
  • @GeorgePamfillis Your question is vague (you have not listed basics - like output of ifconfig) and have described 2 different configurations and used a interfaces file which is invalid. You say you can't update. Did it work with the default DHCP configuration? If so you may have a networking problem, which may or may not be the Pi, but you need to provide more information.
    – Milliways
    Jun 12, 2016 at 10:03
  • no it did not work in the default configuration as stated in the first part of the question. Jun 12, 2016 at 10:06

You need to add before your line iface eth0 inet static a line with auto eth0.

Don't forget to put you DNS in /etc/resolv.conf file. Two lines with this nomenclature:

nameserver -> where is the ip of the DNS servers you want to use ( is a Google DNS and is valid if you want to use it, you can put as secondary

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.