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 6
Next »
1- static IP address
2- dhcp IP address
show ip address |
|
---|
hostname -I | Debian
root@MistEdge_Proxmox:~# hostname -I
192.168.0.211 fd28:49be:757:7663:1000:200:d:697e
|
nmcli -p device show ens18 | Debian
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/ |
| |
| |
|
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
2- dhcp IP address
root@kali:~# vi /etc/network/interfaces
auto enp0s8
iface enp0s8 inet dhcp
sudo /etc/init.d/networking restart
|
|
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 ??
|
|
|
|
|
|
|