-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathbird154.conf
115 lines (111 loc) · 2.47 KB
/
bird154.conf
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
router id 10.0.0.23;
ipv4 table t_direct;
protocol device {
}
protocol kernel {
ipv4 {
import all;
export all;
};
learn;
}
protocol direct local_nets {
ipv4 {
table t_direct;
import all;
};
interface "net0";
}
define LOCAL_COMM = (154, 0, 0);
define CUSTOMER_COMM = (154, 1, 0);
define PEER_COMM = (154, 2, 0);
define PROVIDER_COMM = (154, 3, 0);
ipv4 table t_bgp;
protocol pipe {
table t_bgp;
peer table master4;
import none;
export all;
}
protocol pipe {
table t_direct;
peer table t_bgp;
import none;
export filter { bgp_large_community.add(LOCAL_COMM); bgp_local_pref = 40; accept; };
}
protocol bgp u_as2 {
ipv4 {
table t_bgp;
import filter {
bgp_large_community.add(PROVIDER_COMM);
bgp_local_pref = 10;
accept;
};
export where bgp_large_community ~ [LOCAL_COMM, CUSTOMER_COMM];
next hop self;
};
local 10.102.0.154 as 154;
neighbor 10.102.0.2 as 2;
}
protocol bgp u_as4 {
ipv4 {
table t_bgp;
import filter {
bgp_large_community.add(PROVIDER_COMM);
bgp_local_pref = 10;
accept;
};
export where bgp_large_community ~ [LOCAL_COMM, CUSTOMER_COMM];
next hop self;
};
local 10.102.0.154 as 154;
neighbor 10.102.0.4 as 4;
}
protocol bgp u_as11 {
ipv4 {
table t_bgp;
import filter {
bgp_large_community.add(PROVIDER_COMM);
bgp_local_pref = 10;
accept;
};
export where bgp_large_community ~ [LOCAL_COMM, CUSTOMER_COMM];
next hop self;
};
local 10.102.0.154 as 154;
neighbor 10.102.0.11 as 11;
}
ipv4 table t_ospf;
protocol ospf ospf1 {
ipv4 {
table t_ospf;
import all;
export all;
};
area 0 {
interface "dummy0" { stub; };
interface "ix102" { stub; };
interface "net0" { hello 1; dead count 2; };
};
}
protocol pipe {
table t_ospf;
peer table master4;
import none;
export all;
}
protocol static {
ipv4 { table t_bgp; };
route 10.154.0.0/26 via "net0" {
bgp_large_community.add(LOCAL_COMM);
};
route 10.154.0.64/26 via "net0" {
bgp_large_community.add(LOCAL_COMM);
};
route 10.154.0.128/26 via "net0" {
bgp_large_community.add(LOCAL_COMM);
};
route 10.154.0.192/26 via "net0" {
bgp_large_community.add(LOCAL_COMM);
};
}