Advertisement
Guest User

Untitled

a guest
Sep 17th, 2015
403
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. # /usr/local/etc/bird.conf
  2. ###################### ROUTER R1
  3.  
  4. router id 10.4.4.1
  5.  
  6. protocol kernel {
  7. export all;
  8. }
  9.  
  10. protocol direct {
  11. }
  12.  
  13. protocol device {
  14. scan time 10;
  15. }
  16.  
  17. protocol static {
  18. route 0.0.0.0/0 via 123.123.123.1;
  19. }
  20.  
  21. protocol ospf {
  22. tick 2;
  23. rfc1583compat yes;
  24. export filter {
  25. if net = 0.0.0.0/0 then {
  26. ospf_metric1 = 100;
  27. accept;
  28. }
  29. reject;
  30. }
  31. area 0.0.0.0 {
  32. interface "vtnet1" {
  33. dead count 4;
  34. type broadcast;
  35. }
  36. }
  37. }
  38.  
  39. ######################
  40. ###################### ROUTER R2
  41.  
  42. router id 10.4.4.2
  43.  
  44. protocol kernel {
  45. export all;
  46. }
  47.  
  48. protocol direct {
  49. }
  50.  
  51. protocol device {
  52. scan time 10;
  53. }
  54.  
  55. protocol static {
  56. route 0.0.0.0/0 via 123.123.123.1;
  57. }
  58.  
  59. protocol ospf {
  60. tick 2;
  61. rfc1583compat yes;
  62. export filter {
  63. if net = 0.0.0.0/0 then {
  64. ospf_metric1 = 100;
  65. accept;
  66. }
  67. reject;
  68. }
  69. area 0.0.0.0 {
  70. interface "vtnet1" {
  71. dead count 4;
  72. type broadcast;
  73. }
  74. }
  75. }
  76.  
  77. ######################
  78. ###################### ROUTER R3
  79.  
  80. router id 10.4.4.3
  81.  
  82. protocol kernel {
  83. export all;
  84. }
  85.  
  86. protocol direct {
  87. }
  88.  
  89. protocol device {
  90. scan time 10;
  91. }
  92.  
  93. protocol static {
  94. }
  95.  
  96. protocol ospf {
  97. tick 2;
  98. rfc1583compat yes;
  99. import filter {
  100. # accept only routes from R1 and R2
  101. if ospf_router_id = 10.4.4.1 then {
  102. # for R1's default route set a lower metric so it is prefered
  103. if net = 0.0.0.0/0 then {
  104. ospf_metric1 = 10;
  105. }
  106. accept;
  107. }
  108.  
  109. if ospf_router_id = 10.4.4.2 then {
  110. accept;
  111. }
  112. reject;
  113. }
  114. area 0.0.0.0 {
  115. interface "vtnet0" {
  116. dead count 4;
  117. type broadcast;
  118. }
  119. interface "ng*" {
  120. stub yes;
  121. }
  122. }
  123. }
  124.  
  125. ######################
  126. ###################### ROUTER R4
  127.  
  128. router id 10.4.4.4
  129.  
  130. protocol kernel {
  131. export all;
  132. }
  133.  
  134. protocol direct {
  135. }
  136.  
  137. protocol device {
  138. scan time 10;
  139. }
  140.  
  141. protocol static {
  142. }
  143.  
  144. protocol ospf {
  145. tick 2;
  146. rfc1583compat yes;
  147. import filter {
  148. # accept only routes from R1 and R2
  149. if ospf_router_id = 10.4.4.1 then {
  150. accept;
  151. }
  152. if ospf_router_id = 10.4.4.2 then {
  153. # for R2's default route set a lower metric so it is prefered
  154. if net = 0.0.0.0/0 then {
  155. ospf_metric1 = 10;
  156. }
  157. accept;
  158. }
  159. reject;
  160. }
  161. area 0.0.0.0 {
  162. interface "vtnet0" {
  163. dead count 4;
  164. type broadcast;
  165. }
  166. interface "ng*" {
  167. stub yes;
  168. }
  169. }
  170. }
  171.  
  172. ######################
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement