Gentoo Forums
Gentoo Forums
Gentoo Forums
Quick Search: in
a network interface i don't intend to use
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
flazz
Guru
Guru


Joined: 22 Nov 2003
Posts: 496
Location: Florida

PostPosted: Wed Sep 26, 2007 2:40 am    Post subject: a network interface i don't intend to use Reply with quote

i have an onboard ethernet adapter (eth0) that i don't use, i use a wireless (ra0) instead.

my /etc/conf.d/net is very simple and it works
Code:

modules=( "!iwconfig" )
config_ra0=( "dhcp" )


but when i boot, it times out on getting a dhcp for eth0. why is this? how can i tell the computer i don't want to use it?
Back to top
View user's profile Send private message
bjlockie
Veteran
Veteran


Joined: 18 Oct 2002
Posts: 1186
Location: Canada

PostPosted: Wed Sep 26, 2007 2:44 am    Post subject: Re: a network interface i don't intend to use Reply with quote

flazz wrote:
i have an onboard ethernet adapter (eth0) that i don't use, i use a wireless (ra0) instead.

my /etc/conf.d/net is very simple and it works
Code:

modules=( "!iwconfig" )
config_ra0=( "dhcp" )


but when i boot, it times out on getting a dhcp for eth0. why is this? how can i tell the computer i don't want to use it?


rm /etc/init.d/net.eth0
Back to top
View user's profile Send private message
jonnevers
Veteran
Veteran


Joined: 02 Jan 2003
Posts: 1594
Location: Gentoo64 land

PostPosted: Wed Sep 26, 2007 2:51 am    Post subject: Re: a network interface i don't intend to use Reply with quote

bjlockie wrote:
rm /etc/init.d/net.eth0

yup, you might be able to disable the device in your BIOS as well. some expose this ability and some do not.
Back to top
View user's profile Send private message
flazz
Guru
Guru


Joined: 22 Nov 2003
Posts: 496
Location: Florida

PostPosted: Wed Sep 26, 2007 3:16 am    Post subject: Reply with quote

so adding and deleting a network interface is as simple as making a symlink net.${the_device_name} -> net.lo? cool.

where are the docs on this?
Back to top
View user's profile Send private message
tarpman
Veteran
Veteran


Joined: 04 Nov 2004
Posts: 1083
Location: Victoria, BC, Canada

PostPosted: Wed Sep 26, 2007 5:46 am    Post subject: Reply with quote

Not quite. The symlink exists to provide an init script for the interface, which allows it to be started and stopped by the sysvinit system. The actual interface still exists as long as the driver is loaded, and chances are if the driver loads correctly udev will start the service for you during hardware detection. There are a few things you need to do to completely disable the interface:

1) rc-update del net.eth0
2) rm /etc/init.d/net.eth0
3) remove support for your particular driver from your kernel, and delete the appropriate module from /lib/modules/`uname -r`/... if it had been previously built as a module.

I wouldn't recommend that, though; wired, though you may rarely or never use it, is a good thing to have around as a fallback in situations where wireless isn't available. My recommendation:

1) leave the symlink alone
2) emerge --ask --verbose ifplugd

sys-apps/ifplugd is a useful tool. It's supported completely by Gentoo's init system, so you don't need to configure it by hand at all; just installing it is enough. It detects whether a cable is plugged into your wired interface, and starts the applicable net service if it is. This means that if no cable is plugged in when you start the system, the interface won't start; but if for some reason you do need or want to use wired net, all you need to do is plug in the cable and it should work just like that.

Documentation is in /etc/conf.d/net.example, as well as in the Gentoo Handbook, which it is highly recommended that you read before and while trying to learn Gentoo.
_________________
Saving the world, one kilobyte at a time.
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