LinuxQuestions.org
Download your favorite Linux distribution at LQ ISO.
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Networking
User Name
Password
Linux - Networking This forum is for any issue related to networks or networking.
Routing, network cards, OSI, etc. Anything is fair game.

Notices

Reply
 
Search this Thread
Old 07-18-2011, 08:34 AM   #1
Joydeep Bakshi
Member
 
Registered: May 2007
Distribution: debian
Posts: 62

Rep: Reputation: 15
How to prevent auto up an interface at /etc/network/interface file ?


I have a ppp0 entry with post-up options like this

````````````
mapping ppp0

map none photon-plus motorola
map timeout: 12
## map init-time: 12 # for slow drivers
map verbose: true
map debug: true

#iface photon-plus inet wvdial
# dialer config in wvdial.conf
#provider tataphoton
#dns-nameservers 208.67.222.222 208.67.220.220
#up ifdown eth0
#up ifdown wlan0
#up /sbin/iwconfig wlan0 txpower off
#up /root/bin/FIREWALL start
#down /sbin/iwconfig wlan0 txpower on||true

iface motorola inet wvdial
# dialer config in wvdial.conf
provider l7i
dns-nameservers 208.67.222.222 208.67.220.220
post-up ifdown eth0
post-up ifdown wlan0
post-up /sbin/iwconfig wlan0 txpower off
post-up /root/bin/FIREWALL start
down /sbin/iwconfig wlan0 txpower on
`````````````

and I don't want to auto up ppp0. It is only for on-demand connection. But when I start the machine, it is also executed and the wifi as well as lan are down because of

``````
post-up ifdown eth0
post-up ifdown wlan0
post-up /sbin/iwconfig wlan0 txpower off
`````````````

If I comment those off then no such problem, hence some how ppp0 executed automatically and there is no [auto ppp0] any where.

So how can I stop this forcefully ?

Thanks
 
Old 07-18-2011, 10:35 AM   #2
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,572

Rep: Reputation: 580Reputation: 580Reputation: 580Reputation: 580Reputation: 580Reputation: 580
Is there an ONBOOT set in the scripts?
 
Old 07-19-2011, 12:04 AM   #3
Joydeep Bakshi
Member
 
Registered: May 2007
Distribution: debian
Posts: 62

Original Poster
Rep: Reputation: 15
No, there is no such configuration at /etc/network/interfaces. Even there is no "auto" keyword associated with ppp0; still the mapping of ppp0 is executed automatically !!

Last edited by Joydeep Bakshi; 07-19-2011 at 12:05 AM.
 
Old 07-20-2011, 03:44 AM   #4
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,572

Rep: Reputation: 580Reputation: 580Reputation: 580Reputation: 580Reputation: 580Reputation: 580
Are you running 2 network scripts? RH & clones supply

1. /etc/rc.d/init.d/network a bash script which is no longer supported because probably the last guy that tried to work with it ended up in a home for the bewildered. It uses stiff in /etc/sysconfig/network-scripts I think (it's been a long time)

2. /etc/rc.d/init.d/NetworkManager pretending to be a bit of gnome's network manager, which I have strong opinions about. That uses different config files but don't ask me what they are.

3. It you _do_ start X then gnome's network manager (with it's settings hidden who knows where) swaggers in and does it's own thing.

chmod -x on some of those.
 
Old 07-20-2011, 03:49 AM   #5
Joydeep Bakshi
Member
 
Registered: May 2007
Distribution: debian
Posts: 62

Original Poster
Rep: Reputation: 15
Nope, it is debian box and without network-manager. I have ifplugd+guessnet combination to auto detect as well as up available eth0 and if missing then only wlan0. But also like to have ppp0 config so that when inserting 3G modem, it just make it up. Everything is fine except the auto executing of ppp0 mapping when I start my PC. And I am banging my head to prevent it.
 
Old 07-20-2011, 09:42 AM   #6
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,572

Rep: Reputation: 580Reputation: 580Reputation: 580Reputation: 580Reputation: 580Reputation: 580
OK, then cheat.

Take the ppp0 device out of udev's rules :-D. Put the mknod command for it into your startup script for ppp0.
 
Old 07-20-2011, 12:41 PM   #7
Joydeep Bakshi
Member
 
Registered: May 2007
Distribution: debian
Posts: 62

Original Poster
Rep: Reputation: 15
No luck. udev rule is there to automatically call ppp0 when inserting modem. So even after removing the rules does not effect auto callup ppp0 after restarting the PC.
 
Old 07-27-2011, 10:57 AM   #8
Joydeep Bakshi
Member
 
Registered: May 2007
Distribution: debian
Posts: 62

Original Poster
Rep: Reputation: 15
Any clue from anyone please ?
 
Old 07-28-2011, 03:43 AM   #9
business_kid
Guru
 
Registered: Jan 2006
Location: Ireland
Distribution: Slackware & Android
Posts: 6,572

Rep: Reputation: 580Reputation: 580Reputation: 580Reputation: 580Reputation: 580Reputation: 580
Look, either
1. Something you are starting is bringing up ppp0.
or
2. ppp0 is coming up because of being initialised in the original machine, or something weird like that.

This is a case where you have to go back through everything. I would start at the way you set up the vm. Now you know how sysadmins earn their money.
By the way, surely you can simply do 'ifconfig ppp0 down' and it will take down a non existent device? has it got an interrupt assigned?
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
Network Interface Configuration File Re-written carlosinfl Red Hat 5 02-21-2011 10:15 PM
How to prevent xen from using a network interface slinx Linux - Virtualization and Cloud 1 04-02-2010 05:27 PM
How NET_TX_SOFTIRQ select network interface when multiple interface exits Mr.J Linux - Kernel 0 06-02-2009 12:17 PM
Find the config file of a network interface helptonewbie Programming 4 11-08-2007 05:51 AM
How to prevent ENOBUFS failures in eth0 interface rylan76 Linux - Networking 3 12-31-2006 04:52 AM


All times are GMT -5. The time now is 01:56 PM.

Main Menu
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration