LinuxQuestions.org
Visit Jeremy's Blog.
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 04-15-2015, 06:42 AM   #1
kurumi
Member
 
Registered: Apr 2010
Posts: 228

Rep: Reputation: 53
Configure multiple interfaces


Hi
I have a server installed with RedHat. This server have 6 network interfaces. Is it possible to configure each interface with a different IP address? If so, can you recommend a good reference on how to do it? I believe the easy part is to use the networking configuration GUI to set each interface with an IP address. What I am not sure is how to tie each interface with different hostnames. eg in /etc/hosts, do I do something like this

Code:
server1.com      10.100.1.20
server2.com      192.168.56.101
....
thanks
 
Old 04-15-2015, 08:05 AM   #2
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,885
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Quote:
Originally Posted by kurumi View Post
This server have 6 network interfaces. Is it possible to configure each interface with a different IP address?
Not only can you .. you have too.
Quote:
Originally Posted by kurumi View Post
If so, can you recommend a good reference on how to do it? I believe the easy part is to use the networking configuration GUI to set each interface with an IP address. What I am not sure is how to tie each interface with different hostnames. eg in /etc/hosts, do I do something like this
Code:
server1.com      10.100.1.20
server2.com      192.168.56.101
....
Yes that's fine what you're doing.

Given that it's a server, it may be likely that you use something like 3 networks and then have dual connections to those 3 nets, or use 2 networks and triple connections to those 2 nets. But you'd still have different IP addresses for each interface, they'd just be on the same network, like:
Code:
server1.portA.com     10.100.1.20
server1.portB.com     10.100.1.21
 
Old 04-15-2015, 08:07 AM   #3
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Quote:
Originally Posted by kurumi View Post
Hi
I have a server installed with RedHat. This server have 6 network interfaces. Is it possible to configure each interface with a different IP address?
Definitely yes, it is possible to configure each interface with different IP address. You have to make a note of which interface is connected to which network in the backend. For example if your first NIC (eth0) is connected to 192.168.1.0/24 network then you have to assign this interface an IP from that network.

Quote:
If so, can you recommend a good reference on how to do it? I believe the easy part is to use the networking configuration GUI to set each interface with an IP address.
You can either user gui, tui or cli it is up to you. Here is the documentation from Red Hat which you might find useful: https://access.redhat.com/documentat...nterfaces.html

Quote:
What I am not sure is how to tie each interface with different hostnames. eg in /etc/hosts, do I do something like this

Code:
server1.com      10.100.1.20
server2.com      192.168.56.101
....
For that you can make entries in /etc/hosts but that will be for local server, copying /etc/hosts file on others servers on the network is hectic and not feasible approach. I would suggest making entries in DNS for each IP pointing to different hostname.
 
Old 04-15-2015, 08:30 AM   #4
kurumi
Member
 
Registered: Apr 2010
Posts: 228

Original Poster
Rep: Reputation: 53
Thank you all for your replies. Do you see any security issues if I configure interfaces this way? I believe traffic from one network card would not be able to go to the others, since I am not creating any routes on local server. Am I in the right track? thanks
 
Old 04-15-2015, 08:32 AM   #5
rtmistler
Moderator
 
Registered: Mar 2011
Location: USA
Distribution: MINT Debian, Angstrom, SUSE, Ubuntu, Debian
Posts: 9,885
Blog Entries: 13

Rep: Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931Reputation: 4931
Quote:
Originally Posted by kurumi View Post
Thank you all for your replies. Do you see any security issues if I configure interfaces this way? I believe traffic from one network card would not be able to go to the others, since I am not creating any routes on local server. Am I in the right track? thanks
Correct, but watch how you specify shared resources.
 
Old 04-15-2015, 08:40 AM   #6
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Quote:
Originally Posted by kurumi View Post
Thank you all for your replies. Do you see any security issues if I configure interfaces this way? I believe traffic from one network card would not be able to go to the others, since I am not creating any routes on local server. Am I in the right track? thanks
Yes you are on the right track. These kind of setups I have seen where you configure cluster. They will have separate NICs for accessing storage (including fault tolerance), one for management, one for public access etc.

As long as you are not switching packets on the server between the networks you are good. At router level I think it is your network guys who have to take care of it unless you manage routers as well.
 
Old 04-15-2015, 08:41 AM   #7
kurumi
Member
 
Registered: Apr 2010
Posts: 228

Original Poster
Rep: Reputation: 53
ok, understood. Thank you all for your kind replies.
 
Old 04-17-2015, 06:56 AM   #8
kurumi
Member
 
Registered: Apr 2010
Posts: 228

Original Poster
Rep: Reputation: 53
Quote:
Originally Posted by T3RM1NVT0R View Post
Yes you are on the right track. These kind of setups I have seen where you configure cluster. They will have separate NICs for accessing storage (including fault tolerance), one for management, one for public access etc.

As long as you are not switching packets on the server between the networks you are good. At router level I think it is your network guys who have to take care of it unless you manage routers as well.
Hi, just another question.
If I did not configure any routing between NIC1 and NIC2, would a proficient hacker somehow be able to route packets from NIC1 to NIC2? not unless he can get root, right?

thanks
 
Old 04-17-2015, 07:04 AM   #9
T3RM1NVT0R
Senior Member
 
Registered: Dec 2010
Location: Internet
Distribution: Linux Mint, SLES, CentOS, Red Hat
Posts: 2,385

Rep: Reputation: 477Reputation: 477Reputation: 477Reputation: 477Reputation: 477
Quote:
Originally Posted by kurumi View Post
Hi, just another question.
If I did not configure any routing between NIC1 and NIC2, would a proficient hacker somehow be able to route packets from NIC1 to NIC2? not unless he can get root, right?

thanks
That will depend a lot on the definition of proficient hacker here

If a hacker is able to break into your network that itself is a bad news on the first place. Yes he cannot router packets from NIC1 to NIC2 on the machine (remember I am saying on the machine) without being root but there are other methods available using which hacker can do that within the network. Bottomline is if a hacker has got control over your network you are already screwed.
 
  


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
firewall with multiple possible interfaces dasy2k1 Linux - Networking 3 03-12-2010 08:41 AM
How to configure multiple loopback interfaces (lo0, lo1, lo2...) arkin Linux - General 6 02-20-2009 01:12 AM
multiple bonds = multiple primary interfaces? turbo_acura Linux - Server 1 02-17-2009 11:15 AM
Multiple interfaces in one VLAN Fund-A-Mental Linux - Networking 1 03-06-2007 07:44 AM
Red Hat 7.3 and multiple gateways on multiple interfaces bluefmc Linux - Networking 2 11-19-2004 05:01 PM

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

All times are GMT -5. The time now is 04:13 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