LinuxQuestions.org
Help answer threads with 0 replies.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices


Reply
  Search this Thread
Old 10-04-2016, 04:29 AM   #1
hruday
Member
 
Registered: Jun 2015
Posts: 88

Rep: Reputation: Disabled
Network Virtualization in CentOS 7


I have server installed with CentOS 7 and also has 4 built in Ethernet ports. like 10.0.1.21, 10.0.1.22, 10.0.1.23, 10.0.1.24

I do have Public Static IP from my ISP (eg: 1.2.3.4)

Now I need to virtualize in such a way that each IP address is dedicated to one particular service.

10.0.1.21 will access www.abc.com (site 1) 10.0.1.22 will access www.xyz.com (site 2) 10.0.1.23 will access php application or any such 10.0.1.24 will access only database of all above applications or sites

So what is the best way to use this server?

Can I use Docker which is currently trending or should I use KVM?

Please suggest the best approach as I have deadline to deploy my applications.
 
Old 10-04-2016, 05:15 AM   #2
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,443

Rep: Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547
Quote:
Originally Posted by hruday View Post
I have server installed with CentOS 7 and also has 4 built in Ethernet ports. like 10.0.1.21, 10.0.1.22, 10.0.1.23, 10.0.1.24
Why four NICS on the same subnet? Do you need high throughput to the local network?

Quote:
Originally Posted by hruday View Post
So what is the best way to use this server?
As you don't give any other details of the physical server nobody knows.

Quote:
Originally Posted by hruday View Post
Can I use Docker which is currently trending
Sure, if you want to, it's your server.
Quote:
Originally Posted by hruday View Post
or should I use KVM?
Yeah, you can do that too.

