Skip to content
This repository has been archived by the owner. It is now read-only.
Permalink
Browse files

lib, lm-proxy-topo1: label manager proxy test

Label proxy manager test covering both LDP and BGP label requests.

lib/topotest.py:restartRouter() function has been fixed in order to
allow propagating options to deamons other than zebra.

Signed-off-by: F. Aragon <paco@voltanet.io>
  • Loading branch information...
pacovn committed Jun 4, 2018
1 parent eadd2ba commit 0f87daf29f9be4d6c01594e644e25c3c7af4b7a3
@@ -870,7 +870,9 @@ def restartRouter(self):
if self.daemons[daemon] == 0 or daemon == 'zebra' or daemon == 'staticd':
continue
daemon_path = os.path.join(self.daemondir, daemon)
self.cmd('{0} > {1}.out 2> {1}.err &'.format(daemon_path, daemon))
self.cmd('{0} {1} > {2}.out 2> {2}.err &'.format(
daemon_path, self.daemons_options.get(daemon, ''), daemon
))
self.waitOutput()
logger.debug('{}: {} {} started'.format(self, self.routertype, daemon))
def getStdErr(self, daemon):
@@ -0,0 +1,9 @@
debug bgp vpn label
!
router bgp 9101
bgp router-id 10.1.1.2
neighbor 10.1.1.1 remote-as 7777
address-family ipv4 unicast
redistribute connected
exit-address-family
!
@@ -0,0 +1,11 @@
debug zebra events
debug zebra packet
!
interface lo
ip address 66.1.0.1/32
!
interface ce1-eth0
ip address 10.1.1.2/30
!
ip forwarding
!
@@ -0,0 +1,9 @@
debug bgp vpn label
!
router bgp 9102
bgp router-id 10.1.2.2
neighbor 10.1.2.1 remote-as 7777
address-family ipv4 unicast
redistribute connected
exit-address-family
!
@@ -0,0 +1,11 @@
debug zebra events
debug zebra packet
!
interface lo
ip address 66.1.0.2/32
!
interface ce2-eth0
ip address 10.1.2.2/30
!
ip forwarding
!
@@ -0,0 +1,102 @@
## Color coding:
#########################
## Main FRR: #f08080 red
## Switches: #d0e0d0 gray
## RIP: #19e3d9 Cyan
## RIPng: #fcb314 dark yellow
## OSPFv2: #32b835 Green
## OSPFv3: #19e3d9 Cyan
## ISIS IPv4 #fcb314 dark yellow
## ISIS IPv6 #9a81ec purple
## BGP IPv4 #eee3d3 beige
## BGP IPv6 #fdff00 yellow
##### Colors (see http://www.color-hex.com/)

