Moving from WIFI to wired network

I had a tough time setting up the WIFI, but it is working good.
I now have a way to do this wired network.

What’s the best way to do this?

I was thinking to select re=set network config, disable WIFI, then reboot the device.
Add the network cable and use the wizard to setup the wired IP info.

Will the PI reconnect to the wifi once that has been re-enabled?

I believe you can just do reset wifi, and reboot, with ethernet cable plugged in, you should automatically get network to be up and running.

If for some reason that doesnt work and your wired network is not giving the Pi a dhcp IP, you may want to manually set the wired network by editing the file /etc/network/interfaces and putting the lines:

auto eth0
iface eth0 inet dhcp

To edit that file from console do:
sudo nano /etc/network/interfaces

when done adding those lines above, press ctrl+x , then y, then enter… let me know how it goes.

Thanks - I dont want to run into my last DHCP issue where the Comcast router was handing out ipv6. That “should” be fixed, but I don’t want to take chances.
I want it to have a static ip.

…and of course this isn’t working. It’s still holding onto the original ipv6 and will not show on the IPv4 network.

How can I completely disable ipv6? As of right now, it’s not reachable except locally.

You need to edit the following file: /etc/sysctl.conf
Type: sudo nano /etc/sysctl.conf
Add the following lines:

net.ipv6.conf.all.disable_ipv6=1
net.ipv6.conf.default.disable_ipv6=1
net.ipv6.conf.lo.disable_ipv6=1

Then to save the file, ctrl+x, y, enter.

done - rebooted. the splash screen still shows the IPv6 address and I am not able to ping my IPv4 that I set.

Sorry, but I just tested myself and adding the line to my sysctl.conf file does disable it for me…

This is what the top of my file looks like:

net.ipv6.conf.all.disable_ipv6 = 1
net.ipv6.conf.default.disable_ipv6 = 1
#
# /etc/sysctl.conf - Configuration file for setting system variables
# See /etc/sysctl.d/ for additional system variables.
# See sysctl.conf (5) for information.
#

I even commented out the default one and just left the line net.ipv6.conf.all.disable_ipv6 = 1
and I still got my ifconfig to not show ipv6 address…

ok…I will have another look at my file.

When you make your changes, does the splash screen update with the new IP for the console?

I redid that file. added the 2 lines at the top instead of the bottom. Rebooted and no-go. My splash screen still shows the ipv6 address.

@dan
Can you give me the output of the command: ifconfig

I just want to see if it is actually still enabled on the interface…

maybe this part is wrong…I don’t use dhcp, should this line be something else?
auto eth0
iface eth0 inet dhcp

ifconfig

This picture showing output of ifconfig proves ipv6 is not being disabled.
Are you editing the /etc/sysctl.conf file with sudo?
Aka, sudo nano /etc/sysctl.conf ?

Without restarting, can you post the output of that file:
cat /etc/sysctl.conf

How are you using static IP?
Is it being provided by the router via static IP reservation?
Or are you telling the Pi that it is static?

…because the default is dhcp and it is ok to use dhcp as long as you control the IP distribution from the router, by telling the router that the MAC address of the interface gets specific IP… sometimes it is easier to control IP distribution that way rather than making all the changes in the actual Pi…

The PI is static. I have a full static network and the PI is hard-coded to use an IP

cat_bottom

@dan
Sorry I forgot to tell you that when the output is too long it gets cut off the screen, so if you wrote the line to disable ipv6 on top of the file it wont show, since you are taking pictures and not sending screenshots, it would be easier to just run the command:

sudo nano /etc/sysctl.conf

and take a picture of the screen and it should show me the top of the file and what you wrote because this picture is only showing the end of the file.


Regarding the IP stuff, I am still wondering how you are hard coding the static IP on the Pi since we didn’t go over the /etc/network/interfaces file. Please also take a picture of what the screen shows after typing the command:

sudo nano /etc/network/interfaces

Also, to keep things simple, it would be good to turn OFF predictable network names because eth0 is not the actual name of your interface as you can see from the ifconfig showing “enxb…”
So that you can call the specific interfaces such as eth0 and deal with its configuration properly, you should turn this off, here are the steps and screenshots to follow along, very simple to do:
Type the command: sudo raspi-config
Select option 2, then N3 (network interfaces), then say No, press enter twice, then press tab until you reach the <Finish> selection then press enter, and then you should be back in console, a reboot will be necessary, which you already know how to do.

Screenshots:
image
image
image


References: https://wiki.debian.org/NetworkConfiguration , http://man7.org/linux/man-pages/man8/sysctl.8.html

nano_topof%20file

I have the ipv4 settings listed in the dhcpcd.conf file. I have not touched the network/interfaces files

Oh that explains it, you are using dhcpcd.conf
Just add this line to your /etc/dhcpcd.conf file:

ipv4only

save and reboot…