Contenu | Rechercher | Menus

Annonce

Si vous avez des soucis pour rester connecté, déconnectez-vous puis reconnectez-vous depuis ce lien en cochant la case
Me connecter automatiquement lors de mes prochaines visites.

À propos de l'équipe du forum.

#1 Le 28/09/2012, à 16:50

xunil2003

Modifier l'adresse IP

Bonjour,

Je suis sous Kubuntu 12.04 X86_64.
Quand je veux changer mon adresse ip  en modifiant le fichier /etc/network/interfaces

et le modifiant avec ceci

# 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

# The primary network interface
allow-hotplug eth1
iface eth1 inet static
address 192.168.0.4
netmask 255.255.255.0
gateway 192.168.0.254

auto eth1

puis quand je redémarre mon pc , je vois les postes avec nmap 192.168.0.0-255 sur mon réseau mais je n'est pas internet dans le navigateur firefox, alors qu'avant ça marché avec

laurent@PC-ubuntu:~$ cat  /etc/network/interfaces
auto lo
iface lo inet loopback

laurent@PC-ubuntu:~$ 

Quand je ping sur la freebox ça marche.
Quelle erreur est je fais  ?
Y a-t-il plusieurs fichiers à configurer ?
Je n'ai pas trouvé dans quel fichier indiquer le DNS 1 et 2 ?

Merci.

Dernière modification par xunil2003 (Le 28/09/2012, à 16:51)


- AMD R9 5950x 64 Go Ram / Intel Pentium I7 960 - 12 Go Ram - 6 T0 - Kubuntu 12.04 x64 / Kubuntu 14.04 x64 / Kubuntu 16.04 x64 / Kubuntu 18.04 x64 /  Kubuntu 20.04 x64 / Mint
- DreamPlug Multi Boot / Marvel 1.22 Ghz / Architecture ARM / 512 Mo Ram / Carte-sd 16 Go class 10 / 5 Watts / Debian Squeeze 2.6.39.4
- Raspberry PI 1 / Raspberry PI 2 / Raspberry PI 3 / Raspberry PI 4 : 4Gb
JE SUIS CHARLIE

Hors ligne

#2 Le 28/09/2012, à 17:04

Beta Pictoris

Re : Modifier l'adresse IP

Dans /etc/resolv.conf:

man resolv.conf

Dernière modification par Beta Pictoris (Le 28/09/2012, à 17:04)

Hors ligne

#3 Le 28/09/2012, à 19:34

xunil2003

Re : Modifier l'adresse IP

Bonjour

J'ai ajouté les adresses dns dans le fichier "/etc/resolv.conf" comme ceci

 laurent@PC-ubuntu:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 212.27.40.240
nameserver 212.27.40.241
laurent@PC-ubuntu:~$

Quand je redémarre le service réseau il me dit qu'il y a une faille

laurent@PC-ubuntu:~$ sudo /etc/init.d/networking restart
 * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
 * Reconfiguring network interfaces...                                                                                                    RTNETLINK answers: File exists
Failed to bring up eth1.
                                                                                                                                   [ OK ]
laurent@PC-ubuntu:~$ 

et quand je redémarre le pc il n'y a pas Internet pourtant quand je ping les ip du réseau ça marche ?????
Ou est mon erreur ?

Merci.


- AMD R9 5950x 64 Go Ram / Intel Pentium I7 960 - 12 Go Ram - 6 T0 - Kubuntu 12.04 x64 / Kubuntu 14.04 x64 / Kubuntu 16.04 x64 / Kubuntu 18.04 x64 /  Kubuntu 20.04 x64 / Mint
- DreamPlug Multi Boot / Marvel 1.22 Ghz / Architecture ARM / 512 Mo Ram / Carte-sd 16 Go class 10 / 5 Watts / Debian Squeeze 2.6.39.4
- Raspberry PI 1 / Raspberry PI 2 / Raspberry PI 3 / Raspberry PI 4 : 4Gb
JE SUIS CHARLIE

Hors ligne

#4 Le 28/09/2012, à 19:36

Beta Pictoris

Re : Modifier l'adresse IP

Fait un "ifconfig"

Dernière modification par Beta Pictoris (Le 28/09/2012, à 19:36)

Hors ligne

#5 Le 28/09/2012, à 20:05

xunil2003

Re : Modifier l'adresse IP

Bonjour,

ça marche comme ceci :

/etc/network/interfaces

laurent@PC-ubuntu:~$ cat  /etc/network/interfaces
# 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

# The primary network interface
allow-hotplug eth1
iface eth1 inet static
address 192.168.0.4
netmask 255.255.255.0
gateway 192.168.0.254

auto eth1

laurent@PC-ubuntu:~$

/etc/resolv.conf

laurent@PC-ubuntu:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 212.27.40.240
nameserver 212.27.40.241

laurent@PC-ubuntu:~$ 

puis redémarrage du réseau

laurent@PC-ubuntu:~$ sudo /etc/init.d/networking restart
 * Running /etc/init.d/networking restart is deprecated because it may not enable again some interfaces
 * Reconfiguring network interfaces...                                                                                             [ OK ] 
