Connecting to Two ISPs
Problem
You want to set up BGP to support two redundant Internet connections.
Solution
The following configuration shows how to make the basic BGP connections, but it has serious problems that we will show how to fix in other recipes in this chapter:
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z. Router1(config)#interface
Router1(config-if)#
Serial0
description
Router1(config-if)#
connection to ISP #1, ASN 65510
ip address
Router1(config-if)#
192.168.1.6 255.255.255.252
exit
Router1(config)#interface
Router1(config-if)#
Serial1
description
Router1(config-if)#
connection to ISP #2, ASN 65520
ip address
Router1(config-if)#
192.168.2.6 255.255.255.252
exit
Router1(config)#interface
Router1(config-if)#
Ethernet0
description
Router1(config-if)#
connection to internal network, ASN 65500
ip address
Router1(config-if)#
172.18.5.2 255.255.255.0
exit
Router1(config)#router bgp
Router1(config-router)#
65500
network
172.18.5.0
mask
Router1(config-router)#
255.255.255.0
neighbor
192.168.1.5
remote-as
Router1(config-router)#
65510
neighbor
192.168.2.5
remote-as
Router1(config-router)#
65520
no synchronization
Router1(config-router)#exit
Router1(config)#end
Router1#
Warning
We do not recommend using this configuration as printed for a real Internet connection because it leaves out several key components. A more complete example is shown in Recipe 9.19.
Discussion
Perhaps the most common BGP application involves connecting a single router to two different ...
Get Cisco IOS Cookbook, 2nd Edition now with the O’Reilly learning platform.
O’Reilly members experience books, live events, courses curated by job role, and more from O’Reilly and nearly 200 top publishers.