My Pi is connected to my router by Ethernet.
Attempting to set up a static IP address for my Pi, I added the following lines to
interface eth0 static ip_address=192.168.0.2/24 static routers=192.168.0.1 static domain_name_servers=192.168.0.1 interface wlan0 static ip_address=192.168.0.2/24 static routers=192.168.0.1 static domain_name_servers=192.168.0.1
I rebooted and found that I couldn't connect to my Pi with SSH using
192.168.0.2 as the IP address. I connected to my router and found that the Pi appeared to be connected by Ethernet but with the following IP address:
fe80::340b:6d47:32d:fb60. I am able to connect to my Pi via SSH using this address. There's a (6) icon next to this address which makes me think that the issue is to do with IPv6 vs. IPv4. I notice that in the example static IP adress configuration there's a field called
static ip6_address but I don't know how I should use it.
If I run
hostname -I I get:
If I run
ip a the output under
eth0 is the following:
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether b8:27:eb:9f:26:20 brd ff:ff:ff:ff:ff:ff inet 192.168.0.2/24 brd 192.168.0.255 scope global eth0 valid_lft forever preferred_lft forever inet6 fe80::340b:6d47:32d:fb60/64 scope link valid_lft forever preferred_lft forever
Why is the set static IP address not working, and how can I remedy this?