2,187
edits
(→Change IP Address: Added "Persistent Route") |
(→Change IP Address: Added "Additional IPs / Multihome") |
||
Line 168: | Line 168: | ||
up route add -net 172.32.1.0/24 gw 192.168.1.100 dev eth1 | up route add -net 172.32.1.0/24 gw 192.168.1.100 dev eth1 | ||
=== Additional IPs / Multihome === | |||
To add additional IP addresses to an interface, create sub-interfaces as below. | |||
<pre> | |||
auto eth0:1 | |||
auto eth0:2 | |||
# Sub 1 | |||
iface eth0:1 inet static | |||
address 192.168.1.160 | |||
netmask 255.255.255.0 | |||
# Sub 2 | |||
iface eth0:2 inet static | |||
address 192.168.1.161 | |||
netmask 255.255.255.0 | |||
</pre> | |||
'''RTNETLINK answers: File exists''' - Note that you can't use the same default gateway twice, doing so will cause this error | |||
== Update the OS == | == Update the OS == |