Ics0020-vm-ip

Allikas: Kursused
Redaktsioon seisuga 31. august 2018, kell 11:08 kasutajalt Risto (arutelu | kaastöö)
(erin) ←Vanem redaktsioon | Viimane redaktsiooni (erin) | Uuem redaktsioon→ (erin)
Mine navigeerimisribale Mine otsikasti

Find the IP address of your classroom workstation (e.g., with the ifconfig tool). Add 100 to the last octet of the IP address and use the result for your virtual machine. For example, if your classroom workstation has the IP address 192.168.5.22, you should use the IP address 192.168.5.122 for the virtual machine.

For setting the virtual machine IP address, edit the file /etc/sysconfig/network-scripts/ifcfg-enp0s3 as follows:

1) change the value of BOOTPROTO variable from dhcp to static, for example:

#BOOTPROTO="dhcp"
BOOTPROTO="static"

2) add IPADDR, NETWORK, NETMASK, GATEWAY, BROADCAST, DNS1 and DNS2 variables for your IP address, for example:

IPADDR=192.168.5.122
NETWORK=192.168.5.0
NETMASK=255.255.255.0
GATEWAY=192.168.5.254
BROADCAST=192.168.5.255
DNS1=172.16.0.175
DNS2=8.8.8.8