View previous topic :: View next topic |
Author |
Message |
srlinuxx l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/128038814242554c24b4f68.png)
Joined: 22 Nov 2003 Posts: 627
|
Posted: Tue Aug 03, 2004 4:16 am Post subject: slave server physical set up of nics question |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
Ateo Advocate
![Advocate Advocate](/images/ranks/rank-G-1-advocate.gif)
Joined: 02 Jun 2003 Posts: 2022 Location: Vegas Baby!
|
Posted: Tue Aug 03, 2004 4:30 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
srlinuxx l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/128038814242554c24b4f68.png)
Joined: 22 Nov 2003 Posts: 627
|
Posted: Tue Aug 03, 2004 4:44 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
intgr Apprentice
![Apprentice Apprentice](/images/ranks/rank_rect_2.gif)
![](images/avatars/51574299842054c07a5b90.png)
Joined: 23 Jun 2004 Posts: 225 Location: Earth, Sol, Milky Way
|
Posted: Tue Aug 03, 2004 4:48 am Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
srlinuxx l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/128038814242554c24b4f68.png)
Joined: 22 Nov 2003 Posts: 627
|
Posted: Tue Aug 03, 2004 6:17 am Post subject: |
|
|
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! ![Very Happy :D](images/smiles/icon_biggrin.gif) _________________ --You talk the talk, but do you waddle the waddle?
-Gentoo Monthly Screenshots |
|
Back to top |
|
![](templates/gentoo/images/spacer.gif) |
DaveArb Guru
![Guru Guru](/images/ranks/rank_rect_3.gif)
Joined: 29 Apr 2004 Posts: 510 Location: Texas, USA
|
Posted: Tue Aug 03, 2004 1:39 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
srlinuxx l33t
![l33t l33t](/images/ranks/rank_rect_4.gif)
![](images/avatars/128038814242554c24b4f68.png)
Joined: 22 Nov 2003 Posts: 627
|
Posted: Tue Aug 03, 2004 6:21 pm Post subject: |
|
|
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 |
|
![](templates/gentoo/images/spacer.gif) |
|