I can't change the default ip address of my linux box. I tried
dhcpcd -k
I got a dhcpcd: command not found
I tried to do a:
install dhcpcd
but I can't install dhcpcd because I don't have internet at the moment. The device I'm working with starts with a default static IP.
I also tried
dhclient eth1 -v
I get Internet Systems Consortium DHCP Client 4.3.5 Copyright 2004-2016 Internet Systems Consortium. All rights reserved. For info, please visit https://www.isc.org/software/dhcp/
Listening on LPF/eth1/00:90:e8:00:f9:d7
Sending on LPF/eth1/00:90:e8:00:f9:d7
Sending on Socket/fallback
DHCPREQUEST of 10.13.2.109 on eth1 to 255.255.255.255 port 67
DHCPACK of 10.13.2.109 from 10.13.1.1
RTNETLINK answers: File exists
bound to 10.13.2.109 -- renewal in 42817 seconds.
I type in {ifconfig}
and I still get:
eth1: flags=4163<UP,BROADCAST,RUNNING,MULTICAST> mtu 1500
inet 192.168.4.127 netmask 255.255.255.0 broadcast 192.168.4.255
inet6 fe80::290:e8ff:fe00:f9d7 prefixlen 64 scopeid 0x20<link>
ether 00:90:e8:00:f9:d7 txqueuelen 1000 (Ethernet)
RX packets 134834 bytes 17025152 (16.2 MiB)
RX errors 0 dropped 0 overruns 0 frame 0
TX packets 2265 bytes 140834 (137.5 KiB)
How do I install dhcp if I have no internet?
PSsst...I'm a newb when it comes to linux.
I'm on debian 9.0 btw.
Edit
If I type in ip addr I get
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
link/ether 00:90:e8:00:f9:d7 brd ff:ff:ff:ff:ff:ff
inet 192.168.4.127/24 brd 192.168.4.255 scope global eth1
valid_lft forever preferred_lft forever
inet 10.13.2.109/22 brd 10.13.3.255 scope global eth1
valid_lft forever preferred_lft forever
inet6 fe80::290:e8ff:fe00:f9d7/64 scope link
valid_lft forever preferred_lft forever
I see where it says inet 10.13.2.109. I guess what's throwing me off is it also states my inet is 192.168.4.127. ELI5?
dhclient
is, and when you run it, it is even reporting that it has successfully obtained a lease (for address 10.13.2.109).