how to set the network in CentOS server with the new feature redistribute neighbor ?


I am testing the new featrue Redistribute Neighbor with the CentOS servers. But I found that setting the gateway for the eth which belong to subnet /32 could not be done! (In Ubuntu server it is OK).
In Ubuntu, the networking is like:
auto eth3
iface eth3 inet static
address 192.168.1.12/32
up ip route add 192.0.0.0/8 nexthop via 192.168.1.251 dev eth3 onlink

But, In CentOS, it can not be done.

11 replies

Userlevel 2
How can a /32 have a gateway? Isn't that by definition a 1-address "network"?
Will Dennis wrote:

How can a /32 have a gateway? Isn't that by definition a 1-address "network"?

Yes, it is possible. In Cumulus Redistribute Neighbor, the server is needed to be set as the 1-address network.
I just found the method to set the gateway in different subnet in CentOS:
in /etc/sysconfig/network-scripts/route-eth3, you should add
192.168.1.251/32 dev eth3 #different subnet Gateway
default via 192.168.1.251
Userlevel 4
This should be possible, have you tried the older syntax, to declare the subnet mask using "netmask"? What is the error you're seeing when you attempt to apply the config on centos?
Eric Pulvino wrote:

This should be possible, have you tried the older syntax, to declare the subnet mask using "netma...

The error is "SIOCADDRT: No such process".
Thank you, I just solved the problem.
I am very interested in your setup, do you mind share your cumulus config?
is 192.168.1.251 anycast gateway?

also if ubunut/centos are /32 onlink to gateway, how would this OS matters, cumulus just see a ARP entry, right?

Eric Dong wrote:

I am very interested in your setup, do you mind share your cumulus config?
is 192.168.1.251 anyca...

Yes, no matter the network setting in server, Cumulus just see a ARP entry.
the config of networking in cumulus is like:
auto lo:1
iface lo:1 inet static
address 10.1.0.253/32

auto swp1
iface swp1 inet static
address 10.1.0.253/32

auto swp2
iface swp2 inet static
address 10.1.0.253/32

auto swp3
iface swp3 inet static
address 10.1.0.253/32

auto swp4
iface swp4 inet static
address 10.1.0.253/32

auto swp5
iface swp5 inet static
address 10.1.0.253/32

auto swp6
iface swp6 inet static
address 10.1.0.253/32
Eric Dong wrote:

I am very interested in your setup, do you mind share your cumulus config?
is 192.168.1.251 anyca...

thanks for sharing, but still confused, 192.168.1.251 and 10.1.0.253, how are they connected, are you running docker/hypervisor between cumulus and ubunto/centos?
Eric Dong wrote:

I am very interested in your setup, do you mind share your cumulus config?
is 192.168.1.251 anyca...

Oh, sorry,my mistake. Servers are directly connected to the cumulus switch. The right config is:
auto lo:1
iface lo:1 inet static
address 192.168.1.251/32

auto swp1
iface swp1 inet static
address 192.168.1.251/32

auto swp2
iface swp2 inet static
address 192.168.1.251/32

auto swp3
iface swp3 inet static
address 192.168.1.251/32

auto swp4
iface swp4 inet static
address 192.168.1.251/32

auto swp5
iface swp5 inet static
address 192.168.1.251/32

auto swp6
iface swp6 inet static
address 192.168.1.251/32
Eric Dong wrote:

I am very interested in your setup, do you mind share your cumulus config?
is 192.168.1.251 anyca...

nice, what is the benefit of this l3 only anycast gateway, other than - now it doesn't matter where I connect my servers....

is your server physical or virtual, if they move, I am very curious to find out the convergence time, from host move to cumulus pick up the new location and advertise to whole network.
Eric Dong wrote:

I am very interested in your setup, do you mind share your cumulus config?
is 192.168.1.251 anyca...

I agree with you. The benefit is just to make it easy to manage the servers connected to the same Cumulus ToR switch.
my servers are virtual, so it is difficult to test the convergence time about the server migration this time.
Eric Dong wrote:

I am very interested in your setup, do you mind share your cumulus config?
is 192.168.1.251 anyca...

thanks, I hope cumulus linux can learn arp base on either rarp or garp, and the reactor to pick up new host/32 is instant, not timer based pulling.

can cumulus folks confirm this?

Reply