[CentOS] more than one IP address on network device?

Sun Sep 4 15:25:23 UTC 2016
Valeri Galtsev <galtsev at kicp.uchicago.edu>

On Sun, September 4, 2016 9:40 am, Walter H. wrote:
> On 04.09.2016 15:18, Ulf Volmer wrote:
>> On 09/03/2016 07:34 PM, Walter H. wrote:
>>> if I would need an additional IPv6 address I'd just add
>>> to this file; if I would need an additional IPv4 address this works
>>> only
>>> by a virtual device
>>> e.g. eth0:1 like this:
>> That's not true, you can add ipv4 address to the interface in the same
>> way:
>> | IPADDR2=
>> | NETMASK2=
>> There is no need to create a virtual network device.
> ah ok, and the other values?
> NETWORK2= <--
> GATEWAY2= <--

Interesting... With these settings, namely GATEWAY2=..., how the
arbitration is done (in networks stack) which of gateways is used for
packets to be sent outside of networks the machine is on?

As far as I know FreeBSD, there can be only one gateway (BTW, synonym:
default gateway). Theoretically, the machine can have more than one
gateway, but for that you need to have specially configured firewall/nat.
Is this somehow different in Linux, and Linux does that auto-magically?


> in case they don't match the first IP address?
> Thanks,
> Walter
> _______________________________________________
> CentOS mailing list
> CentOS at centos.org
> https://lists.centos.org/mailman/listinfo/centos

Valeri Galtsev
Sr System Administrator
Department of Astronomy and Astrophysics
Kavli Institute for Cosmological Physics
University of Chicago
Phone: 773-702-4247