skydive-project / skydive

An open source real-time network topology and protocols analyzer
https://skydive.network
Apache License 2.0
2.65k stars 400 forks source link

Is it feasible to add spine switch into network topology #1702

Open wat101 opened 5 years ago

wat101 commented 5 years ago

I have below topology discovered by lldp probe,

host 1 <---> tor 1
host 2 <---> tor 2

Tor 1 and tor 2 are actually connected through a spine switch. How can I add the spine with correct connections via fabric?

safchain commented 5 years ago

I would suggest to add this information using the configuration file: https://github.com/skydive-project/skydive/blob/master/etc/skydive.yml.default#L102

I would be something like:

fabric:
   SPINE[Name=myspine] -> SPINE_PORT1
   SPINE_PORT1 -> *[Type=switch, Name=<tor name 1>]/<tor 1 portName>
   SPINE[Name=myspine] -> SPINE_PORT2
   SPINE_PORT2 -> *[Type=switch, Name=<tor name 2>]/<tor 2 portName>

Another option is to use the API: http://skydive.network/documentation/cli#topology-rules http://skydive.network/blog/topology-rules.html

wat101 commented 5 years ago

I tried the fabric way. I can see spine1 created but not connected to the tor.

Tor1 and tor2 are auto-discovered via LLDP. I don't know the exact interface on tor1/2 to the spine. It seems I cannot just add an arbitrary port , like "port1", to the tors?

Below is my config.

fabric:
    - SPINE1[Name=spine1] -> SPINE1_PORT1[Name=port1,MTU=9000]
    - SPINE1_PORT1 -> *[Type=switch,Name=Tor1]/port1
    - SPINE1[Name=spine1] -> SPINE1_PORT2[Name=port2,MTU=9000]
    - SPINE1_PORT2 -> *[Type=switch,Name=Tor2]/port1
wat101 commented 5 years ago

I solved my need with below cli. Thanks for the document link! What would be the equivalent config with fabric?

 ./skydive-latest client edge-rule create --src="G.V().Has('Name', 'spine1')" --dst="G.V().Has('Name', 'tor1')" --relationtype="layer2"

 ./skydive-latest client edge-rule create --src="G.V().Has('Name', 'spine1')" --dst="G.V().Has('Name', 'tor2')" --relationtype="layer2"