Setting up a static ip CentOS 7 Virtual Box

General support questions
Post Reply
orewamadao
Posts: 4
Joined: 2019/02/17 23:10:08

Setting up a static ip CentOS 7 Virtual Box

Post by orewamadao » 2019/02/17 23:29:19

Good afternoon.

I'm trying to teach my self linux right now and right now I'm trying to install a LAMP server on my VM using CentOS 7.

I already configured the network scripts and added the following lines but I'm not really sure if IPADDR, GATEWAY, DNS1 and DNS2. I'm running on Ubuntu and should the IPADDR on my local machine be the same on my virtual machine and how about the DNS what should I input?

Code: Select all

IPADDR=
NETMASK=255.255.255.0
GATEWAY=192.168.1.1
DNS1=
DNS2=

Code: Select all

/etc/sysconfig/network-scripts/ifcfg-eth0

sarogahtyp
Posts: 3
Joined: 2016/01/30 06:30:21

Re: Setting up a static ip CentOS 7 Virtual Box

Post by sarogahtyp » 2019/02/18 16:48:29

IPADDR should be the static IP which you like to attach to this machine in your local area network. something like 192.168.1.XXX should do it in your case while XXX is something between 2 and 254.
DNS1 can be your routers IP 192.168.1.1 because its your favorite Dynamic Name Service (forwarder). Your router knows the preferred Name Server of your provider and forwards name service requests to it.
DNS2 can be any name server u like. You could use 8.8.8.8 which is googles name service.

Post Reply