Thread: where ifconfig setup/init files?

  1. #1
    Alessio Stella
    Join Date
    May 2008
    Location
    Italy, Bologna
    Posts
    251

    where ifconfig setup/init files?

    Where can i set the value of MTU of an eth permanently? If i do it with ifconfig then at shutdown the set is lost

  2. #2
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Somehwere in init.d there is a network setup shell-script. Modify that so that it sets the correct MTU. [It may call some other script which may be what you want to modify - but the principle is that the network start is done via a shell-script somewhere init.d].

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  3. #3
    Cat without Hat CornedBee's Avatar
    Join Date
    Apr 2003
    Posts
    8,895
    And that init.d script will be configurable using some configuration file.

    For example:
    - Gentoo's /etc/init.d/net.* scripts are configured by /etc/conf.d/net and /etc/conf.d/wireless.
    - ArchLinux's /etc/rc.d/network script is configured by /etc/rc.conf.
    All the buzzt!
    CornedBee

    "There is not now, nor has there ever been, nor will there ever be, any programming language in which it is the least bit difficult to write bad code."
    - Flon's Law

  4. #4
    Alessio Stella
    Join Date
    May 2008
    Location
    Italy, Bologna
    Posts
    251
    Quote Originally Posted by CornedBee View Post
    And that init.d script will be configurable using some configuration file.

    For example:
    - Gentoo's /etc/init.d/net.* scripts are configured by /etc/conf.d/net and /etc/conf.d/wireless.
    - ArchLinux's /etc/rc.d/network script is configured by /etc/rc.conf.
    Thank you I have Debian and I have to wait till Tuesday for a colleague expert to these things
    This is what I dislike of Linux
    How can one find out which file to edit and how to edit it
    "man ifconfig" points at 3 empty files
    /proc/net/socket
    /proc/net/dev
    /proc/net/if_inet6

  5. #5
    Kernel hacker
    Join Date
    Jul 2007
    Location
    Farncombe, Surrey, England
    Posts
    15,677
    Files in /proc are not real files. Those are interfaces to the OS to supply information out of the OS without adding new API functions - instead, the OS pretends to have files in the /proc tree which provides text information to the applications that want it.

    --
    Mats
    Compilers can produce warnings - make the compiler programmers happy: Use them!
    Please don't PM me for help - and no, I don't do help over instant messengers.

  6. #6
    Registered User
    Join Date
    Oct 2001
    Posts
    2,129
    Yes, like Mats says, don't edit the files in /proc, rather, /etc is where your configuration files are.

  7. #7
    Frequently Quite Prolix dwks's Avatar
    Join Date
    Apr 2005
    Location
    Canada
    Posts
    8,057
    Good reading: http://www.debian.org/doc/manuals/re...ateway.en.html

    Maybe you want this.
    10.8.1 Triggering network configuration at boot time
    On boot the /etc/rcS.d/S40networking init script runs the command ifup -a. This brings up all physical interfaces listed in auto stanzas in /etc/network/interfaces.

    These days it is often better to handle network configuration using dynamic methods. Once mechanisms for supporting dynamically changing hardware are in place it becomes simplest to treat static hardware as if it were dynamic too. Booting can then be treated as just another hotplug event. (See Triggering network configuration – hotplug, Section 10.8.2.)

    However, in almost all cases one wants at least the loopback interface lo to be brought up on boot. Therefore, make sure that /etc/network/interfaces includes the following stanzas.

    auto lo

    iface lo inet loopback
    You can list additional physical interface names in auto stanzas if you want them to be brought up on boot too. Never list PCMCIA interfaces in auto stanzas. The PCMCIA cardmgr is started later in the boot sequence than when /etc/rcS.d/S40networking runs.
    dwk

    Seek and ye shall find. quaere et invenies.

    "Simplicity does not precede complexity, but follows it." -- Alan Perlis
    "Testing can only prove the presence of bugs, not their absence." -- Edsger Dijkstra
    "The only real mistake is the one from which we learn nothing." -- John Powell


    Other boards: DaniWeb, TPS
    Unofficial Wiki FAQ: cpwiki.sf.net

    My website: http://dwks.theprogrammingsite.com/
    Projects: codeform, xuni, atlantis, nort, etc.

Popular pages Recent additions subscribe to a feed

Similar Threads

  1. Ressources files
    By mikahell in forum Windows Programming
    Replies: 4
    Last Post: 06-19-2006, 06:50 AM
  2. add source files to embedded VC 4.0
    By George2 in forum C++ Programming
    Replies: 4
    Last Post: 06-13-2006, 03:28 AM
  3. *.cpp and *.h files understanding
    By ElastoManiac in forum C++ Programming
    Replies: 4
    Last Post: 06-11-2006, 04:45 AM
  4. Linking header files, Source files and main program(Accel. C++)
    By Daniel Primed in forum C++ Programming
    Replies: 3
    Last Post: 01-17-2006, 11:46 AM
  5. Multiple Cpp Files
    By w4ck0z in forum C++ Programming
    Replies: 5
    Last Post: 11-14-2005, 02:41 PM