On 09/04/2016 05:00 PM, Ulf Volmer wrote:>> IPADDR2=192.168.1.10 >> BROADCAST2=192.168.1.255 <-- >> NETMASK2=255.255.255.0 >> NETWORK2=192.168.1.0 <-- >> GATEWAY2=192.168.1.1 <-- >> >> in case they don't match the first IP address? > > I'm not sure at this point. If you have to add a second ip in another > different network maybe you need a virtual device.OK, some testing has been done. you have to specify IPADDR=192.168.0.10 NETMASK=255.255.255.0 NETWORK=192.168.0.0 GATEWAY=192.168.0.1 IPADDR2=192.168.2.10 NETMASK2=255.255.255.0 NETWORK2=192.168.2.0 please note, that you have to specify only one GATEWAY, there can be only one default gateway active. best regards Ulf
On 04.09.2016 17:33, Ulf Volmer wrote:> > OK, some testing has been done. you have to specify > > IPADDR=192.168.0.10 > NETMASK=255.255.255.0 > NETWORK=192.168.0.0 > GATEWAY=192.168.0.1 > IPADDR2=192.168.2.10 > NETMASK2=255.255.255.0 > NETWORK2=192.168.2.0I tried this way; but 'ifconfig' doesn't show these additional addresses ...> please note, that you have to specify only one GATEWAY, there can be > only one default gateway active.sure? thought that IPADDR, GATEWAY, NETMASK and NETWORK must go with, the same with IPADDR2, GATEWAY2, NETMASK2 and NETWORK2 ... Walter
Antonio da Silva Martins Junior
2016-Sep-04 17:37 UTC
[CentOS] more than one IP address on network device?
Hi, It works, but, it didn't create "virtual address" aka "eth0:0", try using "ip" command: "ip addr show dev eth0" Att., Antonio. 2016-09-04 14:27 GMT-03:00 Walter H. <Walter.H at mathemainzel.info>:> On 04.09.2016 17:33, Ulf Volmer wrote: > >> >> OK, some testing has been done. you have to specify >> >> IPADDR=192.168.0.10 >> NETMASK=255.255.255.0 >> NETWORK=192.168.0.0 >> GATEWAY=192.168.0.1 >> IPADDR2=192.168.2.10 >> NETMASK2=255.255.255.0 >> NETWORK2=192.168.2.0 >> > I tried this way; but > 'ifconfig' doesn't show these additional addresses ... > > please note, that you have to specify only one GATEWAY, there can be >> only one default gateway active. >> > sure? > thought that IPADDR, GATEWAY, NETMASK and NETWORK must go with, > the same with IPADDR2, GATEWAY2, NETMASK2 and NETWORK2 ... > > Walter > > > _______________________________________________ > CentOS mailing list > CentOS at centos.org > https://lists.centos.org/mailman/listinfo/centos > >-- *Antonio da Silva Martins Jr. * *Analista de Suporte* NPD - N?cleo de Processamento de Dados UEM - Universidade Estadual de Maring? email: *asmartins at uem.br* <asmartins at uem.br> / asmartins.uem at gmail.com fone: +55 (44) 3011-4015 / 3011-4411 inoc-dba: 263076*100 "Real Programmers don?t need comments ? the code is obvious."
On 09/04/2016 07:27 PM, Walter H. wrote:> On 04.09.2016 17:33, Ulf Volmer wrote:>> please note, that you have to specify only one GATEWAY, there can be >> only one default gateway active. > sure? > thought that IPADDR, GATEWAY, NETMASK and NETWORK must go with, > the same with IPADDR2, GATEWAY2, NETMASK2 and NETWORK2 ...There can be only one default gateway defined on you system. Yes, sure. best regards Ulf
Jonathan Billings
2016-Sep-05 12:27 UTC
[CentOS] more than one IP address on network device?
On Sep 4, 2016, at 1:27 PM, Walter H. <walter.h at mathemainzel.info> wrote:> 'ifconfig' doesn't show these additional addresses ...This is one of the many reasons why people don?t use ?ifconfig? anymore. -- Jonathan Billings <billings at negate.org>