ip

Differences

This shows you the differences between two versions of the page.

Link to this comparison view

Both sides previous revision Previous revision
Next revision
Previous revision
ip [2019/04/09 18:41] – [Setup with VLAN tag] adminip [2019/10/24 07:12] (current) – [Setup a secondary IP on the same physical device] admin
Line 52: Line 52:
 ip addr del 172.16.134.5/23 dev ens33 label ens33:1 ip addr del 172.16.134.5/23 dev ens33 label ens33:1
 </code> </code>
 +
 +==== To make it permanent ====
 +
 +To make it permanent, you do it using ''nmcli'' or just add the following lines into ''ifcfg-ens33'' file:
 +
 +<code bash>
 +IPADDR1=172.16.134.5
 +PREFIX1=23
 +</code>
 +
 +The ''nmcli'' command:
 +
 +<code bash>
 +nmcli con mod ens192 +ipv4.addresses "172.16.134.5/23"
 +</code>
 +
 +When done, just restart network: ''systemctl restart network''
 +
 +
  
 ===== Remove (delete) an IP address ===== ===== Remove (delete) an IP address =====
Line 62: Line 81:
 In some circumstances, a VLAN tagging is necessary. In this chapter, I show how-to setup such an interface. In some circumstances, a VLAN tagging is necessary. In this chapter, I show how-to setup such an interface.
  
-^What           ^ ^Value              +^ What                ^ Value               
-|Physical device|:|ens2f0             +| Physical device  | :  | ens2f0              
-|IP address     |:|192.168.1.54       +| IP address       | :  | 192.168.1.54        
-|Netmask/Prefix |:|255.255.255.0 / 24 | +| Netmask/Prefix   | :  | 255.255.255.0 / 24  
-|VLAN interface |:|ens2f0.70          |+| VLAN interface   | :  | ens2f0.90           |
  
 ==== Add a vlan tag to an interface ==== ==== Add a vlan tag to an interface ====
  • ip.1554828105.txt.gz
  • Last modified: 2019/04/09 18:41
  • by admin