IP-Adress for eth0 doesn't change

Kernels & Hardware, configuring network, installing services

IP-Adress for eth0 doesn't change

Postby jubi » 2018-04-21 20:01

Hello,

i want to change the IP-Adress of eth0, to to this, I changed the Interfaces config file to:

Code: Select all
auto eth0
iface eth0 inet static
   address 192.168.2.100
   netmask 255.255.255.0


However, when typing ip addr in the terminal, this comes up, which suggests that it hasn't changed:

Code: Select all
user@debian:~$ ip addr
1: lo: <LOOPBACK,UP,LOWER_UP> mtu 65536 qdisc noqueue state UNKNOWN group default
    link/loopback 00:00:00:00:00:00 brd 00:00:00:00:00:00
    inet 127.0.0.1/8 scope host lo
       valid_lft forever preferred_lft forever
    inet6 ::1/128 scope host
       valid_lft forever preferred_lft forever
2: eth0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether fc:aa:14:21:9c:c5 brd ff:ff:ff:ff:ff:ff
    inet6 fe80::feaa:14ff:fe21:9cc5/64 scope link
       valid_lft forever preferred_lft forever
3: wlan0: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc mq state UP group default qlen 1000
    link/ether ac:7b:a1:1d:e8:e0 brd ff:ff:ff:ff:ff:ff
    inet 192.168.178.166/24 brd 192.168.178.255 scope global dynamic wlan0
       valid_lft 861836sec preferred_lft 861836sec
    inet6 fe80::ae7b:a1ff:fe1d:e8e0/64 scope link
       valid_lft forever preferred_lft forever


What can I do?

Thanks
jubi
 
Posts: 1
Joined: 2018-04-21 19:51

Re: IP-Adress for eth0 doesn't change

Postby ralph.ronnquist » 2018-04-21 22:31

Try with
Code: Select all
# ifdown eth0 ; ifup eth0
User avatar
ralph.ronnquist
 
Posts: 315
Joined: 2015-12-19 01:07
Location: Melbourne, Australia

Re: IP-Adress for eth0 doesn't change

Postby shep » 2018-04-22 08:33

With Static IP's you also need to specify the gateway and how DNS addresses are resolved

See https://wiki.debian.org/NetworkConfiguration#Configuring_the_interface_manually
shep
 
Posts: 222
Joined: 2011-03-15 15:22


Return to System configuration

Who is online

Users browsing this forum: No registered users and 7 guests

fashionable