blob: e554de47f8adc041364e239e82f21b7ca6250952 [file] [log] [blame]
Devin Lim57221b02018-02-14 15:45:36 -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!
12route-map NEXTHOP45 permit 10
13match ip address prefix-list 1
14set ip next-hop 10.0.5.254
15!
16!
17route-map NEXTHOP46 permit 10
18match ip address prefix-list 1
19set ip next-hop 10.0.6.254
20!
21! Different next hop for IPv6
22!
23ipv6 prefix-list 2 seq 10 permit 2000::200/120
24ipv6 prefix-list 2 seq 20 permit 2000::300/120
25!
26route-map NEXTHOP65 permit 10
27match ipv6 address prefix-list 2
28set ipv6 next-hop global 2000::5ff
29set ipv6 next-hop local 2000::5ff
30!
31!
32route-map NEXTHOP66 permit 10
33match ipv6 address prefix-list 2
34set ipv6 next-hop global 2000::6ff
35set ipv6 next-hop local 2000::6ff
36!
37! Basic router config
38!
39router bgp 65003
40bgp router-id 172.16.0.4
41timers bgp 3 9
42!
43! IPv4
44!
45neighbor 10.0.5.1 remote-as 65001
46neighbor 10.0.5.1 ebgp-multihop
47neighbor 10.0.5.1 timers connect 5
48neighbor 10.0.5.1 advertisement-interval 5
49neighbor 10.0.5.1 route-map NEXTHOP45 out
50!
51neighbor 2000::501 remote-as 65001
52neighbor 2000::501 timers connect 5
53neighbor 2000::501 advertisement-interval 1
54no neighbor 2000::501 activate
55!
56neighbor 10.0.6.1 remote-as 65002
57neighbor 10.0.6.1 ebgp-multihop
58neighbor 10.0.6.1 timers connect 5
59neighbor 10.0.6.1 advertisement-interval 5
60neighbor 10.0.6.1 route-map NEXTHOP46 out
61!
62neighbor 2000::601 remote-as 65002
63neighbor 2000::601 timers connect 5
64neighbor 2000::601 advertisement-interval 1
65no neighbor 2000::601 activate
66!
67network 10.0.2.0/24
68network 10.1.2.0/24
69network 10.0.3.0/24
70network 10.0.4.0/24
71!
72! IPv6
73!
74address-family ipv6
75network 2000::200/120
76network 2000::300/120
77neighbor 2000::501 activate
78neighbor 2000::501 route-map NEXTHOP65 out
79neighbor 2000::601 activate
80neighbor 2000::601 route-map NEXTHOP66 out
81exit-address-family