ip link | Link |
---|---|
show the interface | ip link show ip link show ens33 |
bring the interface up | ip link set dev ens33 up |
ip addr | Link |
ip addr ip addr show ens33 | |
Centos | ip addr add 192.168.1.1/24 dev eth0 |
Private IP address | https://linuxhandbook.com/find-ip-address/ | ||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|
| |||||||||||||
| |||||||||||||
Public IP address | https://www.tutorialspoint.com/find-my-public-ip-address-from-linux-command-line | ||||||||||||
curl ifconfig.me | |||||||||||||
Centos | config file | ||||||||||||
dhcp | sudo more /etc/sysconfig/network-scripts/ifcfg-ens18
| ||||||||||||
Static IP address | network-scripts ifcfg-ens ifcfg-eth | ||||||||||||
sudo more /etc/sysconfig/network-scripts/ifcfg-ens18
| |||||||||||||
systemctl restart network.service | |||||||||||||
Ubuntu | Config file | netpla||||||||||||
renderer: networkd | |||||||||||||
renderer: NetworkManager ( not installed by default ) | |||||||||||||
Raspberry + dual IP address | debian | ||||||||||||
more /etc/network/interfaces
| |||||||||||||
networkd | netplan ( ubuntu on AWS ) | ||||||||||||
netplan |
ethernets: ens33:
dhcp4: true version: 2 sudo netplan applysudo netplan get ( get the config information ) ip addr
| ||||||||||||
bond or lag |
| ||||||||||||
vlan |
| ||||||||||||
netplan apply | |||||||||||||
Network Manager |
| ||||||||||||
DHCP | /etc/network/interfaces auto eth1 iface eth1 inet dhcp sudo systemctl restart networking | ||||||||||||
Static |
| ||||||||||||