Skip to content
This repository has been archived by the owner on Feb 1, 2022. It is now read-only.

Modified Topology of Reference Application Failed to Connect #106

Open
hamkuu opened this issue Jan 11, 2016 · 9 comments
Open

Modified Topology of Reference Application Failed to Connect #106

hamkuu opened this issue Jan 11, 2016 · 9 comments

Comments

@hamkuu
Copy link

hamkuu commented Jan 11, 2016

I intended to modify the Test Network Topology into a linear one.

My idea is to break the line between Spine1 and Leaf2, and the line between Spine2 and Leaf1, and setup a new connection between Spine1 and Spine2.

part of the original code in p4factory/mininet/int_ref_topology.py:

link_cfgs = [
    LinkConfig( 'leaf1', 'h1', 0 ),
    LinkConfig( 'leaf1', 'h2', 1 ),
    LinkConfig( 'leaf1', 'spine1', 2, 0 ),
    LinkConfig( 'leaf1', 'spine2', 3, 0 ),

    LinkConfig( 'leaf2', 'h3', 0 ),
    LinkConfig( 'leaf2', 'h4', 1 ),
    LinkConfig( 'leaf2', 'spine1', 2, 1 ),
    LinkConfig( 'leaf2', 'spine2', 3, 1 ),
  ]

I modified it as follows:

link_cfgs = [
    LinkConfig( 'leaf1', 'h1', 0 ),
    LinkConfig( 'leaf1', 'h2', 1 ),
    LinkConfig( 'leaf1', 'spine1', 2, 0 ),
   # LinkConfig( 'leaf1', 'spine2', 3, 0 ),

    LinkConfig( 'leaf2', 'h3', 0 ),
    LinkConfig( 'leaf2', 'h4', 1 ),
   # LinkConfig( 'leaf2', 'spine1', 2, 1 ),
    LinkConfig( 'leaf2', 'spine2', 3, 1 ),

   # New connection
    LinkConfig( 'spine1', 'spine2', 1, 0),
  ]

The topology setup seemed fine, but when I tested pingall under mininet:

mininet> pingall
*** Ping: testing ping reachability
h2 -> X h1 X
h3 -> X X h4
h1 -> h2 X X
h4 -> X h3 X
*** Results: 66% dropped (4/12 received)
mininet> pingall
*** Ping: testing ping reachability
h2 -> X h1 X
h3 -> X X h4
h1 -> h2 X X
h4 -> X h3 X
*** Results: 66% dropped (4/12 received)

Spine1 and Spine2 seemed failed to connect, or failed to exchange routes with each other.

What did I miss?

@cruzj
Copy link
Collaborator

cruzj commented Jan 11, 2016

Hi,

Can you make the following update and try? Basically, use the link numbers on the nodes in sequence without leaving any gaps.

Thanks
John

LinkConfig( 'leaf2', 'spine2', 2, 1 ),

On Jan 11, 2016, at 4:23 AM, Hamkuu Shaw [email protected] wrote:

I intended to modified the Test Network Topology https://githubcom/p4lang/p4factory/tree/master/apps/int#test-network-topology into a linear one

My idea is to break the line between Spine1 and Leaf2, and the line between Spine2 and Leaf1, and setup a new connection between Spine1 and Spine2

part of the original code in p4factory/mininet/int_ref_topologypy:

link_cfgs = [
LinkConfig( 'leaf1', 'h1', 0 ),
LinkConfig( 'leaf1', 'h2', 1 ),
LinkConfig( 'leaf1', 'spine1', 2, 0 ),
LinkConfig( 'leaf1', 'spine2', 3, 0 ),

LinkConfig( 'leaf2', 'h3', 0 ),
LinkConfig( 'leaf2', 'h4', 1 ),
LinkConfig( 'leaf2', 'spine1', 2, 1 ),
LinkConfig( 'leaf2', 'spine2', 3, 1 ),

]
I modified it as follows:

link_cfgs = [
LinkConfig( 'leaf1', 'h1', 0 ),
LinkConfig( 'leaf1', 'h2', 1 ),
LinkConfig( 'leaf1', 'spine1', 2, 0 ),

LinkConfig( 'leaf1', 'spine2', 3, 0 ),

LinkConfig( 'leaf2', 'h3', 0 ),
LinkConfig( 'leaf2', 'h4', 1 ),

LinkConfig( 'leaf2', 'spine1', 2, 1 ),

LinkConfig( 'leaf2', 'spine2', 3, 1 ),

New connection

LinkConfig( 'spine1', 'spine2', 1, 0),

]
The topology setup seemed fine, but when I tested pingall under mininet:

