Welcome, Guest. Please login or register.
Did you miss your activation email?

Author Topic: [DE] static IP  (Read 1939 times)

Offline Penyelam

  • User
  • Posts: 220
[DE] static IP
« on: 2017/05/25, 22:27:26 »
Hallo,
ich möchte meinem Desktop eine feste IP geben.
Die /etc/network/interfaces hab ich so geändert:

Code: [Select]
root@siductionbox:~# cat /etc/network/interfaces
auto enp2s0
iface enp2s0 inet static
 address 192.168.178.3
 netmask 255.255.255.0
 broadcast 192.168.178.255
 gateway 192.168.178.1
 dns-nameserver 192.168.178.1
Bei meiner alten Installation hatte das funktioniert (damals noch mit eth0)

ifconfig zeigt auch die neue IP an, aber leider funktioniert kein routing mehr
Code: [Select]
root@siductionbox:~# ifconfig
enp2s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
       inet 192.168.178.3  netmask 255.255.255.0  broadcast 192.168.178.255
       inet6 2003:56:6f02:7b44:8e89:a5ff:fe9d:9cd  prefixlen 64  scopeid 0x0<global>
       inet6 fe80::8e89:a5ff:fe9d:9cd  prefixlen 64  scopeid 0x20<link>
       ether 8c:89:a5:9d:09:cd  txqueuelen 1000  (Ethernet)
       RX packets 2158  bytes 172041 (168.0 KiB)
       RX errors 0  dropped 6  overruns 0  frame 0
       TX packets 241  bytes 25611 (25.0 KiB)
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

lo: flags=73<UP,LOOPBACK,RUNNING>  mtu 65536
       inet 127.0.0.1  netmask 255.0.0.0
       inet6 ::1  prefixlen 128  scopeid 0x10<host>
       loop  txqueuelen 1000  (Lokale Schleife)
       RX packets 40397  bytes 3292768 (3.1 MiB)
       RX errors 0  dropped 0  overruns 0  frame 0
       TX packets 40397  bytes 3292768 (3.1 MiB)                                                                                                                                 
       TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0

root@siductionbox:~# ping 192.168.178.1         
PING 192.168.178.1 (192.168.178.1) 56(84) bytes of data.
From 192.168.178.3 icmp_seq=1 Destination Host Unreachable

Mein System:
Code: [Select]
root@siductionbox:~# inxi -v4 -c6
System:    Host: siductionbox Kernel: 4.10.15-towo.1-siduction-amd64 x86_64 (64 bit gcc: 6.3.0) Desktop: N/A
          Distro: siduction 17.1.0 Patience - kde - (201703051755)                                                                                                               
Machine:   Device: desktop Mobo: MSI model: 870-C45(FX) V2 (MS-7715) v: 1.0 BIOS: American Megatrends v: V3.1 date: 04/16/2012
CPU:       Dual core AMD Athlon II X2 260 (-MCP-) cache: 2048 KB
          flags: (lm nx sse sse2 sse3 sse4a svm) bmips: 12804
          clock speeds: max: 3200 MHz 1: 1900 MHz 2: 1900 MHz
Graphics:  Card: NVIDIA GF119 [GeForce GT 520] bus-ID: 01:00.0
          Display Server: X.org 1.19.3 drivers: nouveau (unloaded: modesetting,fbdev,vesa)
          tty size: 178x43 Advanced Data: N/A for root
Network:   Card: Realtek RTL8111/8168/8411 PCI Express Gigabit Ethernet Controller
          driver: r8169 v: 2.3LK-NAPI port: e800 bus-ID: 02:00.0
          IF: enp2s0 state: up speed: 100 Mbps duplex: full mac: 8c:89:a5:9d:09:cd
Drives:    HDD Total Size: 2120.4GB (34.9% used)
          ID-1: /dev/sda model: Samsung_SSD_840 size: 120.0GB temp: 0C
          ID-2: /dev/sdb model: ST1000DM003 size: 1000.2GB temp: 29C
          ID-3: /dev/sdc model: SAMSUNG_HD103SI size: 1000.2GB temp: 21C
Partition: ID-1: / size: 101G used: 22G (23%) fs: ext4 dev: /dev/sda1
          ID-2: swap-1 size: 9.45GB used: 0.00GB (0%) fs: swap dev: /dev/sda2
Info:      Processes: 176 Uptime: 1:43 Memory: 1116.8/7987.1MB Init: systemd runlevel: 5 Gcc sys: 6.3.0
          Client: Shell (bash 4.4.121) inxi: 2.3.5

Ich bin für jeden Tipp dankbar.


Offline devil

  • Administrator
  • User
  • *****
  • Posts: 4.838
Re: static IP
« Reply #1 on: 2017/05/25, 22:39:25 »
Nutzt du Network-Manager? Wenn ja, so wird die ../interfaces nicht benutzt.

Offline Penyelam

  • User
  • Posts: 220
Re: static IP
« Reply #2 on: 2017/05/25, 23:09:46 »
network-manager ist installiert, ich hab ihn aber nicht bewusst ausgewählt.
Code: [Select]
root@siductionbox:~# apt-cache policy network-manager
network-manager:
  Installiert:           1.6.2-3.3
  Installationskandidat: 1.6.2-3.3
  Versionstabelle:
 *** 1.6.2-3.3 500
        500 https://packages.siduction.org/fixes unstable/main amd64 Packages
        100 /var/lib/dpkg/status
     1.6.2-3 500
        500 http://deb.debian.org/debian unstable/main amd64 Packages
Aber einen impact hat die ../interfaces doch, schließlich komm ich ja nach der Änderung nicht mehr ins Netz.

Offline melmarker

  • User
  • Posts: 2.799
    • g-com.eu
Re: static IP
« Reply #3 on: 2017/05/26, 10:07:51 »
apt purge network-manager ?
Those who would give up essential Liberty, to purchase a little temporary Safety, deserve neither Liberty nor Safety. (Benjamin Franklin, November 11, 1755)
Never attribute to malice that which can be adequately explained by stupidity. (Hanlons razor)

Offline Penyelam

  • User
  • Posts: 220
[solved] static IP
« Reply #4 on: 2017/05/26, 15:28:24 »
Allerbesten Dank,
funktioniert jetzt wie gewünscht.  :)