1

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

DEFAULT CONFIGURATION

  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.

Next

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

  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)

THE PROBLEM IS NOW IT WONT UPDATE-UPGRADE

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 '16 at 23:05
  • 1
    DO NOT post images they are almost illegible. Copy the text and paste this into your question. – Milliways Jun 11 '16 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 '16 at 0:18
  • i have four plugs in the wall. i have two of them activated. they have different static ips. – George Pamfilis Jun 12 '16 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 '16 at 10:33
1

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.

0

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. – George Pamfilis Jun 12 '16 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 '16 at 10:03
  • no it did not work in the default configuration as stated in the first part of the question. – George Pamfilis Jun 12 '16 at 10:06
0

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 8.8.8.8 -> where 8.8.8.8 is the ip of the DNS servers you want to use (8.8.8.8 is a Google DNS and is valid if you want to use it, you can put as secondary 8.8.4.4).

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

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