Portál AbcLinuxu, 5. listopadu 2025 22:04
yakumo:~# 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 eth0
iface eth0 inet static
address 192.168.0.25
netmask 255.255.255.0
network 192.168.0.0
broadcast 192.168.0.255
gateway 192.168.0.1
# dns-* options are implemented by the resolvconf package, if installed
dns-nameservers 192.168.0.1
/etc/init.d/networking restartAle pozor na SSHčko
nohupem. V nejhorším budete muset službu v serverovně požádat obsluhu o restart stroje.
Mně se kdysi stalo, že jsem udělal /etc/init.d/networking restart, síť se stopla, SSH tedy umřelo, procesu se poslal SIGHUP a už nenaskočila. Protože v serveru nemám grafickou kartu a nemám sériovou konzoli, musel jsem to natvrdo restartovat
Podivej do /etc/hosts jestli tam neni spojena se starou IP.
Tiskni
Sdílej:
ISSN 1214-1267, (c) 1999-2007 Stickfish s.r.o.