blob: 421d5c27ab6ba1b5ab120593590ff519a0359f8a [file] [log] [blame]
Andreas Pantelopoulos971c91d2018-02-12 11:28:10 -08001log file /var/log/quagga/bgpdbgp2.log
2hostname bgp2
3password quagga
4!
5! Different next hop for IPv4
6!
7ip prefix-list 1 seq 10 permit 10.0.2.0/24
8ip prefix-list 1 seq 20 permit 10.1.2.0/24
9ip prefix-list 1 seq 30 permit 10.0.3.0/24
10ip prefix-list 1 seq 40 permit 10.0.4.0/24
11
12ip prefix-list 1 seq 50 permit 10.1.0.0/24
13ip prefix-list 1 seq 60 permit 10.1.10.0/24
14ip prefix-list 1 seq 70 permit 10.2.0.0/24
15ip prefix-list 1 seq 80 permit 10.2.30.0/24
16ip prefix-list 1 seq 90 permit 10.2.20.0/24
17ip prefix-list 1 seq 100 permit 10.2.10.0/24
18ip prefix-list 1 seq 110 permit 10.2.40.0/24
19ip prefix-list 1 seq 120 permit 10.3.0.0/24
20ip prefix-list 1 seq 130 permit 10.3.30.0/24
21ip prefix-list 1 seq 140 permit 10.3.10.0/24
22ip prefix-list 1 seq 150 permit 10.3.20.0/24
Andreas Pantelopoulosd5d470f2018-03-23 18:02:47 -070023ip prefix-list 1 seq 160 permit 10.5.10.0/24
24ip prefix-list 1 seq 170 permit 10.5.20.0/24
Andreas Pantelopoulos971c91d2018-02-12 11:28:10 -080025
26!
27route-map NEXTHOP45 permit 10
28match ip address prefix-list 1
29set ip next-hop 10.0.5.254
30!
31!
32route-map NEXTHOP46 permit 10
33match ip address prefix-list 1
34set ip next-hop 10.0.6.254
35!
36! Different next hop for IPv6
37!
38ipv6 prefix-list 2 seq 10 permit 2000::200/120
39ipv6 prefix-list 2 seq 20 permit 2000::300/120
Andreas Pantelopoulos1b91b352018-02-19 14:30:52 -080040
41ipv6 prefix-list 2 seq 30 permit 1000::300/120
42ipv6 prefix-list 2 seq 40 permit 1001::300/120
43ipv6 prefix-list 2 seq 50 permit 1002::300/120
44ipv6 prefix-list 2 seq 60 permit 1003::300/120
45ipv6 prefix-list 2 seq 70 permit 1004::300/120
46ipv6 prefix-list 2 seq 80 permit 1005::300/120
47ipv6 prefix-list 2 seq 90 permit 1006::300/120
48ipv6 prefix-list 2 seq 100 permit 1007::300/120
49ipv6 prefix-list 2 seq 110 permit 1008::300/120
50ipv6 prefix-list 2 seq 120 permit 1009::300/120
51ipv6 prefix-list 2 seq 130 permit 1010::300/120
Andreas Pantelopoulosd5d470f2018-03-23 18:02:47 -070052ipv6 prefix-list 2 seq 140 permit 1011::300/120
53ipv6 prefix-list 2 seq 150 permit 1012::300/120
Andreas Pantelopoulos1b91b352018-02-19 14:30:52 -080054!
55
Andreas Pantelopoulos971c91d2018-02-12 11:28:10 -080056!
57route-map NEXTHOP65 permit 10
58match ipv6 address prefix-list 2
59set ipv6 next-hop global 2000::5ff
60set ipv6 next-hop local 2000::5ff
61!
62!
63route-map NEXTHOP66 permit 10
64match ipv6 address prefix-list 2
65set ipv6 next-hop global 2000::6ff
66set ipv6 next-hop local 2000::6ff
67!
68! Basic router config
69!
70router bgp 65003
71bgp router-id 172.16.0.4
72timers bgp 3 9
73!
74! IPv4
75!
76neighbor 10.0.5.1 remote-as 65001
77neighbor 10.0.5.1 ebgp-multihop
78neighbor 10.0.5.1 timers connect 5
79neighbor 10.0.5.1 advertisement-interval 5
80neighbor 10.0.5.1 route-map NEXTHOP45 out
81!
82neighbor 2000::501 remote-as 65001
83neighbor 2000::501 timers connect 5
84neighbor 2000::501 advertisement-interval 1
85no neighbor 2000::501 activate
86!
87neighbor 10.0.6.1 remote-as 65002
88neighbor 10.0.6.1 ebgp-multihop
89neighbor 10.0.6.1 timers connect 5
90neighbor 10.0.6.1 advertisement-interval 5
91neighbor 10.0.6.1 route-map NEXTHOP46 out
92!
93neighbor 2000::601 remote-as 65002
94neighbor 2000::601 timers connect 5
95neighbor 2000::601 advertisement-interval 1
96no neighbor 2000::601 activate
97!
98
99network 10.1.0.0/24
100network 10.1.10.0/24
101network 10.2.0.0/24
102network 10.2.30.0/24
103network 10.2.20.0/24
104network 10.2.10.0/24
105network 10.2.40.0/24
106network 10.3.0.0/24
107network 10.3.30.0/24
108network 10.3.10.0/24
109network 10.3.20.0/24
Andreas Pantelopoulosd5d470f2018-03-23 18:02:47 -0700110network 10.5.10.0/24
111network 10.5.20.0/24
Andreas Pantelopoulos971c91d2018-02-12 11:28:10 -0800112
113network 10.1.0.0/24
114network 10.0.2.0/24
115network 10.1.2.0/24
116network 10.0.3.0/24
117network 10.0.4.0/24
118!
119! IPv6
120!
121address-family ipv6
Andreas Pantelopoulos1b91b352018-02-19 14:30:52 -0800122
123network 1000::300/120
124network 1001::300/120
125network 1002::300/120
126network 1003::300/120
127network 1004::300/120
128network 1005::300/120
129network 1006::300/120
130network 1007::300/120
131network 1008::300/120
132network 1009::300/120
133network 1010::300/120
Andreas Pantelopoulosd5d470f2018-03-23 18:02:47 -0700134network 1011::300/120
135network 1012::300/120
Andreas Pantelopoulos1b91b352018-02-19 14:30:52 -0800136
Andreas Pantelopoulos971c91d2018-02-12 11:28:10 -0800137network 2000::200/120
138network 2000::300/120
139neighbor 2000::501 activate
140neighbor 2000::501 route-map NEXTHOP65 out
141neighbor 2000::601 activate
142neighbor 2000::601 route-map NEXTHOP66 out
143exit-address-family