Pas de ifcfg-eth0

Bonjour,
pas de fichier ifcfg-eth0 sous
/etc/sysconfig/network-scripts/
ça depend de quoi ?
je veux configurer mon serveur dhcp
Configuration: Windows XP
Internet Explorer 6.0

26 réponses

  • Votes
  • Date
  • Date décroissante
Résumé de la discussion

La discussion porte sur la configuration réseau Linux lorsque le fichier ifcfg-eth0 semble absent sous /etc/sysconfig/network-scripts et sur les démarches pour activer l'allocation DHCP sur une interface. Plusieurs réponses suggèrent de vérifier le nom réel de l’interface (eth0, sit0 ou autre) et d’inspecter network-scripts pour repérer le fichier correspondant, en complément de commandes comme lspci et ifconfig. Certains indiquent que le fichier peut apparaître sous un nom légèrement différent et que la configuration DHCP nécessite BOOTPROTO=dhcp dans le fichier, ou à défaut une configuration IP statique via IPADDR et NETMASK. Finalement, un extrait illustre une configuration d’interface avec une adresse IP statique et netmask précise, montrant aussi qu’une approche DHCP peut être choisie selon le matériel et l’environnement réseau.

Bobot (l’IA à votre service)
  1. Modérateur
    Salut,

    Tu n'as pas de eth0 mais sit0
    Tu dois chercher ifcfg-sit0 plutôt
    1. Modérateur
      Re,

      affiche le résultat de
       ls -l /etc/sysconfig/network-scripts/ 
      1. [root@mon_serveur ~]# /sbin/ifconfig -a
        lo Link encap:Local Loopback
        inet addr:127.0.0.1 Mask:255.0.0.0
        inet6 addr: ::1/128 Scope:Host
        UP LOOPBACK RUNNING MTU:16436 Metric:1
        RX packets:111 errors:0 dropped:0 overruns:0 frame:0
        TX packets:111 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:0
        RX bytes:7494 (7.3 KiB) TX bytes:7494 (7.3 KiB)

        sit0 Link encap:IPv6-in-IPv4
        NOARP MTU:1480 Metric:1
        RX packets:0 errors:0 dropped:0 overruns:0 frame:0
        TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
        collisions:0 txqueuelen:0
        RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

        [root@mon_serveur ~]#
        1. [root@mon_serveur ~]# ls -l /etc/sysc
          sysconfig/ sysctl.conf
          [root@mon_serveur ~]# ls -l /etc/sysconfig/net
          netdump netdump_id_dsa.pub networking/
          netdump_id_dsa network network-scripts/
          [root@mon_serveur ~]# ls -l /etc/sysconfig/network-scripts/
          total 360
          -rw-r--r-- 3 root root 302 Oct 16 12:08 ifcfg-etho
          -rw-r--r-- 1 root root 254 Jun 20 2001 ifcfg-lo
          lrwxrwxrwx 1 root root 20 Oct 13 11:37 ifdown -> ../../../sbin/ifdown
          -rwxr-xr-x 1 root root 1026 Jan 23 2001 ifdown-aliases
          -rwxr-xr-x 1 root root 623 Jan 19 2005 ifdown-bnep
          -rwxr-xr-x 1 root root 3860 May 10 2005 ifdown-eth
          -rwxr-xr-x 1 root root 827 Apr 15 2005 ifdown-ippp
          -rwxr-xr-x 1 root root 1769 Mar 28 2005 ifdown-ipsec
          -rwxr-xr-x 1 root root 4352 Sep 10 2004 ifdown-ipv6
          lrwxrwxrwx 1 root root 11 Oct 13 11:37 ifdown-isdn -> ifdown-ippp
          -rwxr-xr-x 1 root root 1235 Feb 1 2005 ifdown-post
          -rwxr-xr-x 1 root root 1082 Sep 15 2003 ifdown-ppp
          -rwxr-xr-x 1 root root 1568 Nov 12 2002 ifdown-sit
          -rwxr-xr-x 1 root root 902 Jun 26 2002 ifdown-sl
          lrwxrwxrwx 1 root root 18 Oct 13 11:37 ifup -> ../../../sbin/ifup
          -rwxr-xr-x 1 root root 12872 Jun 7 2004 ifup-aliases
          -rwxr-xr-x 1 root root 869 Feb 11 2005 ifup-bnep
          -rwxr-xr-x 1 root root 9965 May 25 2005 ifup-eth
          -rwxr-xr-x 1 root root 11466 Aug 19 2004 ifup-ippp
          -rwxr-xr-x 1 root root 8077 Mar 30 2005 ifup-ipsec
          -rwxr-xr-x 1 root root 10466 Oct 17 2004 ifup-ipv6
          -rwxr-xr-x 1 root root 821 Jun 26 2002 ifup-ipx
          lrwxrwxrwx 1 root root 9 Oct 13 11:37 ifup-isdn -> ifup-ippp
          -rwxr-xr-x 1 root root 689 Jun 26 2002 ifup-plip
          -rwxr-xr-x 1 root root 926 Jun 26 2002 ifup-plusb
          -rwxr-xr-x 1 root root 2234 Apr 15 2005 ifup-post
          -rwxr-xr-x 1 root root 4219 Apr 25 2005 ifup-ppp
          -rwxr-xr-x 1 root root 1299 Apr 18 2005 ifup-routes
          -rwxr-xr-x 1 root root 3546 Oct 17 2004 ifup-sit
          -rwxr-xr-x 1 root root 1646 Jun 26 2002 ifup-sl
          -rwxr-xr-x 1 root root 3307 Apr 15 2005 ifup-wireless
          -rwxr-xr-x 1 root root 5432 Jan 12 2005 init.ipv6-global
          -rw------- 3 root root 5 Oct 16 12:08 keys-etho
          -rw-r--r-- 1 root root 9652 May 10 2005 network-functions
          -rw-r--r-- 1 root root 38496 Apr 15 2005 network-functions-ipv6
          [root@mon_serveur ~]#
          1. Modérateur
            Re,

            le fichier existe
            -rw-r--r-- 3 root root 302 Oct 16 12:08 ifcfg-etho 

            Il faut configurer ton interface
            Il s'agit d'un wifi ou ethernet?
            Affiche aussi
            lspci
            1. Modérateur
              Bizarre en effet tu devrais avoir un tel fichier à cet endroit ;-\
              Encore faut-il qu'une interface réseau soit activée, est-ce le cas ?

              Mais en fait le fichier ifcfg-eth0 c'est pour configurer son adresse IP, pour configurer un serveur DHCP c'est dans /etc/dhcpd.conf. que ça se passe.
              1. slt,
                je ne viens pas à interpreter cet erreur !

                #service dhcpd start
                [ok]
                #service dhcpd status
                arrété
                #service dhcpd stop
                échoué
            2. Modérateur
              Salut,

              affiche le résultat de la commande
              /sbin/ifconfig -a
              1. [root@mon_serveur ~]# /sbin/ifconfig -a
                lo Link encap:Local Loopback
                inet addr:127.0.0.1 Mask:255.0.0.0
                inet6 addr: ::1/128 Scope:Host
                UP LOOPBACK RUNNING MTU:16436 Metric:1
                RX packets:111 errors:0 dropped:0 overruns:0 frame:0
                TX packets:111 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:0
                RX bytes:7494 (7.3 KiB) TX bytes:7494 (7.3 KiB)

                sit0 Link encap:IPv6-in-IPv4
                NOARP MTU:1480 Metric:1
                RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                collisions:0 txqueuelen:0
                RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

                [root@mon_serveur ~]#
                1. [root@mon_serveur ~]# lspci
                  00:00.0 Host bridge: Intel Corporation Mobile 915GM/PM/GMS/910GML Express Processor to DRAM Controller (rev 03)
                  00:02.0 VGA compatible controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
                  00:02.1 Display controller: Intel Corporation Mobile 915GM/GMS/910GML Express Graphics Controller (rev 03)
                  00:1d.0 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB UHCI #1 (rev 03)
                  00:1d.7 USB Controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) USB2 EHCI Controller (rev 03)
                  00:1e.0 PCI bridge: Intel Corporation 82801 Mobile PCI Bridge (rev d3)
                  00:1e.2 Multimedia audio controller: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Audio Controller (rev 03)
                  00:1e.3 Modem: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) AC'97 Modem Controller (rev 03)
                  00:1f.0 ISA bridge: Intel Corporation 82801FBM (ICH6M) LPC Interface Bridge (rev 03)
                  00:1f.1 IDE interface: Intel Corporation 82801FB/FBM/FR/FW/FRW (ICH6 Family) IDE Controller (rev 03)
                  02:04.0 Network controller: Intel Corporation PRO/Wireless 2200BG (rev 05)
                  02:06.0 CardBus bridge: ENE Technology Inc CB1410 Cardbus Controller (rev 01)
                  02:08.0 Ethernet controller: Intel Corporation: Unknown device 1092 (rev 03)
                  [root@mon_serveur ~]# ls

                  il s agit d ethernet
                  Merci bp !
                  1. Modérateur
                    Salut,

                    Ok, on avance ;-)
                    Affiche le résultat de
                    cat /etc/sysconfig/network-scripts/ifcfg-eth0


                    1. Slt !
                      re
                      [root@localhost ~]# cat /etc/sysconfig/network-scripts/ifcfg-eth0
                      DEVICE=eth0
                      BOOTPROTO=static
                      BROADCAST=192.168.4.255
                      HWADDR=00:B0:D0:EC:F8:68
                      IPADDR=192.168.4.102
                      NETMASK=255.255.255.0
                      NETWORK=192.168.4.0
                      ONBOOT=yes
                      TYPE=Ethernet
                      [root@localhost ~]#

                      Meeeeerci !
                      1. Modérateur
                        Ok,
                        Je vois que ton interface est en statique.
                        Pour demarrer ton réseau (à faire en root)
                        /etc/init.d/network restart
                        ifconfig -a
                        Ensuite il me semble que c'est ton serveur dhcp qui pose de problèmes.

                        Question bête, depuis quel pc tu m'envoie les résultats?!
                        1. [root@localhost ~]# /etc/init.d/network restart
                          Arrêt de l'interface eth0 : [ OK ]
                          Arrêt de l'interface de loopback : [ OK ]
                          Désactivation de l'acheminement du paquet IPv4 : net.ipv4.ip_forward = 0
                          [ OK ]
                          Activation de l'interface loopback : [ OK ]
                          Activation de l'interface eth0 : [ OK ]
                          [root@localhost ~]# ifconfig -a
                          eth0 Link encap:Ethernet HWaddr 00:B0:D0:EC:F8:68
                          inet adr:192.168.4.102 Bcast:192.168.4.255 Masque:255.255.255.0
                          adr inet6: fe80::2b0:d0ff:feec:f868/64 Scope:Lien
                          UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
                          RX packets:12087 errors:0 dropped:0 overruns:1 frame:0
                          TX packets:756 errors:0 dropped:0 overruns:0 carrier:0
                          collisions:0 lg file transmission:1000
                          RX bytes:1244021 (1.1 MiB) TX bytes:124792 (121.8 KiB)
                          Interruption:11 Adresse de base:0xec00

                          lo Link encap:Boucle locale
                          inet adr:127.0.0.1 Masque:255.0.0.0
                          adr inet6: ::1/128 Scope:Hôte
                          UP LOOPBACK RUNNING MTU:16436 Metric:1
                          RX packets:2081 errors:0 dropped:0 overruns:0 frame:0
                          TX packets:2081 errors:0 dropped:0 overruns:0 carrier:0
                          collisions:0 lg file transmission:0
                          RX bytes:3254188 (3.1 MiB) TX bytes:3254188 (3.1 MiB)

                          sit0 Link encap:IPv6-dans-IPv4
                          NOARP MTU:1480 Metric:1
                          RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                          TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                          collisions:0 lg file transmission:0
                          RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

                          [root@localhost ~]#
                          1. Oui c vrai tu as rason je travaille en paralléle sur deux pc mais ils ont le meme pb (les memes messages d'erreur), je m'intersse plus par le deuxiéme dont :
                            [root@localhost ~]# /etc/init.d/network restart
                            Arrêt de l'interface eth0 : [ OK ]
                            Arrêt de l'interface de loopback : [ OK ]
                            Désactivation de l'acheminement du paquet IPv4 : net.ipv4.ip_forward = 0
                            [ OK ]
                            Activation de l'interface loopback : [ OK ]
                            Activation de l'interface eth0 : [ OK ]
                            [root@localhost ~]# ifconfig -a
                            eth0 Link encap:Ethernet HWaddr 00:B0:D0:EC:F8:68
                            inet adr:192.168.4.102 Bcast:192.168.4.255 Masque:255.255.255.0
                            adr inet6: fe80::2b0:d0ff:feec:f868/64 Scope:Lien
                            UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
                            RX packets:12087 errors:0 dropped:0 overruns:1 frame:0
                            TX packets:756 errors:0 dropped:0 overruns:0 carrier:0
                            collisions:0 lg file transmission:1000
                            RX bytes:1244021 (1.1 MiB) TX bytes:124792 (121.8 KiB)
                            Interruption:11 Adresse de base:0xec00

                            lo Link encap:Boucle locale
                            inet adr:127.0.0.1 Masque:255.0.0.0
                            adr inet6: ::1/128 Scope:Hôte
                            UP LOOPBACK RUNNING MTU:16436 Metric:1
                            RX packets:2081 errors:0 dropped:0 overruns:0 frame:0
                            TX packets:2081 errors:0 dropped:0 overruns:0 carrier:0
                            collisions:0 lg file transmission:0
                            RX bytes:3254188 (3.1 MiB) TX bytes:3254188 (3.1 MiB)

                            sit0 Link encap:IPv6-dans-IPv4
                            NOARP MTU:1480 Metric:1
                            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                            collisions:0 lg file transmission:0
                            RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

                            [root@localhost ~]#service dhcpd start
                            [ok]
                            [root@localhost ~]#service dhcpd status
                            arrété
                            [root@localhost ~]#service dhcpd stop
                            échoué

                            eth0 Link encap:Ethernet HWaddr 00:B0:D0:EC:F8:68
                            inet adr:192.168.4.102 Bcast:192.168.4.255 Masque:255.255.255.0
                            adr inet6: fe80::2b0:d0ff:feec:f868/64 Scope:Lien
                            UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
                            RX packets:17603 errors:0 dropped:0 overruns:1 frame:0
                            TX packets:1270 errors:0 dropped:0 overruns:0 carrier:0
                            collisions:0 lg file transmission:1000
                            RX bytes:1803422 (1.7 MiB) TX bytes:212523 (207.5 KiB)
                            Interruption:11 Adresse de base:0xec00

                            lo Link encap:Boucle locale
                            inet adr:127.0.0.1 Masque:255.0.0.0
                            adr inet6: ::1/128 Scope:Hôte
                            UP LOOPBACK RUNNING MTU:16436 Metric:1
                            RX packets:2129 errors:0 dropped:0 overruns:0 frame:0
                            TX packets:2129 errors:0 dropped:0 overruns:0 carrier:0
                            collisions:0 lg file transmission:0
                            RX bytes:3260148 (3.1 MiB) TX bytes:3260148 (3.1 MiB)

                            sit0 Link encap:IPv6-dans-IPv4
                            NOARP MTU:1480 Metric:1
                            RX packets:0 errors:0 dropped:0 overruns:0 frame:0
                            TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
                            collisions:0 lg file transmission:0
                            RX bytes:0 (0.0 b) TX bytes:0 (0.0 b)

                            Merci pour ton aide présieux
                            • 1
                            • 2