mininet> pingall
*** Ping: testing ping reachability
h2 -> X h1 X
h3 -> X X h4
h1 -> h2 X X
h4 -> X h3 X
*** Results: 66% dropped (4/12 received)
mininet> pingall
*** Ping: testing ping reachability
h2 -> X h1 X
h3 -> X X h4
h1 -> h2 X X
h4 -> X h3 X
*** Results: 66% dropped (4/12 received)
Spine1 and Spine2 seemed failed to connect, or failed to exchange routes with each other

What did I miss?


Reply to this email directly or view it on GitHub #106.

@hamkuu
Copy link
Author

hamkuu commented Jan 11, 2016

@cruzj

Thanks for your suggestion.

However, by changing:

LinkConfig( 'leaf2', 'spine2', 3, 1 )

into:

LinkConfig( 'leaf2', 'spine2', 2, 1 )

did not give me any improvement.

@cruzj
Copy link
Collaborator

cruzj commented Jan 11, 2016

Have you configured/enabled any routing protocol between spine1 and spine2 (the new link that you have added)?

John

@hamkuu
Copy link
Author

hamkuu commented Jan 12, 2016

@cruzj

No. I did not configured/enabled any routing.

Since the original topology works fine, I believe that Quagga can learn routes automatically.

@hamkuu
Copy link
Author

hamkuu commented Jan 12, 2016

@cruzj

if routing reconfiguration is a must in my case,
what do you think is the easiest way to insert routing information into those software switches?

@pbhide
Copy link
Collaborator

pbhide commented Jan 12, 2016

Please refer to the following files for adding new interfaces to spine switches and have routing protocol do the rest. These files describe the currnet routing configuration.
E.g. for spine 1
mininet/configs/spine1/l3_int_ref_topo/startup_config.sh - add new interface and its ip address
.../quagga/bgpd.conf - add spine2 as neighbor
Similar changes will be required on spine2.
(I am assuming that you are adding a link between two spines).

@hamkuu
Copy link
Author

hamkuu commented Jan 21, 2016

@pbhide

As suggested previously in this thread,

does "use the link numbers on the nodes in sequence without leaving any gaps" necessary?

@hamkuu
Copy link
Author

hamkuu commented Jan 21, 2016

@pbhide

I followed your advice, but it's not working.

I added new interface on spine1(10.1.77.1) and on spine2(10.1.77.2).

the following are modified files.

for Spine1:
mininet/configs/spine1/l3_int_ref_topo/startup_config.sh

#!/bin/bash

stty -echo; set +m

ip link set dev swp1 address 00:03:00:00:00:01
ip link set dev swp2 address 00:03:00:00:00:02
ip link set dev swp3 address 00:03:00:00:00:03

ip address add 10.1.11.2/24 broadcast + dev swp1
ip address add 10.1.21.2/24 broadcast + dev swp2
ip address add 10.1.77.1/24 broadcast + dev swp3

