! T encor etworks

encor e!n etworks
•
TM
Version A, September 2010
© 2010 Encore Networks, Inc.
All rights reserved.
Sample Revision of the BGP
Configuration File
T
his chapter discusses how to modify the files that configure the Border Gateway Protocol
(BGP).
Note: To configure the BANDIT to use BGP, see Configuring the BANDIT to Use OSPF or BGP.
G.1
Modifying the BGP Configuration File
You can modify the BGP configuration file, bgpd.conf, via an ASCII text editor or from the
BANDIT menus. To use an ASCII text editor, open the file and make changes as appropriate. This
document discusses editing the file through the BANDIT menus.
1
Log In on the BANDIT menu. (For details, see Starting the Software.)
❖ The Main Menu is displayed.
Main Menu
---------1) QuickStart Config Builder
2) Typical Configurations
3) Advanced Configurations
4) Tools
V)
F)
L)
P)
W)
R)
X)
S)
Y)
View Current Unit Status
Cellular Fast Connect
Load Factory Defaults
Load Plug and Play Defaults
Write Configuration
Reset Unit
eXit Session
Statistics
sYstem Administration
Enter Choice : 2
2
On the Main Menu, select Typical Configurations.
❖ The Typical Configurations Menu is displayed.
For information on trademarks, safety, limitations
of liability, and similar topics, see Notices.
Home Module: Routing
Document G
Page 2
Routing Module, Document G
Typical Configurations Menu
---------------------------1) System Configuration
2) IP Interfaces
3) IP Static Routes
4) VPN Profiles
5) IP/VPN Policies
6) NAT Profiles
7) OSPF/BGP Configuration
8) DNS/DHCP Servers
9) Configure Firewall
A) IP QoS (Quality of Service)
B) GPS Geo-Fencing
L)
W)
M)
S)
E)
R)
P)
LAN
: EtherNet
WAN
: EtherNet
MODEM : Point-to-Point
SERIAL : UNDEFINED
EXPANSION : Frame Relay
RDU/IDU Ports...
More Ports...
No DHCP
No DHCP
MODEM
SERIAL
EXPANSION
ETHERNET
ETHERNET
INTERNAL
Dual T1/E1
Enter Choice : 7
3
On the Typical Configurations Menu, select OSPF/BGP Configuration.
❖ The OSPF/BGP Configuration Menu is displayed.
OSPF/BGP Configuration
----------------------1) Global Ospf Configuration
2) Global Bgp Configuration
3) OSPF/BGP Remote Logging : Disabled
Enter Choice :
4
On the OSPF/BGP Configuration Menu, select Global BGP Configuration.
❖ The Global BGP Configuration Menu is displayed.
Global BGP Configuration
------------------------1) BGP Admin : Disabled
2) Edit Config
Enter Choice :
5
On the Global BGP Configuration Menu, select Edit Config.
❖ The following prompt is displayed.
Enter file name [/etc/bgpd.conf]:
Sample Revision of the BGP Configuration File
Page 3
Note: The system automatically creates the default file /etc/bgpd.conf when the
software is loaded.
The BANDIT always uses bgpd.conf for BGP configuration. This procedure shows you
how to edit that file.
6
To review and edit the listed BGP configuration file, press the Enter key.
❖ The line code for the file is displayed.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! -*- bgp -*!
! BGPd sample configuratin file
!
! $Id: bgpd.conf.sample,v 1.19 1999/02/19 17:17:27 developer Exp $
!
hostname bgpd
password zebra
!enable password please-set-at-here
!
!bgp mulitple-instance
!
router bgp 7671
! bgp router-id 10.0.0.1
! network 10.0.0.0/8
! neighbor 10.0.0.2 remote-as 7671
! neighbor 10.0.0.2 route-map set-nexthop out
! neighbor 10.0.0.2 ebgp-multihop
! neighbor 10.0.0.2 next-hop-self
!
Enter 'A'= Add, 'M'= Modify, 'D' = Delete, 'I' = Insert, or any key...
7
To see more of the listing, press the Enter key again.
❖ The next 20 lines of the file are displayed.
21
22
23
24
25
26
27
28
29
! access-list all permit any
!
!route-map set-nexthop permit 10
! match ip address all
! set ip next-hop 10.0.0.1
!
!log file bgpd.log
!
log stdout
Enter 'A'= Add, 'M'= Modify, 'D' = Delete, 'I' = Insert, or any key...
8
To see more of the listing, press the Enter key again.
❖ The next 20 lines of the file are displayed.
Note: If you have reached the end of the file, the first 20 lines are displayed again. For
reference, we display here the entire sample listing.
Page 4
Routing Module, Document G
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! -*- bgp -*!
! BGPd sample configuratin file
!
! $Id: bgpd.conf.sample,v 1.19 1999/02/19 17:17:27 developer Exp $
!
hostname bgpd
password zebra
!enable password please-set-at-here
!
!bgp mulitple-instance
!
router bgp 7671
! bgp router-id 10.0.0.1
! network 10.0.0.0/8
! neighbor 10.0.0.2 remote-as 7671
! neighbor 10.0.0.2 route-map set-nexthop out
! neighbor 10.0.0.2 ebgp-multihop
! neighbor 10.0.0.2 next-hop-self
!
Enter 'A'= Add, 'M'= Modify, 'D' = Delete, 'I' = Insert, or any key...
21
22
23
24
25
26
27
28
29
! access-list all permit any
!
!route-map set-nexthop permit 10
! match ip address all
! set ip next-hop 10.0.0.1
!
!log file bgpd.log
!
log stdout
Enter 'A'= Add, 'M'= Modify, 'D' = Delete, 'I' = Insert, or any key...
Note: The listing shown is a template for Encore Networks’ BGP configuration. You
will need to modify the lines for your network. A line that begins with an exclamation
point (!) is a comment. To add comments, start a line with an exclamation point. To
make a line active, remove the initial exclamation point from a commented line.
You need to modify the file to reflect the BGP area for this BANDIT device. The
following steps are examples of the way to modify lines. Ask your network
administrator for all IP addresses and other network information for this BANDIT’s
BGP configuration.
9
Line 13 in this example shows this BANDIT’s autonomous system number. Do the
following to change the AS number to 7675.
Note: Get all AS numbers from your network administrator.
a While the listing is displayed, type m to modify a line.
❖ The following prompt is displayed.
Sample Revision of the BGP Configuration File
Page 5
Enter line number to modify:
b Type the line number you wish to modify and press the Enter key. (In this example,
type 13 and press the Enter key.)
❖ The following prompt is displayed.
Enter line below:
c Type the line exactly as you want it to appear.
Note: Do not type a line number; the system assigns line numbers each time it
displays the file. Otherwise, type the line exactly as it appears in the listing,
substituting the BANDIT’s AS number.
router bgp 7675
d When you have finished typing the line, press the Enter key.
❖ The BGP configuration file is displayed again, with the new line in place. Line 13 now
shows the BANDIT’s autonomous system number.
1 ! -*- bgp -*2 !
3 ! BGPd sample configuratin file
4 !
5 ! $Id: bgpd.conf.sample,v 1.19 1999/02/19 17:17:27 developer Exp $
6 !
7 hostname bgpd
8 password zebra
9 !enable password please-set-at-here
10 !
11 !bgp mulitple-instance
12 !
13 router bgp 7675
14 bgp router-id 192.168.10.4
15 ! network 10.0.0.0/8
16 ! neighbor 10.0.0.2 remote-as 7671
17 ! neighbor 10.0.0.2 route-map set-nexthop out
18 ! neighbor 10.0.0.2 ebgp-multihop
19 ! neighbor 10.0.0.2 next-hop-self
20 !
Enter 'A'= Add, 'M'= Modify, 'D' = Delete, 'I' = Insert, or any key...
10 In this step, we will modify the file to reflect the BANDIT’s IP address. In this listing,
line 14, as shown below, identifies the BANDIT.
Page 6
Routing Module, Document G
14 ! bgp router-id 10.0.0.1
Note: The sample line starts with an exclamation point, indicating that it is a
comment, not an executable line. We will make the line an executable command, and
we will assign the BANDIT’s IP address.
To modify the line, do the following:
a While the listing is displayed, type m to modify a line.
❖ The following prompt is displayed.
Enter line number to modify:
b Type the line number you wish to modify and press the Enter key. (In this example,
type 14 and press the Enter key.)
❖ The following prompt is displayed.
Enter line below:
c Type the line exactly as you want it to appear.
Note: Do not type a line number; the system assigns line numbers each time it
displays the file.
Note that we also do not type an exclamation point, because this will be a live
command. Otherwise, type the line exactly as it appears in the listing, substituting the
IP address for the BANDIT’s WAN port.
bgp router-id 192.168.10.4
d When you have finished typing the line, press the Enter key.
❖ The BGP configuration file is displayed again, with the new line in place. Line 14 is
now a live, executable command, assigning the BANDIT’s WAN IP address.
Sample Revision of the BGP Configuration File
1 ! -*- bgp -*2 !
3 ! BGPd sample configuratin file
4 !
5 ! $Id: bgpd.conf.sample,v 1.19 1999/02/19 17:17:27 developer Exp $
6 !
7 hostname bgpd
8 password zebra
9 !enable password please-set-at-here
10 !
11 !bgp mulitple-instance
12 !
13 router bgp 7675
14 bgp router-id 192.168.10.4
15 ! network 10.0.0.0/8
16 ! neighbor 10.0.0.2 remote-as 7671
17 ! neighbor 10.0.0.2 route-map set-nexthop out
18 ! neighbor 10.0.0.2 ebgp-multihop
19 ! neighbor 10.0.0.2 next-hop-self
20 !
Enter 'A'= Add, 'M'= Modify, 'D' = Delete, 'I' = Insert, or any key...
11 In the same way, change the network address on line 15,:
15 ! network 10.0.0.0/
a Type m, then type the line number to modify (15) and press Enter.
b Type the line as a live, executable command, using the network address.
network 192.168.10.0/24
c Press the Enter key.
❖ The listing is displayed with the revised line.
Page 7
Page 8
Routing Module, Document G
1 ! -*- bgp -*2 !
3 ! BGPd sample configuratin file
4 !
5 ! $Id: bgpd.conf.sample,v 1.19 1999/02/19 17:17:27 developer Exp $
6 !
7 hostname bgpd
8 password zebra
9 !enable password please-set-at-here
10 !
11 !bgp mulitple-instance
12 !
13 router bgp 7675
14 bgp router-id 192.168.10.4
15 network 192.168.10.0/24
16 ! neighbor 10.0.0.2 remote-as 7671
17 ! neighbor 10.0.0.2 route-map set-nexthop out
18 ! neighbor 10.0.0.2 ebgp-multihop
19 ! neighbor 10.0.0.2 next-hop-self
20 !
Enter 'A'= Add, 'M'= Modify, 'D' = Delete, 'I' = Insert, or any key...
Note: You need to include all the networks that you want this BANDIT to advertise.
Insert them after line 15. (Displayed line numbers will change to accommodate
insertions.)
We will not show an example of insertion yet, because we wish to maintain the line
numbers shown for the rest of this example.
12 The following lines must be changed to show this BANDIT’s neighbor. In this example,
the neighbor’s IP address is 192.168.10.1.
a Retype line 16 as the following.
neighbor 192.168.10.1 remote-as 7675
b Retype line 17 as the following.
neighbor 192.168.10.1 route-map set-nexthop out
c Retype line 18 as the following.
neighbor 192.168.10.1 ebgp-multihop
d Retype line 19 as the following.
Sample Revision of the BGP Configuration File
Page 9
neighbor 192.168.10.1 next-hop-self
e After lines 1 through 20 are redisplayed, press Enter to see the next 20 lines.
21
22
23
24
25
26
27
28
29
! access-list all permit any
!
!route-map set-nexthop permit 10
! match ip address all
! set ip next-hop 10.0.0.1
!
!log file bgpd.log
!
log stdout
Enter 'A'= Add, 'M'= Modify, 'D' = Delete, 'I' = Insert, or any key...
f Retype line 21, removing the exclamation point. The line will be a live command.
access -list all permit any
g Retype lines 23 and 24, removing the exclamation points. The lines will be live
commands.
route-map set-nexthop permit 10
Note: Leading paces are not required. The application ignores them. However, you
may want to use them to help organize the material into groups. This example shows
leading spaces when retyping line 24.
match ip address all
h Retype line 25 as the following. Note that this is the BANDIT’s WAN IP address, which
you indicated for line 14. (See step 10.)
set ip next-hop 192.168.10.4
Note: You need to add the equivalent of lines 16 through 25 for each of the BANDIT’s
neighbors, with the appropriate IP addresses. (You do not need to add any comment
lines, such as lines_20 and 22.)
Page 10
Routing Module, Document G
13 If you need to insert a line, do the following:
a When the listing is displayed, type i to insert a line indicating another network for this
BANDIT to advertise.
1 ! -*- bgp -*2 !
3 ! BGPd sample configuratin file
4 !
5 ! $Id: bgpd.conf.sample,v 1.19 1999/02/19 17:17:27 developer Exp $
6 !
7 hostname bgpd
8 password zebra
9 !enable password please-set-at-here
10 !
11 !bgp mulitple-instance
12 !
13 router bgp 7675
14 bgp router-id 192.168.10.4
15 network 192.168.10.0/24
16 neighbor 192.168.10.1 remote-as 7675
17 neighbor 192.168.10.1 route-map set-nexthop out
18 neighbor 192.168.10.1 ebgp-multihop
19 neighbor 192.168.10.1 next-hop-self
20 !
Enter 'A'= Add, 'M'= Modify, 'D' = Delete, 'I' = Insert, or any key...
❖ The following prompt is displayed.
Enter line number to Insert After(0 to prepend):
b Type the line number that the inserted line will follow and then press the Enter key. (In
this example, type 15 and press Enter.)
❖ The following prompt is displayed.
Enter line below:
c Type the new information, using line 15 as a guide. Then press Enter. (In this example,
the additional network is identified by the IP address 10.1.1.0/24.)
network 10.1.1.0/24
❖ The new information is included in the listing. Note that the line numbers have
adjusted to accommodate the new line.
Sample Revision of the BGP Configuration File
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! -*- bgp -*!
! BGPd sample configuratin file
!
! $Id: bgpd.conf.sample,v 1.19 1999/02/19 17:17:27 developer Exp $
!
hostname bgpd
password zebra
!enable password please-set-at-here
!
!bgp mulitple-instance
!
router bgp 7675
bgp router-id 192.168.10.4
network 192.168.10.0/24
network 10.1.1.0/24
neighbor 192.168.10.1 remote-as 7675
neighbor 192.168.10.1 route-map set-nexthop out
neighbor 192.168.10.1 ebgp-multihop
neighbor 192.168.10.1 next-hop-self
14 Continue to modify the BGP configuration file as indicated by your network
administrator.
❖ The finished file will probably be similar to the following.
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
! -*- bgp -*!
! BGPd sample configuratin file
!
! $Id: bgpd.conf.sample,v 1.19 1999/02/19 17:17:27 developer Exp $
!
hostname bgpd
password zebra
!enable password please-set-at-here
!
!bgp mulitple-instance
!
router bgp 7675
bgp router-id 192.168.10.4
network 192.168.10.0/24
network 10.1.1.0/24
neighbor 192.168.10.1 remote-as 7675
neighbor 192.168.10.1 route-map set-nexthop out
neighbor 192.168.10.1 ebgp-multihop
neighbor 192.168.10.1 next-hop-self
Page 11
Page 12
Routing Module, Document G
21 !
21 access-list all permit any
23 !
24 route-map set-nexthop permit 10
25 match ip address all
26 set ip next-hop 192.168.10.4
27 !
28 !log file bgpd.log
29 !
30 log stdout
Enter 'A'= Add, 'M'= Modify, 'D' = Delete, 'I' = Insert, or any key...
15 When you have finished modifying the BGP configuration file, press the Escape key.
❖ The following prompt is displayed.
File Modified! Do you want to save it?(Y/N)[N]:
16 To save the configuration file, press y. To revert to the previously saved version,
press n.
❖ The Global BGP Configuration Menu is redisplayed.
Global BGP Configuration
------------------------1) BGP Admin : Enabled
2) Edit Config
Enter Choice :
17 Press the Escape key until you reach the Main Menu.
18 On the Main Menu, select Write Configuration to save the configuration. (For details,
see Saving (Writing) a Configuration).
19 Then, on the Main Menu, select Reset Unit. (For details, see Resetting the Device.)