Tìm hiểu network trên linux ( network on linux)

set ip ubuntu 16
sudo vim /etc/network/interfaces
dhcp ” thiết lập nhận dhcp động “
iface ens160 inet dhcp
static ” thiết lập ip tĩnh ”
auto ens160
iface ens160 inet static
address 192.168.1.33
netmask 255.255.255.0
network 192.168.1.0
broadcast 192.168.1.255
gateway 192.168.1.1
dns-nameservers 192.168.1.1

sudo systemctl restart networking ” restart network sau khi cấu hình “

set ip ubuntu 18

cd /etc/netplan/
sudo netplan apply

network:
ethernets:
ens32:
addresses:
– x.x.x.x/x
gateway4: x.x.x.x
nameservers:
addresses:
– 8.8.8.8
search:
– google.com
ens34:
addresses:
– 192.168.1.27/24
version: 2

route trên linux ( định tuyến trên linux )
route add default gw 192.168.2.1 em2
route add host
route add net
route add -net 192.168.1.0/24 gw 192.168.2.1 em2
route del -net 192.168.100.0 gw 192 netmask 255.255.255.0 dev em2

trên windows theo guide sau : https://www.howtogeek.com/howto/windows/adding-a-tcpip-route-to-the-windows-routing-table/