Static IP

From MineOS Wiki
Jump to navigation Jump to search

Please note, these settings are included simply to be comprehensive, but I recommend the use of STATIC DHCP instead, as it more reliably ties your MAC address to your IP address, rather than using an arbitrary static IP address, which sometimes can cause unforeseen complications. All the following steps must be done as root.

Youtube video walkthrough: http://www.youtube.com/watch?v=slS-o6KT3sg

Editing /etc/rc.d/net

  1. Edit the net file: vi /etc/rc.d/net
  2. Ensure the ethernet device is up: /sbin/ip link set eth0 up
  3. Adjust the following line to match the desired static IP address for your server: /sbin/ip addr add 192.168.x.x/24 dev eth0 broadcast +
  4. Adjust the following line to match the IP address of your router: /sbin/ip route add default via 192.168.x.x
  5. Save and quit: :wq
Adjusted /etc/rc.d/net

Editing /etc/resolv.conf

  1. Edit resolv.conf: vi /etc/resolv.conf
  2. Adjust the following line to match the IP address of your router: nameserver 192.168.x.x
  3. Save and quit: :wq
Adjusted /etc/resolv.conf

Taking effect

For the changes to take effect, the ethernet device must be restarted: