Nie jesteś zalogowany.
Jeśli nie posiadasz konta, zarejestruj je już teraz! Pozwoli Ci ono w pełni korzystać z naszego serwisu. Spamerom dziękujemy!
Prosimy o pomoc dla małej Julki — przekaż 1% podatku na Fundacji Dzieciom zdazyć z Pomocą.
Więcej informacji na dug.net.pl/pomagamy/.


 Użytkownik
	


Witam
Mam problem z ustawieniem statycznego ip dla sieci wifi.
zmian dokonałem w /etc/network/interfaces następująco:
root@torus:/etc/network# cat interfaces
# This file describes the network interfaces available on your system
# and how to activate them. For more information, see interfaces(5).
source /etc/network/interfaces.d/*
# The loopback network interface
# przed zmiana
auto lo
iface lo inet loopback
### dodane - po zmianie
iface wlan0 inet static
        address 192.168.0.229
        netmask 255.255.255.0
        network 192.168.0.1
        broadcast 192.168.0.255
        gateway 192.168.0.1
root@torus:/etc/network#Gdzie jest błąd? Coś żle robie?
Offline





 Szczawiożerca
	





Sprawdź adresy network i gateway.
Offline


 Użytkownik
	


root@torus:/home/torus# route -n Kernel IP routing table Destination Gateway Genmask Flags Metric Ref Use Iface 0.0.0.0 192.168.0.1 0.0.0.0 UG 600 0 0 wlp60s0 169.254.0.0 0.0.0.0 255.255.0.0 U 1000 0 0 wlp60s0 192.168.0.0 0.0.0.0 255.255.255.0 U 600 0 0 wlp60s0 root@torus:/home/torus#
Co do network to nie wiem czy nie powinienem tego usnac?
Offline


 Użytkownik
	


czy to powinno wyglądać tak?
iface wlan0 inet static
        address 192.168.0.229
        netmask 255.255.255.0
        network 192.168.0.0
        broadcast 192.168.0.255
        gateway 192.168.0.1Offline

 Użytkownik
	

powinno zadziałać, możesz też spróbować
iface wlan0 inet static
        address 192.168.0.229/24
        broadcast 192.168.0.255
        gateway 192.168.0.1Offline


 Użytkownik
	


nie działa
root@torus:/home/torus# ifconfig -a
enp59s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether a4:4c:c8:74:46:2c  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        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  (Local Loopback)
        RX packets 104  bytes 7916 (7.7 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 104  bytes 7916 (7.7 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
wlp60s0: flags=4163<UP,BROADCAST,RUNNING,MULTICAST>  mtu 1500
        inet 192.168.0.31  netmask 255.255.255.0  broadcast 192.168.0.255
        inet6 fe80::4c87:9481:6736:f58e  prefixlen 64  scopeid 0x20<link>
        ether d4:25:8b:fa:91:7d  txqueuelen 1000  (Ethernet)
        RX packets 2032  bytes 2751066 (2.6 MiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 719  bytes 121667 (118.8 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
root@torus:/home/torus# 
root@torus:/home/torus# 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).
source /etc/network/interfaces.d/*
# The loopback network interface
# przed zmiana
auto lo
iface lo inet loopback
### dodane - po zmianie, 
#iface wlan0 inet static
#address 192.168.0.229
#netmask 255.255.255.0
#network 192.168.0.0
#broadcast 192.168.0.255
#gateway 192.168.0.1
iface wlan0 inet static
address 192.168.0.229/24
broadcast 192.168.0.255
gateway 192.168.0.1
root@torus:/home/torus#Offline





 Szczawiożerca
	





Jak już poprawiłeś adresy, to teraz popraw jeszcze nazwy interfejsów sieciowych ;)
Offline

 Użytkownik
	

Ha, racja wlp60s0 zamiast wlan0.
Offline


 Użytkownik
	


Niestety ale nie działa. Coś jest jeszcze nie tak. 
Po zmianie wygląda to następująco:
root@torus:/home/torus# ifconfig -a
enp59s0: flags=4099<UP,BROADCAST,MULTICAST>  mtu 1500
        ether a4:4c:c8:74:46:2c  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        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  (Local Loopback)
        RX packets 408  bytes 32408 (31.6 KiB)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 408  bytes 32408 (31.6 KiB)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
wlp60s0: flags=4098<BROADCAST,MULTICAST>  mtu 1500
        ether d4:25:8b:fa:91:7d  txqueuelen 1000  (Ethernet)
        RX packets 0  bytes 0 (0.0 B)
        RX errors 0  dropped 0  overruns 0  frame 0
        TX packets 0  bytes 0 (0.0 B)
        TX errors 0  dropped 0 overruns 0  carrier 0  collisions 0
root@torus:/home/torus# 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).
source /etc/network/interfaces.d/*
# The loopback network interface
# przed zmiana
auto lo
iface lo inet loopback
### dodane - po zmianie, jak cos to usun tylko ponizsze
#iface wlan0 inet static
#address 192.168.0.229
#netmask 255.255.255.0
#network 192.168.0.0
#broadcast 192.168.0.255
#gateway 192.168.0.1
iface wlp60s0 inet static
address 192.168.0.229/24
broadcast 192.168.0.255
gateway 192.168.0.1
root@torus:/home/torus#Offline

 Użytkownik
	

wlp60s0 chyba nie jest "UP", bo
(flags=4098<BROADCAST,MULTICAST>)
spróbuj zrobić
ifup wlp60s0
Offline


 Użytkownik
	


też nie działa:
torus@torus:~$ su Hasło: root@torus:/home/torus# cd /etc/network root@torus:/etc/network# cat interfaces # This file describes the network interfaces available on your system # and how to activate them. For more information, see interfaces(5). source /etc/network/interfaces.d/* # The loopback network interface # przed zmiana auto lo iface lo inet loopback ### dodane - po zmianie, iface wlp60s0 inet static address 192.168.0.229/24 broadcast 192.168.0.255 gateway 192.168.0.1 root@torus:/etc/network# ifup wlp60s0 ifup: interface wlp60s0 already configured
po restarcie sieci nie wykrywa.
Nie rozumiem czemu nie mogę wyedytować tego interfaceu przez nmcli:
root@torus:/home/torus# nmcli con edit wlan1 Błąd: nieznane połączenie „wlan1”. root@torus:/home/torus# nmcli con edit wlp60s0 Błąd: nieznane połączenie „wlp60s0”. root@torus:/home/torus# nmcli con edit wifi Błąd: nieznane połączenie „wifi”.
Jaki błąd robie?
Offline







 Palacz
	







Nie możesz użyć do skonfigurowania połączenia nmtui ?
Offline

 Użytkownik
	

jeśli ma Ci się automatycznie włączać, to dodaj na początku
auto wlp60s0
Offline







 Podobno człowiek...;)
	







Ja bym wifi zostawił domyślnie na DHCP, a tylko dla pojedynczej lokalizacji ustawiał statyczne parametry.
W /etc/network/interfaces jest możliwość ustawiania sieci per-essid, chociaż ostatnio Debian stawia na różne NM, Connmany i inne badziewia.
Tu masz opis, jak w intefaces ustawiać parametry per-essid:
https://wiki.debian.org/DebianOnFreeRunner/WLAN
Chodzi o ten kawałek:
Kod:
# MySSID comes from an id_str above. iface MySSID inet dhcp # default is what's used if there is no id_str setting. # so the 'SomeNetwork' network will use DHCP. iface default inet dhcp iface home inet static # static interface settings, or whatever...
Oczywiście ten przykład dotyczy użycia czystego wpa_supplicanta, a nie NM, Wicd, Connmana czy czegoś podobnego.
Pozdro
Ostatnio edytowany przez Jacekalex (2019-08-19 00:40:41)
Offline