Skip to end of metadata
Go to start of metadata

You are viewing an old version of this page. View the current version.

Compare with Current View Page History

« Previous Version 5 Next »

1- static IP address

2- dhcp IP address




https://linuxize.com/post/how-to-configure-static-ip-address-on-ubuntu-18-04/




ip add command
sudo ifconfig eth1 down
sudo ip addr add 10.10.1.20/24 dev eth1
sudo ifconfig eth1 up

vagrant@srv12:~$ ip addr
. . . 
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000
    link/ether 08:00:27:6d:f5:a6 brd ff:ff:ff:ff:ff:ff
    inet 10.10.1.20/24 scope global eth1
       valid_lft forever preferred_lft forever
    inet6 fe80::a00:27ff:fe6d:f5a6/64 scope link
       valid_lft forever preferred_lft forever

dhcp
2- dhcp IP address
root@kali:~# vi /etc/network/interfaces
auto enp0s8
iface enp0s8 inet dhcp



sudo /etc/init.d/networking restart

ip add
1- static ip addr and dns
1- set IP@
2- restart
3- set resolv.conf

Static IP@:

root@kali:~# vi /etc/network/interfaces
auto enp0s8
iface enp0s8 inet static
address 192.168.221.190
netmask 255.255.255.0
gateway 192.168.221.1
dns-nameservers 8.8.8.8



sudo /etc/init.d/networking restart

systemctl  restart networking ??












  • No labels