blob: 8870fb4febe90bc7407b8c082c4d778bfa895d8f [file] [log] [blame]
Charles Chan6f149a92017-03-24 19:35:41 -07001log file /var/log/quagga/bgpdbgp1.log
2hostname bgp1
3password quagga
4!
5! Different next hop for IPv4
6!
7ip prefix-list 1 seq 10 permit 10.0.2.0/24
Charles Chanc3122db2017-09-01 10:58:24 -07008ip 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
Charles Chan6f149a92017-03-24 19:35:41 -070011!
Charles Chanc3122db2017-09-01 10:58:24 -070012route-map NEXTHOP41 permit 10
Charles Chan6f149a92017-03-24 19:35:41 -070013match ip address prefix-list 1
14set ip next-hop 10.0.1.254
15!
Charles Chanc3122db2017-09-01 10:58:24 -070016!
17route-map NEXTHOP47 permit 10
18match ip address prefix-list 1
19set ip next-hop 10.0.7.254
20!
Charles Chan6f149a92017-03-24 19:35:41 -070021! 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!
Charles Chanc3122db2017-09-01 10:58:24 -070026route-map NEXTHOP61 permit 10
Charles Chan6f149a92017-03-24 19:35:41 -070027match ipv6 address prefix-list 2
28set ipv6 next-hop global 2000::1ff
29set ipv6 next-hop local 2000::1ff
30!
Charles Chanc3122db2017-09-01 10:58:24 -070031!
32route-map NEXTHOP67 permit 10
33match ipv6 address prefix-list 2
34set ipv6 next-hop global 2000::7ff
35set ipv6 next-hop local 2000::7ff
36!
Charles Chan6f149a92017-03-24 19:35:41 -070037! Basic router config
38!
Charles Chanc3122db2017-09-01 10:58:24 -070039router bgp 65003
40bgp router-id 172.16.0.3
Charles Chan6f149a92017-03-24 19:35:41 -070041timers bgp 3 9
42!
43! IPv4
44!
45neighbor 10.0.1.1 remote-as 65001
46neighbor 10.0.1.1 ebgp-multihop
47neighbor 10.0.1.1 timers connect 5
48neighbor 10.0.1.1 advertisement-interval 5
Charles Chanc3122db2017-09-01 10:58:24 -070049neighbor 10.0.1.1 route-map NEXTHOP41 out
Charles Chan6f149a92017-03-24 19:35:41 -070050!
51neighbor 2000::101 remote-as 65001
52neighbor 2000::101 timers connect 5
53neighbor 2000::101 advertisement-interval 1
54no neighbor 2000::101 activate
55!
Charles Chanc3122db2017-09-01 10:58:24 -070056neighbor 10.0.7.1 remote-as 65002
57neighbor 10.0.7.1 ebgp-multihop
58neighbor 10.0.7.1 timers connect 5
59neighbor 10.0.7.1 advertisement-interval 5
60neighbor 10.0.7.1 route-map NEXTHOP47 out
61!
62neighbor 2000::701 remote-as 65002
63neighbor 2000::701 timers connect 5
64neighbor 2000::701 advertisement-interval 1
65no neighbor 2000::701 activate
66!
Charles Chan6f149a92017-03-24 19:35:41 -070067network 10.0.2.0/24
Charles Chanc3122db2017-09-01 10:58:24 -070068network 10.1.2.0/24
Charles Chan6f149a92017-03-24 19:35:41 -070069network 10.0.3.0/24
Yi Tseng9e332d82017-07-28 17:52:21 -070070network 10.0.4.0/24
Charles Chan6f149a92017-03-24 19:35:41 -070071!
72! IPv6
73!
74address-family ipv6
75network 2000::200/120
76network 2000::300/120
77neighbor 2000::101 activate
Charles Chanc3122db2017-09-01 10:58:24 -070078neighbor 2000::101 route-map NEXTHOP61 out
79neighbor 2000::701 activate
80neighbor 2000::701 route-map NEXTHOP67 out
Charles Chan6f149a92017-03-24 19:35:41 -070081exit-address-family