Re: Simple routing question

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]



On 09/06/2012 11:11 PM, Les Mikesell wrote:
> On Thu, Sep 6, 2012 at 3:54 PM, James B. Byrne <byrnejb@xxxxxxxxxxxxx> wrote:
>>
>> I did this.  I put the virtual interface address 192.168.0.1 back onto
>> eth1 of the gateway host and restarted the network services.  The
>> ifcfg file looked like this:
>>
>> BOOTPROTO=none
>> BROADCAST=192.168.255.255
>> DEVICE=eth1:192
>> IPADDR=192.168.0.1
>> IPV6INIT=no
>> MTU=""
>> NAME="LAN - Non-routable"
>> NETMASK=255.255.0.0
>> NETWORK=192.168.0.0
>> ONBOOT=yes
>> ONPARENT=yes
>>
>> After the restart ip addr showed this:
>>
>> 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
>> state UP qlen 1000
>>     link/ether 00:25:90:60:11:8d brd ff:ff:ff:ff:ff:ff
>>     inet aaa.bbb.ccc.1/24 brd aaa.bbb.ccc.255 scope global eth1
>>     inet 192.168.0.1/24 brd 192.168.255.255 scope global eth1:192
>>     inet6 fe80::225:90ff:fe60:118d/64 scope link
>>        valid_lft forever preferred_lft forever
>>
>> Note the cidr suffix on 192.168.0.1 = 24
>>
>> That is not what I expected.  Restarting with the same config did not
>> change the initially observed outcome.
>>
>> SO, I edited ifcfg-eth1:192 and added exactly one line:
>>
>> PREFIX="16"
>>
>> and restarted the network.  ip addr now shows this:
>>
>> 3: eth1: <BROADCAST,MULTICAST,UP,LOWER_UP> mtu 1500 qdisc pfifo_fast
>> state UP qlen 1000
>>     link/ether 00:25:90:60:11:8d brd ff:ff:ff:ff:ff:ff
>>     inet aaa.bbb.ccc.1/24 brd aaa.bbb.ccc.255 scope global eth1
>>     inet 192.168.0.1/16 brd 192.168.255.255 scope global eth1:192
>>     inet6 fe80::225:90ff:fe60:118d/64 scope link
>>        valid_lft forever preferred_lft forever
>>
>>
>> Note that the cidr suffix is now 16.
> 
> I thought it would figure that out from the NETMASK, but OK....

It does.

The question is what does the config file for eth1 look like because when
you bring up an alias interface first the config file for the parent
interface is read and then those values are overwritten by the values in
the alias config file.
So it might be the case that there is a PREFIX=24 definition in the eth1
file and none in the eth1:192 file which so in the end PREFIX=24 would be
used for the alias interface.

Regards,
  Dennis


_______________________________________________
CentOS mailing list
CentOS@xxxxxxxxxx
http://lists.centos.org/mailman/listinfo/centos


[Index of Archives]     [CentOS]     [CentOS Announce]     [CentOS Development]     [CentOS ARM Devel]     [CentOS Docs]     [CentOS Virtualization]     [Carrier Grade Linux]     [Linux Media]     [Asterisk]     [DCCP]     [Netdev]     [Xorg]     [Linux USB]
  Powered by Linux