Answer the question
In order to leave comments, you need to log in
Two addresses per interface or two sub-interfaces on Linux?
In general, in the config file, for example, debian, you can set sub-interface br0:1 br0:2 etc
and using the ip addr add xxxx / xx dev interface command, you can set an additional address for the interface,
but in the first case (with the config file) we will display record that this is a sub interface
and in the second case the address and additional info will be simply written.
Maybe there is a guru who can unwind and explain such nuances?
Well, maybe you can throw an article or something about sub interfaces, and how it is implemented programmatically
Answer the question
In order to leave comments, you need to log in
In general, in the config file for example debian, you can set sub-interface br0:1 br0:2 etc
bash-4.2$ sudo ifconfig eth0:0 192.168.2.5/24
bash-4.2$ sudo ifconfig eth0:1 192.168.3.5/24
if you need 2 ip, then it’s better to make 2 network interfaces, since both ip will be used on the network, and in which case you can fix the problem with the network interface and that part of the packets will go without problems from the working interface.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question