sdecorme
Posts: 7
Joined: Tue Sep 02, 2014 8:07 pm

mettre une adresse fixe à mon RPB 2

Sun Nov 01, 2015 3:33 pm

Bonjour,
Je voudrais figer l'adresse IP de ma framboise.
J'ai lu pas mal de post sur ce forum entre autre donnant la solution en modifiant le fichier

Code: Select all

sudo nano /etc/network/interfaces
qui ouvre un éditeur avec la config du réseau.
Malheureusement mon éditeur m'ouvre un texte vide donc rien à changer.
J'utilise la dernière version de jessie et internet qui fonctionne parfaitement sur la carte.
Merci

totoharibo
Posts: 4450
Joined: Thu Jan 24, 2013 8:43 am

Re: mettre une adresse fixe à mon RPB 2

Sun Nov 01, 2015 5:26 pm

comme tu es (sans doute) en graphique : utilise l'applet correspondant (en haut de l'écran ou dans un menu configuration)
je n'ai pas de RPi sous la main : je ne sais pas comment cela se configure en graphique.

User avatar
DougieLawson
Posts: 39301
Joined: Sun Jun 16, 2013 11:19 pm
Location: A small cave in deepest darkest Basingstoke, UK
Contact: Website Twitter

Re: mettre une adresse fixe à mon RPB 2

Sun Nov 01, 2015 7:16 pm

/etc/network/interfaces

Code: Select all

# interfaces(5) file used by ifup(8) and ifdown(8)

# Please note that this file is written to be used with dhcpcd
# For static IP, consult /etc/dhcpcd.conf and 'man dhcpcd.conf'

# Include files from /etc/network/interfaces.d:
source-directory /etc/network/interfaces.d

auto lo
iface lo inet loopback

auto eth0
iface eth0 inet manual

allow-hotplug wlan0
iface wlan0 inet manual
    wpa-conf /etc/wpa_supplicant/wpa_supplicant.conf
/etc/dhcpcd.conf

Code: Select all

# A sample configuration for dhcpcd.
# See dhcpcd.conf(5) for details.

# Allow users of this group to interact with dhcpcd via the control socket.
#controlgroup wheel

# Inform the DHCP server of our hostname for DDNS.
hostname

# Use the hardware address of the interface for the Client ID.
clientid
# or
# Use the same DUID + IAID as set in DHCPv6 for DHCPv4 ClientID as per RFC4361.
#duid

# Persist interface configuration when dhcpcd exits.
persistent

# Rapid commit support.
# Safe to enable by default because it requires the equivalent option set
# on the server to actually work.
option rapid_commit

# A list of options to request from the DHCP server.
option domain_name_servers, domain_name, domain_search, host_name
option classless_static_routes
# Most distributions have NTP support.
option ntp_servers
# Respect the network MTU.
# Some interface drivers reset when changing the MTU so disabled by default.
#option interface_mtu

# A ServerID is required by RFC2131.
require dhcp_server_identifier

# Generate Stable Private IPv6 Addresses instead of hardware based ones
slaac private

# A hook script is provided to lookup the hostname if not set by the DHCP
# server, but it should not be run by default.
nohook lookup-hostname
interface wlan0
static ip_address=192.168.1.7/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1 8.8.8.8

interface eth0
static ip_address=192.168.1.77/24
static routers=192.168.1.1
static domain_name_servers=192.168.1.1 8.8.8.8
Note: Any requirement to use a crystal ball or mind reading will result in me ignoring your question.

Criticising any questions is banned on this forum.

Any DMs sent on Twitter will be answered next month.
All non-medical doctors are on my foes list.

totoharibo
Posts: 4450
Joined: Thu Jan 24, 2013 8:43 am

Re: mettre une adresse fixe à mon RPB 2

Sun Nov 01, 2015 7:55 pm

en graphique sous Jessie en haut à gauche clique à droite sur le écrans.
En haut de la fenêtre, il y a : configure interface /eth0

clique sur eth0 et à toi de jouer.

Network Manager ne tient pas compte du fichier interfaces.

sdecorme
Posts: 7
Joined: Tue Sep 02, 2014 8:07 pm

Re: mettre une adresse fixe à mon RPB 2

Tue Nov 03, 2015 9:16 pm

parfait ça a marché en mode graphique
Merci

Return to “Français”