Versions Compared

Key

  • This line was added.
  • This line was removed.
  • Formatting was changed.

...

show ip address
hostname -I

Debian 

Code Block
titlehostname -I
collapsetrue
root@MistEdge_Proxmox:~# hostname -I
192.168.0.211 fd28:49be:757:7663:1000:200:d:697e



nmcli -p device show ens18

Debian

Code Block
titlenmcli -p device show ens18
collapsetrue
root@MistEdge_Proxmox:~# nmcli -p device show ens18
===============================================================================
                            Device details (ens18)
===============================================================================
GENERAL.DEVICE:                         ens18
-------------------------------------------------------------------------------
GENERAL.TYPE:                           ethernet
-------------------------------------------------------------------------------
GENERAL.HWADDR:                         06:F1:C0:34:EB:F7
-------------------------------------------------------------------------------
GENERAL.MTU:                            1500
-------------------------------------------------------------------------------
GENERAL.STATE:                          100 (connected)
-------------------------------------------------------------------------------
GENERAL.CONNECTION:                     Wired connection 1
-------------------------------------------------------------------------------
GENERAL.CON-PATH:                       /org/freedesktop/NetworkManager/ActiveConnection/10
-------------------------------------------------------------------------------
WIRED-PROPERTIES.CARRIER:               on
-------------------------------------------------------------------------------
IP4.ADDRESS[1]:                         192.168.0.211/24
IP4.GATEWAY:                            192.168.0.1
IP4.ROUTE[1]:                           dst = 0.0.0.0/0, nh = 192.168.0.1, mt = 102
IP4.ROUTE[2]:                           dst = 192.168.0.0/24, nh = 0.0.0.0, mt = 102
IP4.DNS[1]:                             192.168.0.1
IP4.DOMAIN[1]:                          Home
-------------------------------------------------------------------------------
IP6.ADDRESS[1]:                         fe80::4f1:c0ff:fe34:ebf7/64
IP6.GATEWAY:                            --
IP6.ROUTE[1]:                           dst = fe80::/64, nh = ::, mt = 102
-------------------------------------------------------------------------------





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





add temporary ip address

 with: ip address add  commands


ifconfig not install use ifup xxxx and ifdown xxxx

Code Block
titleip 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



add permanent IP addressset as DHCP client


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



sudo /etc/init.d/networking restart


add permanent IP addressstatic IP address


Code Block
titleip add
1- static ip addr and dns
1- set IP@
2- restart 
3-
networking 
set
deamon
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



2- restart networking deamon
-----------------------------

sudo /etc/init.d/networking restart

systemctl  restart networking ??

service networking restart


DNS configuration

set resolv.conf

nameserver 8.8.8.8