Skip to main content
added 993 characters in body
Source Link
dirkt
  • 17k
  • 3
  • 35
  • 39

DHCP consists of a server and a client.

The client is the one that gives your machine its "default" IP address - basically it broadcasts into the subnet "Hello! I am new here, can someone please give me an IP address?" and then the server answers "Welcome to this subnet, here's your IP address and other routing information". The server typically runs e.g. on your home router.

So you already have dhclient, no need to install anything, and running it shows everything works, it's giving you the IP address 10.13.2.109 as told by the server.

If you now look at your network interfaces with ip addr, you should see the network interface eth1 (the one that you connected) with that address.

If your real problem is "but I can't connect to the internet" as in "my web browser doesn't work", please edit the question and specify what exactly you did, and what exactly doesn't work, and what the error messages are.

Edit

(Please don't edit my answer with new information, edit your question instead).

If your problem is that you somehow got two IP addresses, then the next step is to find out how that happened. Look into the syslog (use journalctl if you are using systemd) or in dmesg for any hints, like two log entries of dhclient.

If the problem is that you also have configure a static IP address somewhere, remove the static IP address.

You can also experiment and remove first one address and then the other with ip addr del 192.168.4.127/24 dev eth1 or ip addr del 10.13.2.109/22 dev eth1 and see if you get a working configuration this way. You can re-add the IP address by executing dhclient again, or using ip addr add ....

A configuration with two IP addresses on the same network interface is usually an error, and would explain why you can't get internet.

Test with something like ping 8.8.8.8 which doesn't require name resolution (DNS) to work.

DHCP consists of a server and a client.

The client is the one that gives your machine its "default" IP address - basically it broadcasts into the subnet "Hello! I am new here, can someone please give me an IP address?" and then the server answers "Welcome to this subnet, here's your IP address and other routing information". The server typically runs e.g. on your home router.

So you already have dhclient, no need to install anything, and running it shows everything works, it's giving you the IP address 10.13.2.109 as told by the server.

If you now look at your network interfaces with ip addr, you should see the network interface eth1 (the one that you connected) with that address.

If your real problem is "but I can't connect to the internet" as in "my web browser doesn't work", please edit the question and specify what exactly you did, and what exactly doesn't work, and what the error messages are.

DHCP consists of a server and a client.

The client is the one that gives your machine its "default" IP address - basically it broadcasts into the subnet "Hello! I am new here, can someone please give me an IP address?" and then the server answers "Welcome to this subnet, here's your IP address and other routing information". The server typically runs e.g. on your home router.

So you already have dhclient, no need to install anything, and running it shows everything works, it's giving you the IP address 10.13.2.109 as told by the server.

If you now look at your network interfaces with ip addr, you should see the network interface eth1 (the one that you connected) with that address.

If your real problem is "but I can't connect to the internet" as in "my web browser doesn't work", please edit the question and specify what exactly you did, and what exactly doesn't work, and what the error messages are.

Edit

(Please don't edit my answer with new information, edit your question instead).

If your problem is that you somehow got two IP addresses, then the next step is to find out how that happened. Look into the syslog (use journalctl if you are using systemd) or in dmesg for any hints, like two log entries of dhclient.

If the problem is that you also have configure a static IP address somewhere, remove the static IP address.

You can also experiment and remove first one address and then the other with ip addr del 192.168.4.127/24 dev eth1 or ip addr del 10.13.2.109/22 dev eth1 and see if you get a working configuration this way. You can re-add the IP address by executing dhclient again, or using ip addr add ....

A configuration with two IP addresses on the same network interface is usually an error, and would explain why you can't get internet.

Test with something like ping 8.8.8.8 which doesn't require name resolution (DNS) to work.

Source Link
dirkt
  • 17k
  • 3
  • 35
  • 39

DHCP consists of a server and a client.

The client is the one that gives your machine its "default" IP address - basically it broadcasts into the subnet "Hello! I am new here, can someone please give me an IP address?" and then the server answers "Welcome to this subnet, here's your IP address and other routing information". The server typically runs e.g. on your home router.

So you already have dhclient, no need to install anything, and running it shows everything works, it's giving you the IP address 10.13.2.109 as told by the server.

If you now look at your network interfaces with ip addr, you should see the network interface eth1 (the one that you connected) with that address.

If your real problem is "but I can't connect to the internet" as in "my web browser doesn't work", please edit the question and specify what exactly you did, and what exactly doesn't work, and what the error messages are.