Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
IP Address Confusion [SOLVED]
#11
(10-20-2019, 02:40 AM)leon.p Wrote:
(10-20-2019, 12:51 AM)Jeremiah Wrote: So my family doesn't actually own our router. We rent it from our ISP (Mediacom). I am not sure how to do this with a router that I don't know the exact credentials for.

Since you apparantly have little to no way of configuring the network, setting up a static IP for your Pi might actually be impossible. Usually I would say that assigning a static IP should be doable via the webinterface, but according to SRWs research, this might not be the case here. I personally find that rather weird, but it seems like ISPs allowed to take a lot more freedom away from the user outside of europe.

Like I said before, this occured after a reinstallation of Raspbian Buster. In my previous installation of the same operating system, this all worked. I would like to think that this is a problem with the new installation, not the router.

(10-20-2019, 05:43 PM)spudnuts Wrote: So I am going to guess that your modem/router defaults to running dhcp because most do, but you can't change the .conf file for whatever reason.
What I am going to suggest is they may not have set the internal dhcp on the router as authoritative, if so you can have your deamon override it by adding the line authoritative at the beginning of the file on your dhcp server like so:


A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

#Set this server as official DHCP server for this network.
authoritative;

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
hostname


After adding that to the .conf file restart your dhcp and restart your Pi afterwards.
(If it causes problems you can comment it back out.)

I am sorry, I don't quite understand what you are talking about here. I actually know very little about DHCP and how my router works. I just know how to setup a static IP and change end settings.
Just a teen who LOVES working with computers
Reply
#12
Looking at your dhcpcd.conf, I noticed that you did not have /24 at the end of your ip addresses to indicate the net mask. See the examples above your configs. /24 at the end of the address is equivalent to a netmask of 255.255.255.0 ( note your ifconfiig ouput).

Code:
interface eth0
static ip=192.168.0.29/24
static routers=192.168.0.1
static domain_name_servers=1.1.1.1 1.0.0.1
noipv6

interface wlan0
static ip=192.168.0.30/24
static routers=192.168.0.1
static domain_name_servers=1.1.1.1 1.0.0.1
noipv6

It appears that since the system can't determine the netmask, it may be ignoring your configuration and DHCP just happens to be assigning those addresses that way.

Hope this helps.
Reply
#13
(10-21-2019, 01:43 AM)rickromig Wrote: Looking at your dhcpcd.conf, I noticed that you did not have /24 at the end of your ip addresses to indicate the net mask.  See the examples above your configs. /24 at the end of the address is equivalent to a netmask of 255.255.255.0 ( note your ifconfiig ouput).

Code:
interface eth0
static ip=192.168.0.29/24
static routers=192.168.0.1
static domain_name_servers=1.1.1.1 1.0.0.1
noipv6

interface wlan0
static ip=192.168.0.30/24
static routers=192.168.0.1
static domain_name_servers=1.1.1.1 1.0.0.1
noipv6

It appears that since the system can't determine the netmask, it may be ignoring your configuration and  DHCP just happens to be assigning those addresses that way.

Hope this helps.

So should I delete the /24? I origonally set up the static ip through the networkmanager gui to make things easier for me, then changed what it set as "inform" to "static ip" since the Pi couldn'connect to the internrt with "inform" placed there.
Just a teen who LOVES working with computers
Reply
#14
(10-21-2019, 12:06 PM)Jeremiah Wrote:
(10-21-2019, 01:43 AM)rickromig Wrote: Looking at your dhcpcd.conf, I noticed that you did not have /24 at the end of your ip addresses to indicate the net mask.  See the examples above your configs. /24 at the end of the address is equivalent to a netmask of 255.255.255.0 ( note your ifconfiig ouput).

Code:
interface eth0
static ip=192.168.0.29/24
static routers=192.168.0.1
static domain_name_servers=1.1.1.1 1.0.0.1
noipv6

interface wlan0
static ip=192.168.0.30/24
static routers=192.168.0.1
static domain_name_servers=1.1.1.1 1.0.0.1
noipv6

It appears that since the system can't determine the netmask, it may be ignoring your configuration and  DHCP just happens to be assigning those addresses that way.

Hope this helps.

So should I delete the /24? I origonally set up the static ip through the networkmanager gui to make things easier for me, then changed what it set as "inform" to "static ip" since the Pi couldn'connect to the internrt with "inform" placed there.
I'm not familiar with Raspian Debian but I did notice that in your dhcpcd.conf file you had left off the "/24". That should be at the end of the address you want to assign (according to the examples provided in the file).
Reply
#15
Ok now I am confused where exactly did you get that dhcpcd.conf file from if not a dhcp server ?
Reply
#16
The dhcpcd.conf file was from the pi's /etc folder, where I origonally configured the static ip.
Just a teen who LOVES working with computers
Reply
#17
Do you also have a dhcp-probe folder/file as well ?
Reply
#18
Doesn't appear so.

Code:
$ ls /etc | grep "dhcp-probe"
$
Just a teen who LOVES working with computers
Reply
#19
Ok imma make a vbox and see if I can figure it out.
Reply
#20
Ok here is what I ended up doing to get the ip addresses to come up right.

I changed this part of the file:

# fallback to static profile on eth0
#interface eth0
#fallback static_eth0

interface eth0
static ip=192.168.0.29
static routers=192.168.0.1
static domain_name_servers=1.1.1.1 1.0.0.1
noipv6

interface wlan0
static ip=192.168.0.30
static routers=192.168.0.1
static domain_name_servers=1.1.1.1 1.0.0.1
noipv6

to this:

# fallback to static profile on eth0
#interface eth0
#fallback static_eth0

interface eth0
clientid b8:27:eb:b8:01:b2
static ip_address=192.168.0.159/24

interface wlan0
clientid b8:27:eb:ed:54:e7
static ip_address=192.168.0.160/24

then I rebooted and after it had come back up I changed the file to this:

# fallback to static profile on eth0
#interface eth0
#fallback static_eth0

interface eth0
clientid b8:27:eb:b8:01:b2
static ip_address=192.168.0.29/24

interface wlan0
clientid b8:27:eb:ed:54:e7
static ip_address=192.168.0.30/24

and rebooted again and the addresses were correct.

I had to do it that way to force it to change to the right address.
The clientid is the MAC address of the interfaces, I took them from your posting so they should be correct for your machine.
I only used the 3 lines I did because it should autofill the other info from the dhcp server, the 3 lines I used are just telling the dhcp server to use the specific addresses I want from the clientside instead of the serverside. If it ends up needing router and dns specified you can add the other lines back in.
Reply


Forum Jump:


Users browsing this thread: 1 Guest(s)