cp /configs/quagga/* /etc/quagga/
chown quagga.quagga /etc/quagga/*

mininet/configs/spine1/l3_int_ref_topo/quagga/bgpd.conf:

hostname bgpd
password zebra
enable password zebra
log file /var/log/quagga/bgpd.log

router bgp 64200
  bgp router-id 10.1.11.2
  network 10.1.11.0/24
  network 10.1.21.0/24
  network 10.1.77.0/24
  neighbor 10.1.11.1 remote-as 64101
  neighbor 10.1.11.1 timers 1 3
  neighbor 10.1.21.1 remote-as 64102
  neighbor 10.1.21.1 timers 1 3
  neighbor 10.1.77.2 remote-as 64103
  neighbor 10.1.77.2 timers 1 3
  maximum-paths 16

access-list all permit any

for Spine2,
mininet/configs/spine2/l3_int_ref_topo/startup_config.sh:

#!/bin/bash

stty -echo; set +m

ip link set dev swp1 address 00:04:00:00:00:01
ip link set dev swp2 address 00:04:00:00:00:02
ip link set dev swp3 address 00:04:00:00:00:03

ip address add 10.1.12.2/24 broadcast + dev swp1
ip address add 10.1.22.2/24 broadcast + dev swp2
ip address add 10.1.77.2/24 broadcast + dev swp3

cp /configs/quagga/* /etc/quagga/
chown quagga.quagga /etc/quagga/*

mininet/configs/spine2/l3_int_ref_topo/quagga/bgpd.conf:

hostname bgpd
password zebra
enable password zebra
log file /var/log/quagga/bgpd.log

router bgp 64200
  bgp router-id 10.1.12.2
  network 10.1.12.0/24
  network 10.1.22.0/24
  network 10.1.77.0/24
  neighbor 10.1.12.1 remote-as 64101
  neighbor 10.1.12.1 timers 1 3
  neighbor 10.1.22.1 remote-as 64102
  neighbor 10.1.22.1 timers 1 3
  neighbor 10.1.77.1 remote-as 64103
  neighbor 10.1.77.1 timers 1 3
  maximum-paths 16

access-list all permit any

And p4factory/mininet/int_ref_topology.py remains the same as I modified previously in this thread:
(the suggestion "use the link numbers on the nodes in sequence without leaving any gaps" is considered)

link_cfgs = [
    LinkConfig( 'leaf1', 'h1', 0 ),
    LinkConfig( 'leaf1', 'h2', 1 ),
    LinkConfig( 'leaf1', 'spine1', 2, 0 ),
   # LinkConfig( 'leaf1', 'spine2', 3, 0 ),

    LinkConfig( 'leaf2', 'h3', 0 ),
    LinkConfig( 'leaf2', 'h4', 1 ),
   # LinkConfig( 'leaf2', 'spine1', 2, 1 ),
    LinkConfig( 'leaf2', 'spine2', 2, 1 ),

   # New connection
    LinkConfig( 'spine1', 'spine2', 1, 0),
  ]

What else did I miss?

@hamkuu
Copy link
Author

hamkuu commented Jan 22, 2016

I noticed my mistakes.

I fixed it as follows, but it does not work either.

for Spine1:
mininet/configs/spine1/l3_int_ref_topo/startup_config.sh

#!/bin/bash

stty -echo; set +m

ip link set dev swp1 address 00:03:00:00:00:01
ip link set dev swp2 address 00:03:00:00:00:02

ip address add 10.1.11.2/24 broadcast + dev swp1
ip address add 10.1.77.1/24 broadcast + dev swp2

cp /configs/quagga/* /etc/quagga/
chown quagga.quagga /etc/quagga/*

mininet/configs/spine1/l3_int_ref_topo/quagga/bgpd.conf:

hostname bgpd
password zebra
enable password zebra
log file /var/log/quagga/bgpd.log

router bgp 64200
  bgp router-id 10.1.11.2
  network 10.1.11.0/24
  network 10.1.77.0/24
  neighbor 10.1.11.1 remote-as 64101
  neighbor 10.1.11.1 timers 1 3
  neighbor 10.1.77.2 remote-as 64200
  neighbor 10.1.77.2 timers 1 3
  maximum-paths 16

access-list all permit any

for Spine2,
mininet/configs/spine2/l3_int_ref_topo/startup_config.sh:

#!/bin/bash

stty -echo; set +m

ip link set dev swp1 address 00:04:00:00:00:01
ip link set dev swp2 address 00:04:00:00:00:02

ip address add 10.1.22.2/24 broadcast + dev swp1
ip address add 10.1.77.2/24 broadcast + dev swp2

cp /configs/quagga/* /etc/quagga/
chown quagga.quagga /etc/quagga/*

mininet/configs/spine2/l3_int_ref_topo/quagga/bgpd.conf:

hostname bgpd
password zebra
enable password zebra
log file /var/log/quagga/bgpd.log

router bgp 64200
  bgp router-id 10.1.12.2
  network 10.1.22.0/24
  network 10.1.77.0/24
  neighbor 10.1.22.1 remote-as 64102
  neighbor 10.1.22.1 timers 1 3
  neighbor 10.1.77.1 remote-as 64200
  neighbor 10.1.77.1 timers 1 3
  maximum-paths 16

access-list all permit any

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants