Restarting network
Apparently '/etc/init.d/networking restart' is depricated. It is not
doing the job any more on squeeze. '/etc/init.d/ifplugd restart' ignores virtual interfaces defined in /etc/network/interfaces. So how do I get my virtual interfaces active after a reboot or restart of the network without having to do 'ifup eth0:0' by hand? Regards Johann -- Johann Spies Telefoon: 021-808 4599 Informasietegnologie, Universiteit van Stellenbosch "Ask, and it shall be given you; seek, and ye shall find; knock, and it shall be opened unto you." Matthew 7:7 -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 20100706071535.GB29770@sun.ac.za">http://lists.debian.org/20100706071535.GB29770@sun.ac.za |
Restarting network
On Tue, Jul 06, 2010 at 09:15:35AM +0200, Johann Spies wrote:
> Apparently '/etc/init.d/networking restart' is depricated. It is not > doing the job any more on squeeze. > > '/etc/init.d/ifplugd restart' ignores virtual interfaces defined in > /etc/network/interfaces. > > So how do I get my virtual interfaces active after a reboot or restart of the > network without having to do 'ifup eth0:0' by hand? Why not use 'auto <interface>' before each interface definition? -- "A search of his car uncovered pornography, a homemade sex aid, women's stockings and a Jack Russell terrier." - http://www.news.com.au/story/0%2C27574%2C24675808-421%2C00.html -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 20100706074318.GT2831@zip.com.au">http://lists.debian.org/20100706074318.GT2831@zip.com.au |
Restarting network
On Tue, Jul 06, 2010 at 05:43:18PM +1000, CaT wrote:
> On Tue, Jul 06, 2010 at 09:15:35AM +0200, Johann Spies wrote: > > Apparently '/etc/init.d/networking restart' is depricated. It is not > > doing the job any more on squeeze. > > > > '/etc/init.d/ifplugd restart' ignores virtual interfaces defined in > > /etc/network/interfaces. > > > > So how do I get my virtual interfaces active after a reboot or restart of the > > network without having to do 'ifup eth0:0' by hand? > > Why not use 'auto <interface>' before each interface definition? I removed it because of this documentation from the Debian Reference Manual: ===================== "Here is how to use the ifplugd package for the internal Ethernet port, e.g. eth0. 1. Remove stanza in "/etc/network/interfaces": "auto eth0" or "allow-hotplug eth0". 2. Keep stanza in "/etc/network/interfaces": "iface eth0 inet ?" and "mapping ?". 3. Install the ifplugd package. 4. Run "sudo dpkg-reconfigure ifplugd". 5. Put eth0 as the "static interfaces to be watched by ifplugd". =================== I did now put the 'auto eth0:0' back and did reboot the system. This time eth0:0 came up. Regards Johann -- Johann Spies Telefoon: 021-808 4599 Informasietegnologie, Universiteit van Stellenbosch "Ask, and it shall be given you; seek, and ye shall find; knock, and it shall be opened unto you." Matthew 7:7 -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 20100706081120.GA3651@sun.ac.za">http://lists.debian.org/20100706081120.GA3651@sun.ac.za |
Restarting network
Johann Spies <jspies@sun.ac.za> writes:
>Apparently '/etc/init.d/networking restart' is depricated. It is not >doing the job any more on squeeze. >'/etc/init.d/ifplugd restart' ignores virtual interfaces defined in >/etc/network/interfaces. >So how do I get my virtual interfaces active after a reboot or restart of the >network without having to do 'ifup eth0:0' by hand? One way is to stop using the long-deprecated interface aliases and instead add secondary addresses to the single interface: iface eth0 inet dhcp up ip addr add W.X.Y.Z/N dev $IFACE down ip addr del W.X.Y.Z/N dev $IFACE That way, you can let ifplugd start eth0, and the above commands will add/remove the additional IP address you had set up on eth0:0 The ip(8) command is in the iproute package. -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 573e.4c33c014.def51@getafix.xdna.net">http://lists.debian.org/573e.4c33c014.def51@getafix.xdna.net |
Restarting network
On Tue, 2010-07-06 at 23:45 +0000, Cameron Hutchison wrote:
> iface eth0 inet dhcp > up ip addr add W.X.Y.Z/N dev $IFACE > down ip addr del W.X.Y.Z/N dev $IFACE Cool - I hadn't realised the $IFACE variable was available there :-) I see there are others too. Thanks, Richard -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 1278468402.3978.15.camel@topaz.wgtn.cat-it.co.nz">http://lists.debian.org/1278468402.3978.15.camel@topaz.wgtn.cat-it.co.nz |
Restarting network
On Tue, Jul 06, 2010 at 11:45:24PM -0000, Cameron Hutchison wrote:
> iface eth0 inet dhcp > up ip addr add W.X.Y.Z/N dev $IFACE > down ip addr del W.X.Y.Z/N dev $IFACE > > That way, you can let ifplugd start eth0, and the above commands will > add/remove the additional IP address you had set up on eth0:0 Thanks! This is useful information. Regards Johann -- Johann Spies Telefoon: 021-808 4599 Informasietegnologie, Universiteit van Stellenbosch "Trust in the LORD with all thine heart; and lean not unto thine own understanding." Proverbs 3:5 -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 20100707065642.GE2883@sun.ac.za">http://lists.debian.org/20100707065642.GE2883@sun.ac.za |
Restarting network
On Tue, Jul 06, 2010 at 11:45:24PM -0000, Cameron Hutchison wrote:
> Johann Spies <jspies@sun.ac.za> writes: > > > One way is to stop using the long-deprecated interface aliases and > instead add secondary addresses to the single interface: > > iface eth0 inet dhcp > up ip addr add W.X.Y.Z/N dev $IFACE > down ip addr del W.X.Y.Z/N dev $IFACE I have the following in my /etc/network/interfaces at the moment: auto lo iface lo inet loopback auto eth0 iface eth0 inet static address 146.232.129.30 netmask 255.255.254.0 gateway 146.232.128.16 dns-domain sun.ac.za dns-nameservers 146.232.20.10 146.232.20.11 146.232.128.10 metric 0 up ip addr add 146.232.129.151/32 dev $IFACE down ip addr del 146.232.129.151/32 dev $IFACE And I cannot stop my network. The following does not work: /etc/init.d/networking stop service networking stop /etc/init.d/ifplugd stop service ifplugd stop sudo ip addr del 146.232.129.151/32 dev eth0:0 sudo ip addr del 146.232.129.151/32 dev $IFACE Only with the following command can I stop the network: sudo ifconfig down Previously everything was easy: just '/etc/init.d/networking stop/start/reload' Regards Johann -- Johann Spies Telefoon: 021-808 4599 Informasietegnologie, Universiteit van Stellenbosch "Trust in the LORD with all thine heart; and lean not unto thine own understanding." Proverbs 3:5 -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 20100707084459.GA5612@sun.ac.za">http://lists.debian.org/20100707084459.GA5612@sun.ac.za |
Restarting network
Johann Spies wrote:
> And I cannot stop my network. The following does not work: > > /etc/init.d/networking stop > service networking stop I am surprised that /etc/init.d/networking stop doesn't stop the network. But if you have brought your network up and then changed your configuration it won't be able to bring down the old now unknown network. Instead you would need to have brought down the network *before* modifying the /etc/network/interfaces file. Because if the network is up and then you modify the interfaces file out from under it then it is too late. You would need to take manual action to get the running system in sync with the configuration file. Of course a reboot would do it but you should be able to manually reconfigure the network to get back in sync okay. (The 'service networking stop' is simply a wrapper script which calls the above and there won't be any functional differences between then. It is a Red Hat thing that doesn't exist in Lenny or before but was added to Squeeze via Ubuntu just barely a year ago.) > /etc/init.d/ifplugd stop > service ifplugd stop I did not see from your information that you had ifplugd configured for these devices. Therefore it doesn't seem like stopping it would be related. And again, using the 'service' wrapper is no different than just calling /etc/init.d/service directly. > sudo ip addr del 146.232.129.151/32 dev eth0:0 The name you are using here, eth0:0, isn't defined in your configuration file. You would need to use the same device name as you specified there which is eth0 not eth0:0. In any case this would just remove the alias and wouldn't bring down the entire device. It would be a component action in the entire process of bringing down the interface. Side Note: If you want to add a label to your interface when it is created you would use the label command to do so. Example: ip addr add 146.232.129.151/32 dev eth0 label eth0:0 > sudo ip addr del 146.232.129.151/32 dev $IFACE That has no chance of working since $IFACE probably isn't defined on the command line. > Only with the following command can I stop the network: > sudo ifconfig down > Previously everything was easy: just > '/etc/init.d/networking stop/start/reload' I think the root cause of your problem is that you had your running network out of sync with the configuration files for your network because the configuration files were modified with the system running. I have hit that many times myself, kicked myself, restored the saved version of the file, brought things down, swapped files, brought things back up. If you didn't know about that issue then it can be very confusing. In any case, a better command to bring down an individual interface is the ifdown command (and its friend ifup to bring it up). sudo ifdown eth0 sudo ifup eth0 Again, this needs the configuration file to be in sync with the running system. But normally that is the case. In which case the above commands work normally and the interface is brought down or up or whatever. Hint: In the old days interfaces were quite static on systems. But with the coming of removable and hotplug devices such as PCMCIA or USB network interface cards there was a need to move to a more dynamic system. Before networking needed to come online at boot time and go offline at shutdown time. But that isn't sufficient now. Now devices come online when they are plugged in and go offline when they are disconnected. Everything has been rewritten to be event driven. For those of us who were used to the old static boot time system it is a little bit of a change in mind set but a worthwhile one because of the new capabilities that it provides. Basically this means that you rarely if ever should have the need to run /etc/init.d/networking stop but would bring an individual interface offline with ifdown eth0 instead. Bob |
Restarting network
On Wed, Jul 07, 2010 at 12:26:16PM -0600, Bob Proulx wrote:
> Hint: In the old days interfaces were quite static on systems. But > with the coming of removable and hotplug devices such as PCMCIA or USB > network interface cards there was a need to move to a more dynamic > system. Thanks for your answer. It makes sense. Having used Linux on my Desktop and since 1995 and on many servers since 2001 it was a bit of an embarrasment having trouble on my PC to start and stop the networking. I was used to how things were done in "the old days" :) Regards Johann -- Johann Spies Telefoon: 021-808 4599 Informasietegnologie, Universiteit van Stellenbosch "And I saw a great white throne, and him that sat on it, from whose face the earth and the heaven fled away; and there was found no place for them. And I saw the dead, small and great, stand before God; and the books were opened; and another book was opened, which is the book of life; and the dead were judged out of those things which were written in the books, according to their works." Revelation 20:11,12 -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 20100708065543.GB21691@sun.ac.za">http://lists.debian.org/20100708065543.GB21691@sun.ac.za |
Restarting network
Hi,
On Thu, Jul 08, 2010 at 08:55:43AM +0200, Johann Spies wrote: > On Wed, Jul 07, 2010 at 12:26:16PM -0600, Bob Proulx wrote: > > Hint: In the old days interfaces were quite static on systems. But > > with the coming of removable and hotplug devices such as PCMCIA or USB > > network interface cards there was a need to move to a more dynamic > > system. > > Thanks for your answer. It makes sense. > > Having used Linux on my Desktop and since 1995 and on many servers since > 2001 it was a bit of an embarrasment having trouble on my PC to start > and stop the networking. I was used to how things were done in "the > old days" :) And ... Desktop support of network configuration had great improvement. I have updated Debian Reference recently reflecting it. http://www.debian.org/doc/manuals/debian-reference/ch05.en.html#_the_modern_network_configuration_for _desktop Unless I want to set up network to the virtual machines, I just use these easy tools. Osamu -- To UNSUBSCRIBE, email to debian-user-REQUEST@lists.debian.org with a subject of "unsubscribe". Trouble? Contact listmaster@lists.debian.org Archive: 20100709141735.GA11839@debian.org">http://lists.debian.org/20100709141735.GA11839@debian.org |
| All times are GMT. The time now is 10:34 AM. |
VBulletin, Copyright ©2000 - 2013, Jelsoft Enterprises Ltd.
Content Relevant URLs by vBSEO ©2007, Crawlability, Inc.