LinuxQuestions.org
Support LQ: Use code LQ3 and save $3 on Domain Registration
Go Back   LinuxQuestions.org > Forums > Linux Forums > Linux - Newbie
User Name
Password
Linux - Newbie This Linux forum is for members that are new to Linux.
Just starting out and have a question? If it is not in the man pages or the how-to's this is the place!

Notices


Reply
  Search this Thread
Old 11-08-2012, 12:32 AM   #1
msddcb
LQ Newbie
 
Registered: Nov 2012
Posts: 3

Rep: Reputation: Disabled
Change to \etc\network\interfaces does not take effect


I recently needed to make a change to the interfaces on a debian build.

I edited the \etc\network\interfaces file and changed the ip address for the eth1 interface and commented out the eth1:0 sub interface as it is not required for the time being.

I then downed the interface, checked using ifconfig the interface was down and the brought it back up.

On checking using ifconfig the sub interface that I had commented out was up and running and responding to a ping.

I then restarted networking \etc\network restart and once restarted checked the eth1:0 interface and it was again active.

A friend advised that the interface must be down before making any changes to the interface file - I have tried to find any confirmation of this without success. Does anyone know if this is a fact ?

What is the correct sequence/process to make changes to the interfaces ?

Thank you to any assistance.

Regards Don
 
Old 11-08-2012, 12:54 AM   #2
freelinuxtutorials
Member
 
Registered: Oct 2009
Posts: 70

Rep: Reputation: 21
-can pls. show here the contents of your /etc/network/interfaces?
-sequence of changing your interfaces config and restarting the networking service should work. Did you run "/etc/init.d/networking restart" after the changes?
 
Old 11-08-2012, 01:05 AM   #3
msddcb
LQ Newbie
 
Registered: Nov 2012
Posts: 3

Original Poster
Rep: Reputation: Disabled
interface file

Here is the interfaces file contents.

After bring interface eth1 down and the up sub interface eth1:0 is still active.


# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).

# The loopback network interface
auto lo
iface lo inet loopback

auto lo:0
iface lo:0 inet static
address 203.144.170.49
netmask 255.255.255.255

# The primary network interface
auto eth0
iface eth0 inet static
address 10.95.238.254
netmask 255.255.255.0

auto eth1
iface eth1 inet static
address 10.95.58.14
netmask 255.255.255.240
post-up route add -net 10.95.0.0 netmask 255.255.0.0 gw 10.95.58.1
pre-down route del -net 10.95.0.0 netmask 255.255.0.0 gw 10.95.58.1
post-up route add -net 192.9.221.0 netmask 255.255.255.0 gw 10.95.58.1
pre-down route del -net 192.9.221.0 netmask 255.255.255.0 gw 10.95.58.1


###auto eth1:0
###iface eth1:0 inet static
### address 10.95.239.254
### netmask 255.255.255.0

auto eth2
iface eth2 inet static
address 192.168.0.254
netmask 255.255.255.0

auto eth3
iface eth3 inet static
address 10.95.57.253
netmask 255.255.255.0
gateway 10.95.57.254
post-up route add -net 10.95.0.0 netmask 255.255.0.0 gw 10.95.57.254
pre-down route del -net 10.95.0.0 netmask 255.255.0.0 gw 10.95.57.254
 
  


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
[SOLVED] /etc/network/interfaces configuration for virtual interfaces nonshatter Linux - Networking 4 10-25-2010 07:22 AM
ifup: couldn't read interfaces file "/etc/network/interfaces" debian lenny lorimer73 Linux - Networking 1 08-24-2010 04:47 PM
[SOLVED] umask change not taking effect mufy AIX 2 01-10-2010 12:39 AM
[SOLVED] umask change not taking effect mufy Linux - Newbie 3 01-10-2010 12:37 AM
Two network interfaces - how do I change the primary one? Apollo77 Linux - Networking 4 01-16-2008 01:41 PM


All times are GMT -5. The time now is 10:39 PM.

Main Menu
Advertisement
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
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration