Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
slave server physical set up of nics question
View unanswered posts
View posts from last 24 hours

 
Reply to topic    Gentoo Forums Forum Index Networking & Security
View previous topic :: View next topic  
Author Message
srlinuxx
l33t
l33t


Joined: 22 Nov 2003
Posts: 627

PostPosted: Tue Aug 03, 2004 4:16 am    Post subject: slave server physical set up of nics question Reply with quote

I have a basic newb question, actually embarrassed to have to ask really, but...

I want to set up a slave server of sorts, another server with a different static internet address. Main server is 56.157.220.68 and I'd like to set the other machine up to be accessible at 56.157.220.69 (not the real ips).

So, do I put two nics in each machine or three in main server and one in slave?

And either route I go, would I use iptables dnat to route the traffic?

Thanks so much,
-susan
_________________
--You talk the talk, but do you waddle the waddle?
-Gentoo Monthly Screenshots
Back to top
View user's profile Send private message
Ateo
Advocate
Advocate


Joined: 02 Jun 2003
Posts: 2022
Location: Vegas Baby!

PostPosted: Tue Aug 03, 2004 4:30 am    Post subject: Reply with quote

I don't understand why you need more than one NIC per server unless you're using one to route. If that's the case, then you would need 2 in the master and one in the slave. If you plan to have more than one computer connect to the master, I suggest a layer 2 switch. That way, master nic 1 will be "public", master nic 2 will be your private interface which connects to the switch. The rest of your computers would then connect to the switch...

HTH
Back to top
View user's profile Send private message
srlinuxx
l33t
l33t


Joined: 22 Nov 2003
Posts: 627

PostPosted: Tue Aug 03, 2004 4:44 am    Post subject: Reply with quote

Yes, I have a lan and using two in the main server as you describe - one for the internet interface and one for the lan.

So, I want to use two public ips. Would I put a third in main server and assign it the other public and dnat the traffic to the slave's internal ip addy?
_________________
--You talk the talk, but do you waddle the waddle?
-Gentoo Monthly Screenshots
Back to top
View user's profile Send private message
intgr
Apprentice
Apprentice


Joined: 23 Jun 2004
Posts: 225
Location: Earth, Sol, Milky Way

PostPosted: Tue Aug 03, 2004 4:48 am    Post subject: Reply with quote

srlinuxx wrote:
So, I want to use two public ips. Would I put a third in main server and assign it the other public and dnat the traffic to the slave's internal ip addy?

Theoretically it is possible to assign multiple IPs to a single NIC. Unfortunately I'm not sure how to do it in Linux, so I would also be thankful if anybody explained it.
Back to top
View user's profile Send private message
srlinuxx
l33t
l33t


Joined: 22 Nov 2003
Posts: 627

PostPosted: Tue Aug 03, 2004 6:17 am    Post subject: Reply with quote

I hear ya! I went the "put three in master and one in slave" route. I'm working on the iptables right now. I hope it works! :D
_________________
--You talk the talk, but do you waddle the waddle?
-Gentoo Monthly Screenshots
Back to top
View user's profile Send private message
DaveArb
Guru
Guru


Joined: 29 Apr 2004
Posts: 510
Location: Texas, USA

PostPosted: Tue Aug 03, 2004 1:39 pm    Post subject: Reply with quote

Code:
$cat /etc/conf.c/net
...
iface_eth0="1.2.3.4 broadcast 1.2.3.255 netmask 255.255.255.0"
# Here you go, alias another IP onto the adapter:
alias_eth0="192.168.0.3"
# NB:  The next is only used for aliases.
#
# To add a custom netmask/broadcast address to created aliases,
# uncomment and change accordingly.  Leave commented to assign
# defaults for that interface.
#
#broadcast_eth0="192.168.0.255"
#netmask_eth0="255.255.255.0"
gateway="eth0/1.2.3.110"


Not tested, but I've used it in the past. I don't know how it will react to having two IPs that are in the same network, though.

Dave
Back to top
View user's profile Send private message
srlinuxx
l33t
l33t


Joined: 22 Nov 2003
Posts: 627

PostPosted: Tue Aug 03, 2004 6:21 pm    Post subject: Reply with quote

Integor: I found this too:

Example: Let's say a system administrator wants to setup 3 IPaddresses with the same machine name associated with one Ethernet card with 192.192.192.0
#ifconfig eth0 192.192.192.1
#ifconfig eth0:1 192.192.192.2
#ifconfig eth0:2 192.192.192.3
_________________
--You talk the talk, but do you waddle the waddle?
-Gentoo Monthly Screenshots
Back to top
View user's profile Send private message
Display posts from previous:   
Reply to topic    Gentoo Forums Forum Index Networking & Security All times are GMT
Page 1 of 1

 
Jump to:  
You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot vote in polls in this forum