laurent@PC-ubuntu:~$ 

Vérification

laurent@PC-ubuntu:~$ ifconfig eth1
eth1      Link encap:Ethernet  HWaddr bc:ae:c5:33:64:33  
          inet adr:192.168.0.4  Bcast:192.168.0.255  Masque:255.255.255.0
          adr inet6: fe80::beae:c5ff:fe33:6433/64 Scope:Lien
          UP BROADCAST RUNNING MULTICAST  MTU:1500  Metric:1
          Packets reçus:659 erreurs:0 :0 overruns:0 frame:0
          TX packets:514 errors:0 dropped:0 overruns:0 carrier:0
          collisions:0 lg file transmission:1000 
          Octets reçus:188996 (188.9 KB) Octets transmis:83042 (83.0 KB)
          Interruption:19 Adresse de base:0xc00 
laurent@PC-ubuntu:~$ cat /etc/resolv.conf
# Dynamic resolv.conf(5) file for glibc resolver(3) generated by resolvconf(8)
#     DO NOT EDIT THIS FILE BY HAND -- YOUR CHANGES WILL BE OVERWRITTEN
nameserver 212.27.40.240
nameserver 212.27.40.241

laurent@PC-ubuntu:~$ 

Internet fonctionne.
Merci.


- AMD R9 5950x 64 Go Ram / Intel Pentium I7 960 - 12 Go Ram - 6 T0 - Kubuntu 12.04 x64 / Kubuntu 14.04 x64 / Kubuntu 16.04 x64 / Kubuntu 18.04 x64 /  Kubuntu 20.04 x64 / Mint
- DreamPlug Multi Boot / Marvel 1.22 Ghz / Architecture ARM / 512 Mo Ram / Carte-sd 16 Go class 10 / 5 Watts / Debian Squeeze 2.6.39.4
- Raspberry PI 1 / Raspberry PI 2 / Raspberry PI 3 / Raspberry PI 4 : 4Gb
JE SUIS CHARLIE

Hors ligne

#6 Le 28/09/2012, à 20:43

xunil2003

Re : Modifier l'adresse IP

Bonjour,

Je remarque que le fichier /etc/resolv.conf ce vide des adresse dns  à chaque redémarrage du pc ?
Pourquoi ?

Je suis obligé a chaque redémarrage de remettre dans le fichier les adresse dns  puis de faire

sudo /etc/init.d/networking restart

Comment faire ?
Merci.

Dernière modification par xunil2003 (Le 28/09/2012, à 20:45)


- AMD R9 5950x 64 Go Ram / Intel Pentium I7 960 - 12 Go Ram - 6 T0 - Kubuntu 12.04 x64 / Kubuntu 14.04 x64 / Kubuntu 16.04 x64 / Kubuntu 18.04 x64 /  Kubuntu 20.04 x64 / Mint
- DreamPlug Multi Boot / Marvel 1.22 Ghz / Architecture ARM / 512 Mo Ram / Carte-sd 16 Go class 10 / 5 Watts / Debian Squeeze 2.6.39.4
- Raspberry PI 1 / Raspberry PI 2 / Raspberry PI 3 / Raspberry PI 4 : 4Gb
JE SUIS CHARLIE

Hors ligne

#7 Le 28/09/2012, à 20:59

Beta Pictoris

Re : Modifier l'adresse IP

Désactiver le service resolvconf:

cd /etc/init
sudo mv resolvconf.conf resolvconf.conf.disabled

Dernière modification par Beta Pictoris (Le 28/09/2012, à 21:05)

Hors ligne

#8 Le 28/09/2012, à 22:03

xunil2003

Re : Modifier l'adresse IP

Bonsoir

ça ne marche pas quand je fait :

cd /etc/init
sudo mv resolvconf.conf resolvconf.conf.disabled

puis redémarrage du pc, Pas de connection internet.

En attendent pour avoir internet j'ai du tout faire

cd /etc/init
sudo mv resolvconf.conf.disabled resolvconf.conf

rebooter le pc puis

sudo echo "nameserver 212.27.40.240" >> /etc/resolv.conf
sudo echo "nameserver 212.27.40.241" >> /etc/resolv.conf
sudo /etc/init.d/networking restart

Merci

Dernière modification par xunil2003 (Le 29/09/2012, à 07:36)


- AMD R9 5950x 64 Go Ram / Intel Pentium I7 960 - 12 Go Ram - 6 T0 - Kubuntu 12.04 x64 / Kubuntu 14.04 x64 / Kubuntu 16.04 x64 / Kubuntu 18.04 x64 /  Kubuntu 20.04 x64 / Mint
- DreamPlug Multi Boot / Marvel 1.22 Ghz / Architecture ARM / 512 Mo Ram / Carte-sd 16 Go class 10 / 5 Watts / Debian Squeeze 2.6.39.4
- Raspberry PI 1 / Raspberry PI 2 / Raspberry PI 3 / Raspberry PI 4 : 4Gb
JE SUIS CHARLIE

Hors ligne