Differences
This shows you the differences between two versions of the page.
| Both sides previous revision Previous revision Next revision | Previous revision | ||
| ip [2019/04/09 08:59] – [Add a vlan tag to an interface] admin | ip [2019/10/24 07:12] (current) – [Setup a secondary IP on the same physical device] admin | ||
|---|---|---|---|
| Line 51: | Line 51: | ||
| <code bash> | <code bash> | ||
| ip addr del 172.16.134.5/ | ip addr del 172.16.134.5/ | ||
| + | </ | ||
| + | |||
| + | ==== To make it permanent ==== | ||
| + | |||
| + | To make it permanent, you do it using '' | ||
| + | |||
| + | <code bash> | ||
| + | IPADDR1=172.16.134.5 | ||
| + | PREFIX1=23 | ||
| + | </ | ||
| + | |||
| + | The '' | ||
| + | |||
| + | <code bash> | ||
| + | nmcli con mod ens192 +ipv4.addresses " | ||
| + | </ | ||
| + | |||
| + | When done, just restart network: '' | ||
| + | |||
| + | |||
| + | |||
| + | ===== Remove (delete) an IP address ===== | ||
| + | |||
| + | <code bash> | ||
| + | ip addr del 172.16.134.5/ | ||
| </ | </ | ||
| ===== Setup with VLAN tag ===== | ===== Setup with VLAN tag ===== | ||
| In some circumstances, | In some circumstances, | ||
| + | |||
| + | ^ What | ||
| + | | Physical device | ||
| + | | IP address | ||
| + | | Netmask/ | ||
| + | | VLAN interface | ||
| ==== Add a vlan tag to an interface ==== | ==== Add a vlan tag to an interface ==== | ||
| Line 66: | Line 97: | ||
| <code bash> | <code bash> | ||
| - | ip addr add 10.90.1.54/24 dev ens2f0.901 | + | ip addr add 192.168.1.54/24 dev ens2f0.90 |
| </ | </ | ||
| Line 72: | Line 103: | ||
| <code bash> | <code bash> | ||
| - | ip route add default via 10.90.1.1 dev ens2f0.901 | + | ip route add default via 192.168.1.1 dev ens2f0.90 |
| </ | </ | ||