Skip to content

Commit

Permalink
Merge pull request #95 from pacovn/master
Browse files Browse the repository at this point in the history
lib, lm-proxy-topo1: label manager proxy test
  • Loading branch information
louberger committed Oct 2, 2018
2 parents eadd2ba + 0f87daf commit 2b2d428
Show file tree
Hide file tree
Showing 20 changed files with 489 additions and 1 deletion.
4 changes: 3 additions & 1 deletion lib/topotest.py
Expand Up @@ -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):
Expand Down
9 changes: 9 additions & 0 deletions lm-proxy-topo1/ce1/bgpd.conf
@@ -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
!
11 changes: 11 additions & 0 deletions lm-proxy-topo1/ce1/zebra.conf
@@ -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
!
9 changes: 9 additions & 0 deletions lm-proxy-topo1/ce2/bgpd.conf
@@ -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
!
11 changes: 11 additions & 0 deletions lm-proxy-topo1/ce2/zebra.conf
@@ -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
!
102 changes: 102 additions & 0 deletions lm-proxy-topo1/lm-proxy-topo1.dot
@@ -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 added lm-proxy-topo1/lm-proxy-topo1.pdf
Binary file not shown.
3 changes: 3 additions & 0 deletions lm-proxy-topo1/lm/zebra.conf
@@ -0,0 +1,3 @@
debug zebra events
debug zebra packet
!
9 changes: 9 additions & 0 deletions lm-proxy-topo1/p1/ldpd.conf
@@ -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
!
7 changes: 7 additions & 0 deletions lm-proxy-topo1/p1/ospfd.conf
@@ -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
!
12 changes: 12 additions & 0 deletions lm-proxy-topo1/p1/zebra.conf
@@ -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
!
26 changes: 26 additions & 0 deletions lm-proxy-topo1/pe1/bgpd.conf
@@ -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
!
8 changes: 8 additions & 0 deletions lm-proxy-topo1/pe1/ldpd.conf
@@ -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
!
6 changes: 6 additions & 0 deletions lm-proxy-topo1/pe1/ospfd.conf
@@ -0,0 +1,6 @@
!
router ospf
ospf router-id 7.0.0.1
network 77.0.0.0/16 area 0
redistribute connected
!
14 changes: 14 additions & 0 deletions lm-proxy-topo1/pe1/zebra.conf
@@ -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
!
26 changes: 26 additions & 0 deletions lm-proxy-topo1/pe2/bgpd.conf
@@ -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
!
8 changes: 8 additions & 0 deletions lm-proxy-topo1/pe2/ldpd.conf
@@ -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
!
6 changes: 6 additions & 0 deletions lm-proxy-topo1/pe2/ospfd.conf
@@ -0,0 +1,6 @@
!
router ospf
ospf router-id 7.0.0.2
network 77.0.0.0/16 area 0
redistribute connected
!
14 changes: 14 additions & 0 deletions lm-proxy-topo1/pe2/zebra.conf
@@ -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
!

0 comments on commit 2b2d428

Please sign in to comment.