wiki:add_additional_ip_address_interface
Differences
This shows you the differences between two versions of the page.
| Next revision | Previous revision | ||
| wiki:add_additional_ip_address_interface [2022/09/19 21:38] – created antisa | wiki:add_additional_ip_address_interface [2025/10/14 12:22] (current) – [Add additional ip address on interface] remove duplicate code antisa | ||
|---|---|---|---|
| Line 1: | Line 1: | ||
| - | {{tag> | + | {{tag> |
| ====== Add additional ip address on interface ====== | ====== Add additional ip address on interface ====== | ||
| + | First make sure the interface is up: | ||
| + | ip link set eth0 up | ||
| + | |||
| + | then add an address: | ||
| ip addr add 94.130.84.168/ | ip addr add 94.130.84.168/ | ||
| - | |||
| - | |||
| - | root@server: | ||
| /// | /// | ||
| Line 55: | Line 56: | ||
| </ | </ | ||
| + | ===== Adding routes ===== | ||
| + | Change IPs accordingly: | ||
| + | |||
| + | If you get an error: | ||
| + | # ip route add default via 15.235.15.254 dev br0 | ||
| + | Error: Nexthop has invalid gateway. | ||
| + | |||
| + | You have to add a route to the gateway itself: | ||
| + | ip route add 15.235.15.0/ | ||
| + | |||
| + | Then you can add a default route. | ||
| + | ip route add default via 15.235.15.254 dev br0 | ||
| + | |||
| + | If you get: | ||
| + | connect: Network unreachable | ||
| + | when trying to ping an address, you have to add a default route. | ||
| ====== Tested on ====== | ====== Tested on ====== | ||
| * | * | ||
| ====== See also ====== | ====== See also ====== | ||
| + | * [[set_up_ipv6_host_vm|Set up IPv6 on host and VM]] - example of IPv6 addresses and routes | ||
| ====== References ====== | ====== References ====== | ||
| + | * https:// | ||
wiki/add_additional_ip_address_interface.1663623520.txt.gz · Last modified: by antisa
