Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
assigning IP to eth0:1 over DHCP
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
acid_kewpie
n00b
n00b


Joined: 14 Apr 2003
Posts: 39

PostPosted: Sat Aug 30, 2003 2:06 pm    Post subject: assigning IP to eth0:1 over DHCP Reply with quote

Hi, i want to be able to assign two IP's to my eth0 interface running on a pxe booted diskless system. as pxe obtains the first ip from dhcp it doesn't transfer a hostname than my dns can use, so on boot i want to get a second ip on eth0:1 using conventional dhcpcd so it will pass a correct hostname...

now i can achieve this manually.... "dhcpd -D -h animal eth0:1" but setting the equivalent options causes syntax errors in the file, obviosuly because of the ":".... so what can i do other than just adding the manual command.... surely this is easy for gentoo!

[or of course if anyone knows if it is possible to achieve what i originally want via pxe...]
Back to top
View user's profile Send private message
Diorf
n00b
n00b


Joined: 05 Jun 2003
Posts: 52
Location: Paris

PostPosted: Sat Aug 30, 2003 2:29 pm    Post subject: Reply with quote

if you just want to have an hostname pointing to your ip and just want this hostname to be automatically passed to the dhcp/dns at boot on eth0 you just have to look in /etc/conf.d/net for the line:
Code:
#dhcpcd_eth0="..."

then just uncomment it and add:
Code:
dchpcd_eth0="-h yourhostname"


Hope this help
Back to top
View user's profile Send private message
acid_kewpie
n00b
n00b


Joined: 14 Apr 2003
Posts: 39

PostPosted: Sat Aug 30, 2003 8:48 pm    Post subject: Reply with quote

yes but this then replaces the first IP, not assigning a second. replacing the first IP means that the nfs mount is incorrect, and the system dies instantly, what with no longer having any filesystem at all and all that.
Back to top
View user's profile Send private message
acid_kewpie
n00b
n00b


Joined: 14 Apr 2003
Posts: 39

PostPosted: Mon Sep 01, 2003 12:13 pm    Post subject: Reply with quote

so have I stumbled on something that gentoo actually isn't able to do?
Back to top
View user's profile Send private message
really
Guru
Guru


Joined: 27 Aug 2002
Posts: 430
Location: nowhere

PostPosted: Mon Sep 01, 2003 1:43 pm    Post subject: Reply with quote

you could add dhcpd -D -h animal eth0:1 to your /etc/conf.d/local.start ;)
_________________
NoManNoProblem

Get lost before you get shot.
Back to top
View user's profile Send private message
acid_kewpie
n00b
n00b


Joined: 14 Apr 2003
Posts: 39

PostPosted: Mon Sep 01, 2003 3:25 pm    Post subject: Reply with quote

well that's what I am doing... but it *should* be possible to do it the gentoo way....
Back to top
View user's profile Send private message
really
Guru
Guru


Joined: 27 Aug 2002
Posts: 430
Location: nowhere

PostPosted: Mon Sep 01, 2003 7:11 pm    Post subject: Reply with quote

if it bails out on the : in net.eth0 then you could try \: or something.. or net.eth0:1 ;)
_________________
NoManNoProblem

Get lost before you get shot.
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