Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
dhcp and aliased devices
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
AH
n00b
n00b


Joined: 11 Jun 2004
Posts: 32

PostPosted: Sat Mar 25, 2006 12:23 pm    Post subject: dhcp and aliased devices Reply with quote

My /etc/conf.d/net.example contains this comment and example:

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"
#)


This makes sense and I do use ifconfig. My ISP provides me with several ip adresses over DHCP and if I run two physical devices it works good as long as I give one of them the nogateway option.

What I _would_ like is something similar to this:
Quote:

config_eth0=( "dhcp" "dhcp" "dhcp" )


Is there some way to do this with aliased devices and dhcp for each of the adresses recieved?
Back to top
View user's profile Send private message
itsmegawtf
Apprentice
Apprentice


Joined: 01 Oct 2005
Posts: 150

PostPosted: Sat Mar 25, 2006 3:49 pm    Post subject: Reply with quote

your file (/etc/conf.d/net) needs to contain:
Code:

iface_eth0="dhcp"
Back to top
View user's profile Send private message
AH
n00b
n00b


Joined: 11 Jun 2004
Posts: 32

PostPosted: Mon Mar 27, 2006 8:19 am    Post subject: Reply with quote

The example file does not mention anything about iface at all, is it really the way it works in the most recent versions? If it is, where can I find more information about iface_*?

The only non-commented information I currently is:
Code:
config_eth0=( "dhcp" )
dhcpcd_eth0="-t 20"
dhcp_eth0="nontp nonis"
Back to top
View user's profile Send private message
UberLord
Retired Dev
Retired Dev


Joined: 18 Sep 2003
Posts: 6835
Location: Blighty

PostPosted: Mon Mar 27, 2006 9:03 am    Post subject: Reply with quote

iface_eth0 is the old style, config_eth0 is the new

There is no provision for DHCP assigning > 1 address. You'll have todo DHCP + static + static which may or may not work after each DHCP renew depending on DHCP client used. Would be better just to assign static IPs 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
AH
n00b
n00b


Joined: 11 Jun 2004
Posts: 32

PostPosted: Mon Mar 27, 2006 10:35 am    Post subject: Reply with quote

Thanks for the reply. I guess the easiest way will be to put more physical interfaces into the box and add nogateway for all but one of them and use dhcp.
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