first of all let me say I'm a beginner so assume I don't know anything. Okay, now my problem. I'm trying to set up my old PI2 to be a terraria server to play with some friends. Everything was working fine but at some point my pi2 stopped being connected to internet (i'm using an ethernet). I've looked online but none of the things i've done worked. Any suggestions? I think it may be related to some DHCP problems but as I said i'm a beginner and I don't even know what DHCP is. Thanks for the help.
PS: among the things that I tryied i guess this one was the only one worth telling:
sudo nano /etc/dhcpcd.conf
then
interface eth0
static ip_adress=192.168.1.200/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1
where "192.168.1.1" is my router's adress
Sorry again if I made some stupid mistakes/assumpions but i'm a beginner and I know very little.
EDIT: This is the output log of some commands I've been suggested to try:
pi@raspberrypi:~ $ sudo ping 192.168.1.1
connect: Network is unreachable
pi@raspberrypi:~ $ sudo ping 4.2.2.4
connect: Network is unreachable
pi@raspberrypi:~ $ sudo ifconfig
eth0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
ether b8:27:eb:26:9a:72 txqueuelen 1000 (Ethernet)
RX packets 320 bytes 15316 (14.9 KiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 30 bytes 4784 (4.6 KiB)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
lo: flags=73<UP,LOOPBACK,RUNNING> mtu 65536
inet 127.0.0.1 netmask 255.0.0.0
inet6 ::1 prefixlen 128 scopeid 0x10<host>
loop txqueuelen 1000 (Local Loopback)
RX packets 0 bytes 0 (0.0 B)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 0 bytes 0 (0.0 B)
TX errors 0 dropped 0 overruns 0 carrier 0 collisions 0
pi@raspberrypi:~ $ sudo ip -4 addr show
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default qlen 1000
inet 127.0.0.1/8 scope host lo
valid_lft forever preferred_lft forever
pi@raspberrypi:~ $ sudo ip -4 route show
pi@raspberrypi:~ $ sudo cat /etc/resolv.conf
nameserver 8.8.8.8pi@raspberrypi:~ $
ping 192.168.1.1
to find out are the pi connected to router or not. Then,ping 4.2.2.4
to check google dns servers is accessible. The output should not be therequest time out ...
orhost unreachable ..
.ifconfig
|ip -4 addr show
|ip -4 route show
|cat /etc/resolv.conf
dhcpcd.conf
and let the network do its job. If you still have problems describe the status lights on the Ethernet interface.