Изучаю маршрутизацию в Linux.
boris@ubuntu:~$ ifconfig
enp0s25 Link encap:Ethernet HWaddr b4:99:ba:57:d2:42
UP BROADCAST MULTICAST MTU:1500 Metric:1
RX packets:0 errors:0 dropped:0 overruns:0 frame:0
TX packets:0 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:0 (0.0 B) TX bytes:0 (0.0 B)
Interrupt:20 Memory:d4700000-d4720000
lo Link encap:Local Loopback
inet addr:127.0.0.1 Mask:255.0.0.0
inet6 addr: ::1/128 Scope:Host
UP LOOPBACK RUNNING MTU:65536 Metric:1
RX packets:215 errors:0 dropped:0 overruns:0 frame:0
TX packets:215 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1
RX bytes:17353 (17.3 KB) TX bytes:17353 (17.3 KB)
wlp36s0b1 Link encap:Ethernet HWaddr 20:10:7a:01:9d:1a
inet addr:192.168.0.32 Bcast:192.168.0.255 Mask:255.255.255.0
inet6 addr: fe80::c5e9:633f:a3ff:f6b7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:105 errors:0 dropped:0 overruns:0 frame:0
TX packets:151 errors:0 dropped:0 overruns:0 carrier:0
collisions:0 txqueuelen:1000
RX bytes:61603 (61.6 KB) TX bytes:31603 (31.6 KB)
boris@ubuntu:~$ sudo ifconfig enp0s25 10.170.0.1 up
boris@ubuntu:~$ sudo route add 10.170.10.1 gw 192.168.0.1
boris@ubuntu:~$ sudo route del default
boris@ubuntu:~$ sudo route add default gw 10.170.10.1
Но не пингуется, в чём проблема?