You are not logged in.

#1 2007-09-10 17:54:07

CaspianXI
Member
Registered: 2007-05-29
Posts: 59

Bringing an interface down using a network profile

I use netcfg to switch between network profiles... but when I switch from a profile using ethernet to a profile using wireless, it just adds the other interface... so that both ethernet and wireless are up.

The only way I know to bring an interface down (say, ethernet) is to edit NET_PROFILES in /etc/rc.conf and put in a profile using wireless, and do /etc/rc.d/network restart.

But is there an easier way? Is there some sort of command I can put inside my profile which uses wireless to bring down the ethernet interface?

Thanks.

Offline

#2 2007-09-10 19:27:05

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

Re: Bringing an interface down using a network profile

Run the netcfg command with no arguments to see the available options.

Offline

#3 2007-09-11 01:01:50

F
Member
Registered: 2006-10-09
Posts: 322

Re: Bringing an interface down using a network profile

I'm not infront of a Linux box right now, but perhaps if you could run, as root:

# ifconfig eth0 down;

of course, replace eth0 with the appropriate interface you wish to take down.


p.s. - I hope i'm not completely getting your question wrong because I feel I may be. neutral

Offline

#4 2007-09-11 01:33:43

CaspianXI
Member
Registered: 2007-05-29
Posts: 59

Re: Bringing an interface down using a network profile

Ok, I feel like a total n00b now... thanks for your help smile.

Last edited by CaspianXI (2007-09-11 01:39:39)

Offline

#5 2007-09-11 10:48:10

klixon
Member
From: Nederland
Registered: 2007-01-17
Posts: 525

Re: Bringing an interface down using a network profile

And to "follow the true netcfg-way"

# netcfg --stop <profile-name>

Last edited by klixon (2007-09-11 10:48:43)


Stand back, intruder, or i'll blast you out of space! I am Klixon and I don't want any dealings with you human lifeforms. I'm a cyborg!

Offline

Board footer

Powered by FluxBB