Network Configuration on CentOS7 VM

Issues related to configuring your network
Post Reply
georgi_tsenov
Posts: 3
Joined: 2015/02/12 12:06:13

Network Configuration on CentOS7 VM

Post by georgi_tsenov » 2015/02/12 13:39:42

Hello!

I am not able to configure the network on a VMWare hosted CentOS.
I am using a router TP-LINK TL-WR841R

I would like to assign a static internal IP address for the VM.
I am aware how to set up static IP address for the VM host, but I am not aware how to do it for the VM itself.

I will be very thankful if some one could help me.

Best Regards,
G. Tsenov

User avatar
TrevorH
Forum Moderator
Posts: 24101
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Network Configuration on CentOS7 VM

Post by TrevorH » 2015/02/12 13:56:54

Make sure you use bridged networking on the host VM setup and then it's exactly the same procedure on the guest as it was on the host.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

georgi_tsenov
Posts: 3
Joined: 2015/02/12 12:06:13

Re: Network Configuration on CentOS7 VM

Post by georgi_tsenov » 2015/02/12 14:27:48

Thank you for the fast reply.

So I will have to use the same IP/Gateway/DNS configured on the host for my VM network configuration?

User avatar
TrevorH
Forum Moderator
Posts: 24101
Joined: 2009/09/24 10:40:56
Location: Brighton, UK

Re: Network Configuration on CentOS7 VM

Post by TrevorH » 2015/02/12 14:33:53

Most virtualisation methods give you a choice of the network mode that the guests will use. Usually they are known as things like NAT, bridged, Internal only and/or Host only. The internal/host only ones only allow you to talk from the guest to the host and not outside. The NAT version sets up a software "router" in effect that does exactly what your TP-Link router does and sets up an entire NAT network and translates from e.g 192.168.122.0/24 to the real address of the host. The bridged version effectively puts the guests on the same network as the host and you set it up to use an ip address in the same subnet as the host and it acts like it is a separate physical machine on the same LAN as your host.

You can use the NAT version and still assign static IP addresses in the same NAT subnet that the rest of the guests use but you have to alter an xml file and restart libvirt to do so.
CentOS 5 died in March 2017 - migrate NOW!
Full time Geek, part time moderator. Use the FAQ Luke

georgi_tsenov
Posts: 3
Joined: 2015/02/12 12:06:13

Re: Network Configuration on CentOS7 VM

Post by georgi_tsenov » 2015/02/12 14:49:51

Hello Trevor, thank you for the fast reply.

I think I will go with the bridged connection, so I can set 192.168.0.101 for my Host and 192.168.0.102 for my VM - I can do that with the bridged method, correct?
Thank you for the help, I really appreciate it!

Post Reply