Skip to content

IP number

nylander edited this page Oct 17, 2019 · 5 revisions

Linux

  • Last modified: tor okt 17, 2019 01:04
  • Sign: JN
  • Tested on: Xubuntu 18.04
  • Solved: Yes

Recommendation: Send your MAC address to NRM-IT ([email protected]) and tell them that you have a Linux OS. The NRM-IT may also extend the IP-lease time for your computer (ask them!), in order to have your set up more stable. How to find your MAC address? See below1.

Getting an IP address

When plugging in an ethernet cable to your machine, you should be able to receive an IP address using DHCP.

On some machines, however, I have noticed that the DNS setup is not always automatically assigned (leading to no internet connection). In those cases, you might gain access by manually re-negotiate the DNS/IP assignment by using, e.g., dhclient (as root). Example:

  1. Unplug the ethernet cable
  2. List the active network interfaces by using ip link.
  3. Plug in the ethernet cable, and again run ip link. Compare with the previous output. On my laptop, I see that my ethernet cable is connected to a device with a name consisting of 15 letters and digits, say enx12a34b56789c. This is the device ID that is trying to access the NRM-IT system.
  4. Re-negotiate the dynamic IP assignment: sudo dhclient enx12a34b56789c. On succesful negotiation, you should see some output saying File exists.

Finding your MAC address

1: The MAC address for your network device(s) is given in the output of ip link (look for the semi-colon separated string after ether). For a known device ID (e.g. enx12a34b56789c), you may even try ip link show enx12a34b56789c | grep ether | awk '{print $2}'.