Transcript
encor e!n etworks •
TM
Version A.1, January 2013 © 2013 Encore Networks, Inc. All rights reserved.
Configuring the BANDIT for OSPF or BGP
T
his chapter discusses configuration of the Open Shortest Path First (OSPF) protocol and the Border Gateway Protocol (BGP). See the following sections:
• Autonomous Systems and Routing Protocols
• OSPF • BGP • Configuring a BANDIT Device to Use OSPF or BGP Note: A single BANDIT device can use OSPF or BGP, but not both. To revise the BANDIT device’s OSPF reference file or BGP reference file, see the following: • Sample Revision of the OSPF Configuration File • Sample Revision of the BGP Configuration File
3.1
Autonomous Systems and Routing Protocols
An autonomous system (AS) is a single routing domain within an IP network. (A routing domain is a group of devices that share the same IP routing policy and network architecture.) An AS can be a small section of a LAN or an entire network, depending on the network architecture. The AS may be managed by more than one entity. Autonomous systems are described in IETF RFC 1930. A routing protocol is designated as internal or external according to how it handles autonomous systems: • An interior gateway protocol routes traffic within an autonomous system. Two main types of interior gateway protocols are: - Link-state routing protocols, such as OSPF. - Distance-vector routing protocols, such as RIP Routing. • An exterior gateway protocol routes traffic between autonomous systems. BGP is the principal exterior gateway protocol in use. In general, a system that uses OSPF for internal traffic uses BGP for external traffic, and vice versa. However, implementation of one does not require implementation of the other.
For information on trademarks, safety, limitations of liability, and similar topics, see Notices.
Home Module: Routing Document 3
Page 2
3.2
Routing Module, Document 3
OSPF
The Open Shortest Path First (OSPF) protocol is an adaptive link-state routing protocol. OPSF is based on the shortest-path first (SPF) algorithm, usually called Dijkstra's algorithm in honor of its developer, Edsger Dijkstra. OSPF is designated as “open” because it is an open standard (that is, its definition is public information). OSPF routes traffic within an autonomous system. OSPF divides the AS into areas. Each node (BANDIT) has complete link-state information about the network topology in its area. A node can border two or more areas; in that case, the node is a member of each area. Some nodes have the information for the entire autonomous system. Each area connects to the backbone area. OSPF multicast updates indicate only changes. Note: The network administrator develops the autonomous system and saves that information in a file that the BANDIT can access. OSPF runs directly over IP. OSPF version 2 (for IPv4) is specified in IETF RFC 2328. OSPF version 3 (for IPv6) is specified in IETF RFC 5340.
3.3
BGP
The Border Gateway Protocol (BGP) is a path–vector protocol. As used in BANDIT networks, BGP routes traffic between autonomous systems. BGP runs over TCP (which runs over IP) on port 179. BGP version 4 is described in IETF RFC 4271.
3.4
Configuring a BANDIT Device to Use OSPF or BGP
In general, a system that uses OSPF for internal traffic uses BGP for external traffic, and vice versa. However, implementation of one does not require implementation of the other. To configure OSPF or BGP, use the following procedure. 1
Log into the BANDIT device. (For details, see Starting the ELIOS Software.) ❖ The Main Menu is displayed.
Page 3
Configuring the BANDIT for OSPF or BGP
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 Configuration. ❖ The Typical Configurations Menu is displayed.
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.
Page 4
Routing Module, Document 3
OSPF/BGP Configuration ----------------------1) Global Ospf Configuration 2) Global Bgp Configuration 3) OSPF/BGP Remote Logging : Disabled Enter Choice : 1
Do one of the following:
4
a If you wish to configure OSPF, go to step 5. b If you do not wish to configure OSPF (for example, if you wish to configure BGP), go to step 7.
!
Caution: A BANDIT device can use either OSPF or BGP, but not both. Enable only OSPF or only BGP.
5
To configure OSPF, do the following: a On the OSPF/BGP Configuration Menu, select Global OSPF Configuration. ❖ The Global OSPF Configuration Menu is displayed.
Global OSPF Configuration -------------------------1) OSPF Admin : Disabled 2) Config Edit Enter Choice : 1
b On the Global OSPF Configuration Menu, select OSPF Admin. ❖ The OSPF Status Menu is displayed.
OSPF Status -----------1) Enable 2) Disable Enter Choice : 1
c On the OSPF Status Menu, select Enable. ❖ OSPF is enabled, and the Global OSPF Configuration Menu is redisplayed.
Configuring the BANDIT for OSPF or BGP
Page 5
Global OSPF Configuration -------------------------1) OSPF Admin : Enabled 2) Config Edit Enter Choice : 2
d On the Global OSPF Configuration Menu, select Config Edit. ❖ The following prompt is displayed.
Enter file name [/etc/ospf.conf]:
Note: The system automatically creates the default file /etc/ospf.conf when the software is loaded. If the configuration is imported from a previous version of software that does not support OSPF, OSPF automatically adds the file into the system. To obtain a default copy of the file, load the default configuration. The BANDIT always uses ospf.conf for OSPF configuration, although you can use the Edit Menu to prepare a different configuration file. For more information, contact your Encore Networks representative. e Do one of the following: i If the OSPF protocol will use a different file from the file shown, type that file’s path and name. ❖ The specified file is attached. Then its contents are listed (similar to the listing after substep 5e, part iii). Go to substep 5f. ii If the OSPF protocol will use the file shown, and you do not wish to review the file, press the Escape key. ❖ The Global OSPF Configuration Menu is redisplayed. Go to substep 5h. iii If the OSPF protocol will use the file shown, and you wish to review that file, press the Enter key. ❖ The line code for the file is displayed. Note: The listing shown is a template for Encore Networks’ OSPF 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. For information on modifying the OSPF configuration to fit your network, see Sample Revision of the OSPF Configuration File.
Page 6
Routing Module, Document 3
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20
! password kiwifi enable password k1w1f1 no banner motd access-list access permit 127.0.0.1/32 access-list access deny any line vty access-class access !interface wlan0 interface LAN ip ospf authentication-key kiwifi ip ospf network broadcast ip ospf priority 1 interface WAN ip ospf authentication-key kiwifi ip ospf network broadcast ip ospf priority 1 router ospf network 192.168.101.0/24 area 0 ospf router-id 192.168.101.232
Enter 'A'= Add, 'M'= Modify, 'D' = Delete, 'I' = Insert, or any key...
f Do one of the following: i If you do not wish to review the remainder of the code, press the Escape key. ❖ The Global OSPF Configuration Menu is redisplayed. Go to substep 5h. ii If you wish to add a line, press a and follow the instructions on the screen. iii If you wish to modify a line, press m and follow the instructions on the screen. iv If you wish to delete a line, press d and follow the instructions on the screen. v If you wish to insert a line, press i and follow the instructions on the screen. vi If you wish to review more lines in the code, press the Enter key. ❖ More lines of code are displayed.
21 22 23 24 25 26
area 0 range 192.168.101.0/24 area 1 range 10.10.10.0/24 !area authentication area 2 virtual-link 11.1.1.1 hello-interval 20 !compatible rfc1583 !Enable logging
Enter 'A'= Add, 'M'= Modify, 'D' = Delete, 'I' = Insert, or any key...
g Do one of the following: i If you do not wish to review the remainder of the code, press the Escape key. ❖ The Global OSPF Configuration Menu is redisplayed. Go to substep 5h. ii If you wish to add a line, press a and follow the instructions on the screen. iii If you wish to modify a line, press m and follow the instructions on the screen.
Configuring the BANDIT for OSPF or BGP
Page 7
iv If you wish to delete a line, press d and follow the instructions on the screen. v If you wish to insert a line, press i and follow the instructions on the screen. vi If you wish to review more lines in the code, press the Enter key. ❖ More lines of code are displayed. Note: If there are no remaining lines of code, the Global OSPF Configuration Menu is redisplayed.
Global OSPF Configuration -------------------------1) OSPF Admin : Enabled 2) Config Edit Enter Choice :
h When you have finished configuring OSPF, then, while viewing the Global OSPF Configuration menu, press the Escape key. ❖ The OSPF/BGP Configuration Menu is redisplayed.
OSPF/BGP Configuration ----------------------1) Global Ospf Configuration 2) Global Bgp Configuration 3) OSPF/BGP Remote Logging : Disabled Enter Choice :
To save the OSPF configuration, do the following:
6
a Press the Enter key until you reach the Main Menu. b Then, on the Main Menu, select Write Configuration. (For details, see Saving (Writing) a Configuration.) c Then, still on the Main Menu, select Reset Unit. (For details, see Resetting the Device.) Do one of the following:
7
a If you wish to configure BGP, go to step 8. b If you do not wish to configure BGP (for example, if you configured OSPF in step 5), go to step 10.
!
Caution: A BANDIT device can use either OSPF or BGP, but not both. Enable only OSPF or only BGP.
8
To configure BGP, do the following: a On the OSPF/BGP Configuration Menu, select Global BGP Configuration. ❖ The Global BGP Configuration Menu is displayed.
Page 8
Routing Module, Document 3
Global BGP Configuration ------------------------1) BGP Admin : Disabled 2) Edit Config Enter Choice : 1
b On the Global BGP Configuration Menu, select BGP Admin. ❖ The BGP Status Menu is displayed.
BGP Status ----------1) Enable 2) Disable Enter Choice : 1
c On the BGP Status Menu, select Enable. ❖ BGP is enabled, and the Global BGP Configuration Menu is redisplayed.
Global BGP Configuration ------------------------1) BGP Admin : Enabled 2) Edit Config Enter Choice : 2
d On the Global BGP Configuration Menu, select Edit Config. ❖ The following prompt is displayed.
Enter file name [/etc/bgpd.conf]:
Note: The system automatically creates the default file /etc/bgpd.conf when the software is loaded. If the configuration is imported from a previous version of software that does not support BGP, BGP automatically adds the file into the system. To obtain a default copy of the file, load the default configuration. The BANDIT always uses bgpd.conf for BGP configuration, although you can use the Edit Menu to prepare a different configuration file. For more information, contact your Encore Networks representative.
Configuring the BANDIT for OSPF or BGP
Page 9
e Do one of the following: i If the BGP protocol will use a different file from the file shown, type that file’s path and name. ❖ The specified file is attached. Then its contents are listed (similar to the listing after substep 8e, part iii). Go to substep 8f. ii If the BGP protocol will use the file shown, and you do not wish to review the file, press the Escape key. ❖ The Global BGP Configuration Menu is redisplayed. Go to substep 8h. iii If the BGP protocol will use the file shown, and you wish to review that file, press the Enter key. ❖ The line code for the file is displayed. 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. For information on modifying the BGP configuration to fit your network, see 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 10.0.0.1 ! network 10.0.0.0/8 ! neighbor 10.0.0.2 remote-as 7675 ! 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...
f Do one of the following: i If you do not wish to review the remainder of the code, press the Escape key. ❖ The Global BGP Configuration Menu is redisplayed. Go to substep 8h. ii If you wish to add a line, press a and follow the instructions on the screen. iii If you wish to modify a line, press m and follow the instructions on the screen. iv If you wish to delete a line, press d and follow the instructions on the screen.
Page 10
Routing Module, Document 3
v If you wish to insert a line, press i and follow the instructions on the screen. vi If you wish to review more lines in the code, press the Enter key. ❖ More lines of code 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...
g Do one of the following: i If you do not wish to review the remainder of the code, press the Escape key. ❖ The Global BGP Configuration Menu is redisplayed. Go to substep 8h. ii If you wish to add a line, press a and follow the instructions on the screen. iii If you wish to modify a line, press m and follow the instructions on the screen. iv If you wish to delete a line, press d and follow the instructions on the screen. v If you wish to insert a line, press i and follow the instructions on the screen. vi If you wish to review more lines in the code, press the Enter key. ❖ More lines of code are displayed. Note: If there are no remaining lines of code, the Global BGP Configuration Menu is redisplayed.
Global BGP Configuration ------------------------1) BGP Admin : Enabled 2) Edit Config Enter Choice :
h When you have finished configuring BGP, then, while viewing the Global BGP Configuration menu, press the Escape key. ❖ The OSPF/BGP Configuration Menu is redisplayed.
Configuring the BANDIT for OSPF or BGP
Page 11
OSPF/BGP Configuration ----------------------1) Global Ospf Configuration 2) Global Bgp Configuration 3) OSPF/BGP Remote Logging : Disabled Enter Choice :
9
To save the BGP configuration, do the following: a Press the Enter key until you reach the Main Menu. b Then, on the Main Menu, select Write Configuration. (For details, see Saving (Writing) a Configuration.) c Then, still on the Main Menu, select Reset Unit. (For details, see Resetting the Device.)
10 If you do not wish to use remote logging for OSPF and BGP, go to step 12. 11 If you wish to use remote logging of OSPF and BGP activities, then do the following: a On the OSPF/BGP Configuration Menu, select OSPF/BGP Remote Logging. ❖ The OSPF Remote Logging Menu or the BGP Remote Logging Menu is displayed, according to whether you configured the BANDIT to use OSPF or BGP. Note: The Remote Logging Menu is configured for the routing protocol (OSPF or BGP) that is enabled. You can enable only OSPF or only BGP; you cannot enable both OSPF and BGP on the same BANDIT device.
OSPF Remote Logging -------------------1) Logging : Disabled 2) IP Address : 0.0.0.0 3) Log Facility : kern Enter Choice : 1
Note: OSPF and BGP use the same logging menu and subroutines to record traces and messages. (They do not share log files, because OSPF and BGP maintain separate log files and because you cannot enable both OSPF and BGP on the same BANDIT device.) b On the OSPF or BGP Remote Logging Menu, select Logging. ❖ The OSPF Remote Logging Status Menu or the BGP Remote Logging Status Menu is displayed.
OSPF Remote Logging Status --------------------------1) Enable 2) Disable Enter Choice :
Page 12
Routing Module, Document 3
c On the OSPF or BGP Remote Logging Status Menu, select Enable. ❖ Remote logging of OSPF or BGP activities is enabled, and the OSPF or BGP Remote Logging Status Menu is redisplayed.
OSPF Remote Logging Status --------------------------1) Enable 2) Disable Enter Choice :
d After you have enabled remote logging, press the Escape key. ❖ The OSPF or BGP Remote Logging Menu is redisplayed.
OSPF Remote Logging -------------------1) Logging : Enabled 2) IP Address : 0.0.0.0 3) Log Facility : kern Enter Choice : 1
e On the OSPF or BGP Remote Logging Menu, select IP Address. ❖ A prompt similar to the following is displayed.
Enter OSPF Logging IP Address :
f Type the IP address for the remote logging site, and press Enter. ❖ The OSPF or BGP Remote Logging Menu is redisplayed, showing the specified IP address. Note: If the OSPF/BGP Configuration Menu is displayed, select OSPF/BGP Remote Logging to see the OSPF Remote Logging Menu or the BGP Remote Logging Menu.
OSPF Remote Logging -------------------1) Logging : Enabled 2) IP Address : 192.168.10.4 3) Log Facility : kern Enter Choice : 3
g On the OSPF or BGP Remote Logging Menu, select Log Facility.
Configuring the BANDIT for OSPF or BGP
Page 13
Note: The log facility “kernel” (kern) is equivalent to “system log” (syslog). ❖ The Syslog Facility Menu is displayed. This menu lets you select the location for the log information of OSPF/BGP activities.
Syslog Facility ---------------1) syslog 2) local0 3) local1 4) local2 5) local3 6) local4 7) local5 8) local6 9) local7 Enter Choice :
h Do one of the following: i If you do not wish to change logs, press the Escape key. ii If you wish to use a different log file on the menu, select that type. ❖ The OSPF or BGP Remote Logging Menu is redisplayed, showing the log that will be used.
OSPF Remote Logging -------------------1) Logging : Enabled 2) IP Address : 192.168.10.4 3) Log Facility : kern Enter Choice :
i When you have finished configuring remote logging for OSPF or BGP activities, press the Escape key. ❖ The OSPF/BGP Configuration Menu is redisplayed.
OSPF/BGP Configuration ----------------------1) Global Ospf Configuration 2) Global Bgp Configuration 3) OSPF/BGP Remote Logging : Enabled Enter Choice : 2
Note: In addition to configuring OSPF or BGP, make sure you complete the BANDIT’s standard configuration. Consult your network administrator for that configuration.
Page 14
Routing Module, Document 3
OSPF and BGP routers need to know their neighbors and need to know which IP networks to advertise. For these reasons, OSPF and BGP also rely on static routes and/ or RIP. For information on configuring those features, see Static Routing and RIP Routing. 12 When you have finished configuring OSPF or BGP, press the Escape key until you reach the Main Menu.
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 :
13 On the Main Menu, select Write Configuration to save the OSPF/BGP configuration. (For details, see Saving (Writing) a Configuration.) 14 Then, on the Main Menu, select Reset Unit. (For details, see Resetting the Device.)