December 2018
Beginner
826 pages
22h 54m
English
This can be accomplished with the ip address command, but does require root.
In this example, I chose another IP in the 192.168.33.0/24 subnet, which I know isn't in use:
$ sudo ip address add 192.168.33.22/24 dev eth1
Checking our eth1 interface, we can now see the secondary IP:
3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast state UP group default qlen 1000 link/ether 08:00:27:0d:d9:0c brd ff:ff:ff:ff:ff:ff inet 192.168.33.10/24 brd 192.168.33.255 scope global noprefixroute eth1 valid_lft forever preferred_lft forever inet 192.168.33.22/24 scope global secondary eth1 valid_lft ...