You are not logged in.

#1 2008-05-29 07:31:21

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

"Creating" a network interface

To create a network device, I know I can just add an entry in rc.conf . But what if, say, an interface exists but it's device is just commented out in rc.conf? How can I "create" the device manually without editing rc.conf and rebooting?

I suppose this could be reworded as: How does a network interface get mapped to a device number, and how can I do so manually?

Offline

#2 2008-05-29 10:55:42

tomk
Forum Fellow
From: Ireland
Registered: 2004-07-21
Posts: 9,839

Re: "Creating" a network interface

When the appropriate module is loaded, the interface is created. In Arch, the module is loaded automatically by udev when the device is detected, so you don't have to create anything yourself. For ethernet devices, the next available ethX is assigned i.e. first interface is eth0, second eth1, etc. Similarly for wifi devices - wlan0 etc. The rc.conf entry that you refer to does not create anything - it simply configures an existing interface.

Manual interface configuration is done with ifconfig and optionally, dhcpcd, iwconfig and/or wpa_supplicant, depending on requirements.

<edit>
Also, you don't need to reboot after changing the /etc/rc.conf network config - just restart the network init script.

Offline

#3 2008-05-29 16:24:32

Zepp
Member
From: Ontario, Canada
Registered: 2006-03-25
Posts: 334
Website

Re: "Creating" a network interface

tomk wrote:

just restart the network init script.

/etc/rc.d/network restart

If you want to see what network devices have been detected run ifconfig -a

Offline

#4 2008-05-29 23:10:35

B-Con
Member
From: USA
Registered: 2007-12-17
Posts: 554
Website

Re: "Creating" a network interface

Ah, I see. I was doing just plain ifconfig and not seeing my (not configured in rc.conf) eth0. It shows in ifconfig -a, though. I thought ifconfig did -a by default, now I know that it just shows the configured ones.

I had never taken time to actually look through the rc.d/network script -- doing so has been quit educational. tongue

Thanks guys.

Offline

Board footer

Powered by FluxBB