Multiple IP on a single interface & ovh bridge setup


#1

Also i want to do this:

auto eth0
iface eth0 inet static
address 198.99.192.164
netmask 255.255.255.255
broadcast 198.99.192.164
post-up route add 167.99.1.254 dev eth0
post-up route add default gw 167.99.1.254
pre-down route del 167.99.1.254 dev eth0
pre-down route del default gw 167.99.1.254
auto eth0:0
iface eth0:0 inet static
address 198.99.192.165
netmask 255.255.255.255
broadcast 198.99.192.165


#2
set interfaces ethernet eth0 address 198.99.192.164/32
set interfaces ethernet eth0 vif 0 address 198.99.192.165/32
set protocols static interface-route 167.99.1.254/32 next-hop-interface eth0
set protocols static route 0.0.0.0/0 next-hop 167.99.1.254

That might work.


#3

The problem with that setup is this:
after reboot my ip route shows
default dev eth0 proto zebra

No matter if I do ip route del default, that route its always there.
So
is this line the problem?
“set protocols static route 0.0.0.0/0 next-hop 167.99.1.254” ?


#4

Yes, if you do “show ip route” from the vyos cli, you should see something like "recursive is directly connected, eth0). I am not sure why that happens, and it seems wrong to me. Perhaps interface-routes only work on point to point links.

However, that config would only work if 167.99.1.254 could respond to an arp from 198.99.192.164 on eth0. Vyos needs to do that arp to find the mac address of 167.99.1.254. And the “recursive directly connected” will cause Vyos to arp for everything - which would be ok if 167.99.1.254 is setup to do proxy arp, although it will cause a lot of arp traffic.


#5

So what can I do?


#6

Well, what is the configuration on 167.99.1.254 - what ip address does have for your end of the link? What sort of device is that, and do you have control of it, or it that something provided by your upstream?

NetRange:       167.99.0.0 - 167.99.255.255
CIDR:           167.99.0.0/16
Organization:   Harris Methodist Health Services (HMHS)

NetRange:       198.99.192.0 - 198.99.192.255
CIDR:           198.99.192.0/24
Organization:   TransWare Enterprises Inc. (TRANSW)

Are those really your addresses?


#7

Its ovh, http://help.ovh.co.uk/bridgeclient
The real IP gw is 167.114.1.254
So I dont got control of it, dunno whats device is.


#8

Ah, a google for “vyos ovh bridge” turns up http://blog.vsense.fr/2013/03/ovh-architecture/

Does that help?


#9

No, isnt the same than vyatta,
For example:
system {
gateway-address 91.y.y.254
}
That doesn’t work on vyos

And the solution it gave is doing the routes by hand.
“Obviously, this is a configuration which will no longer exist after a reboot. You need to apply this configuration juste after your system boot.”

There must be a way to set it up using vyatta config files


#10

Add the following commands to /opt/vyatta/etc/config/scripts/vyatta-postconfig-bootup.script

route add 167.99.1.254 dev eth2
route add default gw 167.99.1.254

and “delete protocols static” from the vyos config.

At the vyos cli level, there are no static routes. But when the vyos reboots, it will execute that vyatta-postconfig-bootup.script which will install the proper routes.


#11

Oops, in your case, that should be eth0, not eth2.


#12

doing that will be better than editing /etc/networks/interfaces with this?
post-up route add 167.99.1.254 dev eth0
post-up route add default gw 167.99.1.254
pre-down route del 167.99.1.254 dev eth0
pre-down route del default gw 167.99.1.254

This file will be stored in config.boot?
/opt/vyatta/etc/config/scripts/vyatta-postconfig-bootup.script


#13

HellMind did you get this to work? I’m trying to setup VyOS on the Runabove cloud. It uses the same weird addressing system as OVH. I tried everything. There is a bug listed on this page as well:
http://blog.vyos.net/post/99607428923/1-1-0-release
I think it’s still unfixed. Is there somebody with a solution for recursive routing not working with a gateway in a different subnet?


#14

Its working but I dont like it, I cant upgrade without doing everything again.

Anyone did it using the latest version?
is It fixed?


#15

I’m using the latest version and it’s still not working properly. Using Online.net (which from my understanding have a similar setup as OVH) the following will work as a workaround in /config/scripts/vyatta-postconfig-bootup.script:

sudo ip route add 62.210.x.1/32 dev eth2 sudo ip route add default via 62.210.x.1

However it would be nice if we could get an ETA for a proper solution for this problem[/php]


#16

Jhigrgr, that survives an upgrade?


#17

Yes. See also http://bugzilla.vyos.net/show_bug.cgi?id=163

The static interface route can be left in the vyos cli, with only the default route in
/config/scripts/vyatta-postconfig-bootup.script


#18

If you modify vyatta-postconfig-bootup.script, then you install a new vyos, that cfg wont be in the new version.

so its the same than editing the /etc/network/interfaces file

So, there must be a way to make it persistent


#19

I’m not sure if this helps but

I added the route to the to the gateway via an interface route then added a static default route. Seemed to work…

protocols {
static {
interface-route xxx.xxx.xxx.254/32 {
next-hop-interface eth0 {
}
}
route 0.0.0.0/0 {
next-hop xxx.xxx.xxx.254 {
}
}
}
}

Also OVH wants to validate the MACs of your VMs. In there Ip management section you can create an “approved MAC” I’m not sure that is needed.