networking problem: DHCP and local aliases

Ask questions regarding Gentoox, Gentoo and Linux in general in these forums and we'll do our best to help you!
Post Reply
winterborne
Pro
Posts: 93
Joined: Mon Nov 17, 2003 9:45 am
Location: Canada

networking problem: DHCP and local aliases

Post by winterborne »

Hey everyone! My first post in a while: I've been merrily using gentoox without too much hassle for almost two months now... but here's what I've just come across...

I have a cable internet connection split on a hub to four computers. I need each to recieve its DHCP IP address from the ISP and also to have one IP defined by me for my local network.

Code: Select all

ifconfig -a eth0:1 192.168.0.3
on my linux boxes I can use this no problem. However, if I try to add an alias to the /etc/conf.d/net file, my IP defaults to 192.168.1.13 when /etc/init.d/net.eth0 starts; no DHCP, no assigned IP, just the gentoox default.
Is this doable? Can I set it up to recieve an address via DHCP and assign an alias myself at startup?
Last edited by winterborne on Sat Aug 14, 2004 8:35 am, edited 1 time in total.
nobspangle
Gentoox Guru!
Posts: 1681
Joined: Sun Sep 28, 2003 11:59 am
Location: Manchester, UK

Post by nobspangle »

Replace the custom /etc/init.d/net.eth0 file with the original gentoo one, then you should be ok to add your alias in conf.d/net in the normal way

Code: Select all

iface_eth0="dhcp"
alias_eth0="192.168.0.3"
broadcast_eth0="192.168.0.255"
netmask_eth0="255.255.255.0"
If you keep an open mind, will your brain fall out?
winterborne
Pro
Posts: 93
Joined: Mon Nov 17, 2003 9:45 am
Location: Canada

Post by winterborne »

The funniest thing happened...
When I restarted /etc/init.d/net.eth0 it behaved as above... but I had to shut down my xbox (friend rented the new LotR game and we had to try it out) and when I rebooted it worked just as it should have.
Post Reply