graph template {
label="Test Topology - Label Manager proxy";

# Routers

lm [ shape=doubleoctagon,
label="label manager",
fillcolor="#f08080",
style=filled
];
ce1 [
shape=doubleoctagon,
label="ce1",
fillcolor="#f08080",
style=filled
];
ce2 [
shape=doubleoctagon
label="ce2",
fillcolor="#f08080",
style=filled
];
pe1 [
shape=doubleoctagon,
label="pe1",
fillcolor="#f08080",
style=filled
];
pe2 [
shape=doubleoctagon
label="pe2",
fillcolor="#f08080",
style=filled
];
p1 [
shape=doubleoctagon
label="p1",
fillcolor="#f08080",
style=filled
];

# Switches

s1 [
shape=oval,
label="s1\n10.1.1.0/30",
fillcolor="#d0e0d0",
style=filled
];
s2 [
shape=oval,
label="s2\n77.0.1.0/24",
fillcolor="#d0e0d0",
style=filled
];
s3 [
shape=oval,
label="s3\n77.0.2.0/24",
fillcolor="#d0e0d0",
style=filled
];
s4 [
shape=oval,
label="s4\n10.1.2.0/30",
fillcolor="#d0e0d0",
style=filled
];

# Connections

ce1 -- s1 [label="eth0\n.2"];
pe1 -- s1 [label="eth0\n.1"];

pe1 -- s2 [label="eth1\n.1"];
p1 -- s2 [label="eth0\n.2"];

pe2 -- s3 [label="eth1\n.1"];
p1 -- s3 [label="eth1\n.2"];

ce2 -- s4 [label="eth0\n.2"];
pe2 -- s4 [label="eth0\n.1"];

lm -- ce1;
lm -- pe1;
lm -- p1;
lm -- pe2;
lm -- ce2;
}
Binary file not shown.
@@ -0,0 +1,3 @@
debug zebra events
debug zebra packet
!
@@ -0,0 +1,9 @@
!
mpls ldp
router-id 7.0.0.101
address-family ipv4
discovery transport-address 7.0.0.101
interface p1-eth0
interface p1-eth1
exit-address-family
!
@@ -0,0 +1,7 @@
!
router ospf
ospf router-id 7.0.0.101
network 7.0.0.101/32 area 0
network 77.0.1.0/24 area 0
network 77.0.2.0/24 area 0
!
@@ -0,0 +1,12 @@
debug zebra events
debug zebra packet
!
interface lo
ip address 7.0.0.101/32
!
interface p1-eth0
ip address 77.0.1.2/24
!
interface p1-eth1
ip address 77.0.2.2/24
!
@@ -0,0 +1,26 @@
debug bgp vpn label
!
router bgp 7777
bgp router-id 7.0.0.1
neighbor 7.0.0.2 remote-as 7777
neighbor 7.0.0.2 update-source 7.0.0.1
address-family ipv4 unicast
no neighbor 7.0.0.2 activate
exit-address-family
address-family ipv4 vpn
neighbor 7.0.0.2 activate
exit-address-family
!
router bgp 7777 vrf A
bgp router-id 10.1.1.1
neighbor 10.1.1.2 remote-as 9101
address-family ipv4 unicast
label vpn export auto
rd vpn export 110:1
rt vpn both 152:100
import vpn
export vpn
redistribute connected
redistribute ospf
exit-address-family
!
@@ -0,0 +1,8 @@
!
mpls ldp
router-id 7.0.0.1
address-family ipv4
discovery transport-address 7.0.0.1
interface pe1-eth1
exit-address-family
!
@@ -0,0 +1,6 @@
!
router ospf
ospf router-id 7.0.0.1
network 77.0.0.0/16 area 0
redistribute connected
!
@@ -0,0 +1,14 @@
debug zebra events
debug zebra packet
!
interface lo
ip address 7.0.0.1/32
!
interface pe1-eth0 vrf A
ip address 10.1.1.1/30
!
interface pe1-eth1
ip address 77.0.1.1/24
!
ip forwarding
!
@@ -0,0 +1,26 @@
debug bgp vpn label
!
router bgp 7777
bgp router-id 7.0.0.2
neighbor 7.0.0.1 remote-as 7777
neighbor 7.0.0.1 update-source 7.0.0.2
address-family ipv4 unicast
no neighbor 7.0.0.1 activate
exit-address-family
address-family ipv4 vpn
neighbor 7.0.0.1 activate
exit-address-family
!
router bgp 7777 vrf A
bgp router-id 10.1.2.1
neighbor 10.1.2.2 remote-as 9102
address-family ipv4 unicast
label vpn export auto
rd vpn export 110:2
rt vpn both 152:100
import vpn
export vpn
redistribute connected
redistribute ospf
exit-address-family
!
@@ -0,0 +1,8 @@
!
mpls ldp
router-id 7.0.0.2
address-family ipv4
discovery transport-address 7.0.0.2
interface pe2-eth1
exit-address-family
!
@@ -0,0 +1,6 @@
!
router ospf
ospf router-id 7.0.0.2
network 77.0.0.0/16 area 0
redistribute connected
!
@@ -0,0 +1,14 @@
debug zebra events
debug zebra packet
!
interface lo
ip address 7.0.0.2/32
!
interface pe2-eth1
ip address 77.0.2.1/24
!
interface pe2-eth0 vrf A
ip address 10.1.2.1/30
!
ip forwarding
!
Oops, something went wrong.

0 comments on commit 0f87daf

Please sign in to comment.
You can’t perform that action at this time.