Quote:
Originally Posted by hruday View Post
Please suggest the best approach as I have deadline to deploy my applications.
If your server supports it (see my comments above about how you didn't give any details) start again with Citrix XenServer and create as many VMs as you need.
 
Old 10-04-2016, 01:38 PM   #3
hruday
Member
 
Registered: Jun 2015
Posts: 88

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TenTenths View Post
Why four NICS on the same subnet? Do you need high throughput to the local network?

As you don't give any other details of the physical server nobody knows.

Sure, if you want to, it's your server.
Yeah, you can do that too.

If your server supports it (see my comments above about how you didn't give any details) start again with Citrix XenServer and create as many VMs as you need.

Thanks for the reply.

I'm planning in such a way that I create 4 VMs (VM1, VM2, VM3, VM4) with centOS 7 and assign IP address as follows

10.0.1.21 to VM1 (for allowing ssh,apache)

10.0.1.22 to VM2 (for allowing ssh,apache)

10.0.1.23 to VM3 (for allowing ssh,apache)

10.0.1.24 to VM4 (for allowing ssh,mysql)

So when a request comes to my public static IP (1.2.3.4) I shall forward ports accordingly to the VMs as assigned.

Is it a good approach?

Last edited by hruday; 10-04-2016 at 01:40 PM.
 
Old 10-04-2016, 03:20 PM   #4
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
So you are gong to run several site and you want to keep them separated. It can be done and you would need something on the front end that can direct based on the URL the incoming connection is trying to connect to.
 
Old 10-04-2016, 09:18 PM   #5
hruday
Member
 
Registered: Jun 2015
Posts: 88

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by lazydog View Post
So you are gong to run several site and you want to keep them separated. It can be done and you would need something on the front end that can direct based on the URL the incoming connection is trying to connect to.
Yes.! several services are seperated using IP address and port forwarding.

What is that frontend?
 
Old 10-05-2016, 05:42 AM   #6
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,443

Rep: Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547
Quote:
Originally Posted by lazydog View Post
So you are gong to run several site and you want to keep them separated. It can be done and you would need something on the front end that can direct based on the URL the incoming connection is trying to connect to.
Personally I like HAPROXY, I've used it in the past to do things like SSL termination and handle directing traffic to the backend(s) with URL matching. And it can also load-balance multiple backends.
 
Old 10-05-2016, 01:36 PM   #7
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
I too was going to suggest HAPROXY. I have never used it but I heard it is good.
 
Old 10-12-2016, 04:14 AM   #8
hruday
Member
 
Registered: Jun 2015
Posts: 88

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TenTenths View Post
Personally I like HAPROXY, I've used it in the past to do things like SSL termination and handle directing traffic to the backend(s) with URL matching. And it can also load-balance multiple backends.
Hi

I think it is pointless to use HAproxy in one server. I want to use only one server here. I mean to say that I put everything (php,mysql,apache etc.,) in one machine and use IPs for forwarding requests.

Last edited by hruday; 10-12-2016 at 04:15 AM.
 
Old 10-12-2016, 02:29 PM   #9
lazydog
Senior Member
 
Registered: Dec 2003
Location: The Key Stone State
Distribution: CentOS Sabayon and now Gentoo
Posts: 1,249
Blog Entries: 3

Rep: Reputation: 194Reputation: 194
You are going to need a proxy to redirect the URL's to the proper ip address.
 
Old 10-12-2016, 03:28 PM   #10
jefro
Moderator
 
Registered: Mar 2008
Posts: 21,886

Rep: Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615Reputation: 3615
Just wondering.

Might be a way to use host headers if the OP is using dedicated web pages for these services?

Wonder if some layer 7+ router could do this?
 
Old 10-13-2016, 03:57 AM   #11
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,443

Rep: Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547
From your earlier posts:

Quote:
Originally Posted by hruday View Post
I'm planning in such a way that I create 4 VMs
Which will only have one "public" facing IP, so you need some way to work out from the incoming URL which VM to send the request to, as you say in:
Quote:
Originally Posted by hruday View Post
10.0.1.21 will access www.abc.com (site 1) 10.0.1.22 will access www.xyz.com (site 2) 10.0.1.23 will access php application or any such 10.0.1.24 will access only database of all above applications or sites
Quote:
Originally Posted by hruday View Post
I think it is pointless to use HAproxy in one server.
Good for you, you asked for advice, I gave you it based on years of experience putting this kind of thing in to production. Let us know how you get on.
 
Old 10-13-2016, 03:18 PM   #12
hruday
Member
 
Registered: Jun 2015
Posts: 88

Original Poster
Rep: Reputation: Disabled
Quote:
Originally Posted by TenTenths View Post
From your earlier posts:

Which will only have one "public" facing IP, so you need some way to work out from the incoming URL which VM to send the request to, as you say in:


Good for you, you asked for advice, I gave you it based on years of experience putting this kind of thing in to production. Let us know how you get on.
Hi

Ok. I'm really confused now.!

I'll put it straight this time. what is the best way to use the above type of server to deploy different type of applications and also by making use of 4 interfaces.

OS: CentOS 7
RAM: 32GB
HDD: 2TB
 
Old 10-13-2016, 08:08 PM   #13
c0wb0y
Member
 
Registered: Jan 2012
Location: Inside the oven
Distribution: Windows
Posts: 417

Rep: Reputation: 74
Quote:
Originally Posted by hruday View Post
I have server installed with CentOS 7 and also has 4 built in Ethernet ports. like 10.0.1.21, 10.0.1.22, 10.0.1.23, 10.0.1.24

I do have Public Static IP from my ISP (eg: 1.2.3.4)

Now I need to virtualize in such a way that each IP address is dedicated to one particular service.

10.0.1.21 will access www.abc.com (site 1) 10.0.1.22 will access www.xyz.com (site 2) 10.0.1.23 will access php application or any such 10.0.1.24 will access only database of all above applications or sites


Please suggest the best approach as I have deadline to deploy my applications.
I haven't done this so I'll just be throwing some ideas here.

- I'd suggest to sort out the port forwarding first. Maybe start with 2 VMs, one listening on 80 and the other on whatever.
- With regards to http which you want 2 VMs to serve different domains. You would need an http proxy that would split the traffic and feed to the correct VM. Nginx is quite popular for that sort of thing.
 
Old 10-14-2016, 06:32 AM   #14
TenTenths
Senior Member
 
Registered: Aug 2011
Location: Dublin
Distribution: Centos 5 / 6 / 7
Posts: 3,443

Rep: Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547Reputation: 1547
Quote:
Originally Posted by hruday View Post
Ok. I'm really confused now.!

I'll put it straight this time. what is the best way to use the above type of server to deploy different type of applications and also by making use of 4 interfaces.

OS: CentOS 7
RAM: 32GB
HDD: 2TB
Ok, I'll put it straight this time too. NOBODY here can tell you the best way "making use of 4 interfaces." because you've STILL not told us what they are connect to or how traffic is going to be delivered to this server other than "I do have Public Static IP from my ISP (eg: 1.2.3.4)"

So from the information you've given us it looks like:

You require multiple VMs because you want to segment services.
You have a single IP from your ISP and all traffic for all domains will be delivered down this connection.
So you have coming in on one interface and one IP traffic for: www.abc.com and www.xyz.com
You wish to have traffic for abc.com go to 10.10.1.21, xyz.com to 10.0.1.21, etc.
Traffic is coming in to your server on one connection and is going to be sent to the VMs on that server, nowhere else.
So as you can see the "4 interfaces" that you are so hung up on using have NO use.
Create a "virtual network" within whatever virtualization platform you decide on.
Your VMs will be connected to a "virtual network" that exists only on the host server.
So now you need something that tells the traffic coming in from your ISP connection which server to go to.
For this you create a VM that has two network connections. One to the WAN that has your incoming traffic and another that connects to the "virtual network". This will act as your traffic "router".
You now need (as you've been told several times) some software that can detect the URL that's being requested and send it to the appropriate VM.
Options that you've been told about are: haproxy, nginx, and apache "reverse proxy"

If you want to get really specific, I'd use Citrix XenServer as the host and CentOS 7 as the guests.
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off



Similar Threads
Thread Thread Starter Forum Replies Last Post
CentOS virtualization DD554 Linux - Virtualization and Cloud 3 01-08-2014 11:25 PM
How to do virtualization on CentOS? Altiris Linux - Newbie 19 08-15-2013 03:09 PM
LXer: Virtualization With Xen On CentOS 6.3 (x86_64) (Paravirtualization & Hardware Virtualization) LXer Syndicated Linux News 0 08-29-2012 06:40 AM
CentOS Virtualization louisb Linux - Virtualization and Cloud 1 07-17-2012 10:45 PM
CentOS distributions for Virtualization mjchin Linux - Server 3 04-16-2009 04:59 PM

LinuxQuestions.org > Forums > Linux Forums > Linux - Networking

All times are GMT -5. The time now is 11:28 PM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
Open Source Consulting | Domain Registration