Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
[SOLVED] Gentoo net init scripts with multiple ips
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
cheater512
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2003
Posts: 145
Location: Australia

PostPosted: Sun Jul 02, 2006 7:04 am    Post subject: [SOLVED] Gentoo net init scripts with multiple ips Reply with quote

A search didnt turn anything up.

I just got two new dedicated servers and Gentoo is currently running on them.
The problem is they are currently running off one ip when I have a block of 4 (usable) ips.

I did find this in /etc/conf.d/net but I have no idea how to configure it correctly. The example is for a lan.
Quote:
# If you need more than one address, you can use something like this
# NOTE: ifconfig creates an aliased device for each extra IPv4 address
# (eth0:1, eth0:2, etc)
# iproute2 does not do this
#config_eth0=(
# "192.168.0.2/24"
# "192.168.0.3/24"
# "192.168.0.4/24"
#)

My netmask is 255.255.254.0 and I'm not exactly sure how the /24 bit works.

I want to get it right the first time because if I dont then that means no ssh and I would need to make a support ticket to get it fixed.


Last edited by cheater512 on Sun Jul 02, 2006 10:47 am; edited 1 time in total
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sun Jul 02, 2006 8:38 am    Post subject: Reply with quote

Code:
config_eth0=(
   "192.168.0.2 netmask 255.255.255.0"
   "192.168.0.3 netmask 255.255.255.0"
   "192.168.0.4 netmask 255.255.255.0"  )


Like so. So change the mask to 255.255.254.0 or just use /23 instead :)
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
Back to top
View user's profile Send private message
cheater512
Tux's lil' helper
Tux's lil' helper


Joined: 03 Nov 2003
Posts: 145
Location: Australia

PostPosted: Sun Jul 02, 2006 10:46 am    Post subject: Reply with quote

Ah sweet. Why dont you change the example to something slightly more logical? :wink:
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Sun Jul 02, 2006 1:05 pm    Post subject: Reply with quote

I find the /24, /23 notation for logical than netmask 255.255.255.0, netmask 255.255.254.0

And it's shorter too!
_________________
Use dhcpcd for all your automated network configuration needs
Use dhcpcd-ui (GTK+/Qt) as your System Tray Network tool
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