Re: Setting the IP address on the Pi


Steve N4IRS
 

Mike,
I don't remember a issue with loading the network from boot, but I'm old and forget things. ;)

Most of the support programs (gateways etc) do get unhappy if they can't connect to the internet on startup. I built a service that holds off starting any of those services until the cost can connect to the internet.

Steve

On 11/4/2020 12:27 PM, Mike KB8JNM wrote:
I do not know if it is relevent or not.

I remember a issue with a needed delay on boot in networking preventing loading network properly on boot.

I tried a quick search to find it, but with to many results for me to look through in a available amount of time.

But perhaps my mention of it will jar someones memory of it.

On 11/4/2020 11:34 AM, Bob Brown wrote:
Update, with the help of Steve - N4IRS

Mornin' Steve, and all other ships at sea...

Well, I have had my Coffee and I made a few changes as suggested.

1. Here is what I did on the cmdline.txt file in the /boot/ directory

~~~~~~~~~~~~~~
console=serial0,115200 console=tty1 root=PARTUUID=ba1c0260-02 rootfstype=ext4
elevator=deadline fsck.repair=yes rootwait ipv6.disable=1
~~~~~~~~~~~~~~

It worked to disable the IPv6, I tried this first to see what happens, it disabled the IPv6 but the 169.xxx.xxx.xxx dhcp address stayed.

So I did the next step as the 2nd suggestion.

2. The is funny on this pi, the naming scheme "eth0" is not what it is called on this pi it is some long string of characters: "enxb827eb692453"

I did an "ifconfig" first to get the name of the eth0 interface.

I then copied that string "enxb827eb692453"
Replacing the "eth0" with the string "enxb827eb692453"

This I put at the end of the "/etc/dhcpcd.conf" file

~~~~~~~~~~~~~~~~
interface enxb827eb692453
static ip_address=10.20.20.10/24
static routers=10.20.20.254
static domain_name_servers=4.4.4.4 8.8.8.8
~~~~~~~~~~~~~~~~~

I did this editing with "sudo nano" then saved of course in both files...
Using nano by itself would not allow a save, I had to use sudo.

Then Rebooted and checked for IP change, It worked! :)

The end result was a static IPv4 address and no IPv6.

All for now

Many thanks to all that wrote back.

I hope this helps someone else.

Bob, W0NQX
aka DrSm0ke











Join main@DVSwitch.groups.io to automatically receive all group messages.