Closed meandus closed 6 years ago
Hi Remy, BGP is implemented already, although it's bound to the routing node, like in the SMC. Here are some examples: https://smc-python.readthedocs.io/en/latest/pages/reference.html#module-smc.routing.bgp
interface = engine.routing.get(0)
interface.add_bgp_peering(
BGPPeering('mypeer'),
ExternalBGPPeer('neighbor'))
Not for tunnel interface...
Le 18 octobre 2018 16:01:08 GMT+02:00, David LePage notifications@github.com a écrit :
Hi Remy, BGP is implemented already, although it's bound to the routing node, like in the SMC. Here are some examples: https://smc-python.readthedocs.io/en/latest/pages/reference.html#module-smc.routing.bgp
interface = engine.routing.get(0) interface.add_bgp_peering( BGPPeering('mypeer'), ExternalBGPPeer('neighbor'))
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/gabstopper/smc-python/issues/38#issuecomment-431020213
-- Envoyé de mon appareil Android avec K-9 Mail. Veuillez excuser ma brièveté.
Notice the above is grabbing a reference to the routing table interface (engine.routing, not engine.interface). The add_bgp_peering method is only attached to the interface routing node. If you are on the current smc-python version, you can do:
engine = Engine('engine1')
peering = BGPPeering.get_or_create(name='MyPeering')
ext_gw = ExternalGateway.get_or_create(name='MyexternalGW')
engine.tunnel_interface.add_layer3_interface(
interface_id=1020, address='120.120.120.1', network_value='120.120.120.0/24')
routing = engine.routing.get(1020)
routing.add_bgp_peering(peering, ext_gw)
works like a charm !
if i'm using this specific command, i receive: EngineCommandFailed('Impossible to add the specified interface to the target XXXFWXXX . Element appears invalid: XXXFWXXX All Nodes in the Engine Cluster must have the same number of Interfaces.',)
Hi Remy,
You are using the method that adds a single layer 3 interface, but you are running this on a cluster. To do that, you must use engine.tunnel_interface.add_cluster_virtual_interface
.
Like this:
engine = Engine('foo')
peering = BGPPeering.get_or_create(name='MyPeering')
ext_gw = ExternalGateway.get_or_create(name='MyexternalGW')
nodes=[{'address':'4.4.4.2', 'network_value':'4.4.4.0/24', 'nodeid':1},
{'address':'4.4.4.3', 'network_value':'4.4.4.0/24', 'nodeid':2}]
engine.tunnel_interface.add_cluster_virtual_interface(
interface_id=1020,
cluster_virtual='4.4.4.1',
network_value='4.4.4.0/24',
nodes=nodes)
routing = engine.routing.get(1020)
routing.add_bgp_peering(peering, ext_gw)
Hi exactly what i did.
Regards, Rémy
Le 30 octobre 2018 18:31:51 GMT+01:00, David LePage notifications@github.com a écrit :
Hi Remy, You are using the method that adds a single layer 3 interface, but you are running this on a cluster. To do that, you must use
engine.tunnel_interface.add_cluster_virtual_interface
. Like this:engine = Engine('foo') peering = BGPPeering.get_or_create(name='MyPeering') ext_gw = ExternalGateway.get_or_create(name='MyexternalGW') nodes=[{'address':'4.4.4.2', 'network_value':'4.4.4.0/24', 'nodeid':1}, {'address':'4.4.4.3', 'network_value':'4.4.4.0/24', 'nodeid':2}] engine.tunnel_interface.add_cluster_virtual_interface( interface_id=1020, cluster_virtual='4.4.4.1', network_value='4.4.4.0/24', nodes=nodes) routing = engine.routing.get(1020) routing.add_bgp_peering(peering, ext_gw)
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/gabstopper/smc-python/issues/38#issuecomment-434394663
-- Envoyé de mon appareil Android avec K-9 Mail. Veuillez excuser ma brièveté.
Yes on 6.4.3 seems works.
I have to upgrade soon on 6.4.6 do you have try this version ?
Le 30 octobre 2018 18:31:51 GMT+01:00, David LePage notifications@github.com a écrit :
Hi Remy, You are using the method that adds a single layer 3 interface, but you are running this on a cluster. To do that, you must use
engine.tunnel_interface.add_cluster_virtual_interface
. Like this:engine = Engine('foo') peering = BGPPeering.get_or_create(name='MyPeering') ext_gw = ExternalGateway.get_or_create(name='MyexternalGW') nodes=[{'address':'4.4.4.2', 'network_value':'4.4.4.0/24', 'nodeid':1}, {'address':'4.4.4.3', 'network_value':'4.4.4.0/24', 'nodeid':2}] engine.tunnel_interface.add_cluster_virtual_interface( interface_id=1020, cluster_virtual='4.4.4.1', network_value='4.4.4.0/24', nodes=nodes) routing = engine.routing.get(1020) routing.add_bgp_peering(peering, ext_gw)
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/gabstopper/smc-python/issues/38#issuecomment-434394663
-- Envoyé de mon appareil Android avec K-9 Mail. Veuillez excuser ma brièveté.
Yes, this works with >= 6.4.2. smc-python will also be validated against 6.5 officially in the next week.
Good news !
Le 30 octobre 2018 19:56:03 GMT+01:00, David LePage notifications@github.com a écrit :
Yes, this works with >= 6.4.2. smc-python will also be validated against 6.5 officially in the next week.
-- You are receiving this because you authored the thread. Reply to this email directly or view it on GitHub: https://github.com/gabstopper/smc-python/issues/38#issuecomment-434423940
-- Envoyé de mon appareil Android avec K-9 Mail. Veuillez excuser ma brièveté.
Hi David,
Impossible to add a BGP Peering & ExternalBGPPeer to a Tunnel Interface
Could you implement this option on TunnelInterface ?
[18/10/2018 11:46] ETIENNE MILON:
Sans titre