Вы находитесь на странице: 1из 7

Advanced Routing Suite

Configuring BGP and OSPF Interoperability

June 4, 2009

In This Document
Introduction A Simple Routing Topology Configuring Multiple Dynamic Routing Protocols References Documentation Feedback page 2 page 4 page 4 page 7 page 7

Introduction
To preserve existing technologies and enable the addition of new ones into constantly changing computer networks, multiple dynamic routing protocols should be able to work side by side. This document covers how configure, activate and monitor BGP and OSPF to share routing information on the same network.

Basic Terminology
Route Redistribution A configuration option local to a router that enables different routing protocols to exchange routing information. ASBR and External Routes An Autonomous System Boundary Router imports routing information learned from other routing protocols into the OSPF routing domain. New routes learned through this mechanism are known as External Routes. OSPF External Routes OSPF distinguishes between internal and external routes. In OSPF, external routes are further distinguished as either Type-1 or Type-2. The difference between them refers to the way in which the route metric accumulates over the network. Type-1 external route means that the metric is the sum of the internal OSPF cost and the external redistributed cost. Type-2 (the default external type) external route means that the metric is equal only to the redistributed cost.

Copyright 2009 Check Point Software Technologies, Ltd. All rights reserved

Introduction

Basic Commands
router ospf <instance id>
Enters the local router OSPF sub-menu, enables configuration and modification of OSPF settings on the local peer. Multiple instances of OSPF may run on the same router.

network <network address> <wildcard> area <area id>


Defines which interfaces run and listen to OSPF. Directly connected networks that match the address and wildcard-bits will be assigned with the area id. Due to the OSPF broadcast auto-detection mechanism, all routers on the same subnet running OSPF with the same area identifier are automatically considered OSPF neighbors.

router-id <ip address>


Statically defines the ID the router will use on the OSPF network.

show ip ospf <instance id>


Displays OSPF routing information of a specific OSPF instance.

show ip ospf neighbor


Displays OSPF neighbors information.

show ip route ospf


Displays routes from local routing table that were learned through the OSPF protocol.

router bgp <autonomous system>


Enters the local router BGP sub-menu and enables BGP on the local peer. The specified autonomous system determines the local routers BGP AS. A router can only be associated with a single AS.

neighbor <ip address> remote-as <autonomous system>


Activates BGP with this neighbor, configures the IPv4 address of the host machine and the remote-AS number for this host.

network <network address> mask <network address>


Defines which network will be advertised through BGP updates to neighbors. The command does not activate the protocol on the interface.

show ip bgp neighbors


Displays BGP neighbor information.

show ip bgp summary


Displays BGP summary information.

show ip route bgp


Displays routes from the local routing table that were learned through the BGP protocol.

Redistribute <protocol>
A command which defines which protocols will be injected into a specific dynamic routing protocol.

A Simple Routing Topology

A Simple Routing Topology


Consider the routing topology shown in Figure 1: Figure 1 Basic Topology for Multiple Dynamic Routing Protocols

In Figure 1, routers: A and C run OSPF A and B run BGP

The OSPF routers (A and C) work in area 0 (backbone area) and act as neighbors.The BGP routers (A and B) maintain a neighborhood relation (meaning they are BGP neighbors).

Configuring Multiple Dynamic Routing Protocols


Advanced Routing is only supported on SecurePlatform Pro. Before configuring dynamic routing protocols verify that the Advanced Routing Suite is enabled. If the suite is not enabled, enable it using the cpconfig option Enable Advanced Routing. To enter the Advanced Routing Suite CLI, enter router on the SecurePlaform command line.

Configuring Multiple Dynamic Routing Protocols

To enable the configuration shown in Figure 1: 1. Router A is configured to run OSPF process 1. Activate the OSPF process on the interface that is directly connected to network 172.16.1.0/24:
localhost.localdomain#configure terminal localhost.localdomain(config)#router ospf 1 localhost.localdomain(config-router-ospf)#network 172.16.1.0 0.0.0.255 area 0.0.0.0 localhost.localdomain(config-router-ospf)#end

Router A is running a BGP instance (AS 65165) and defines Router B as BGP neighbor through network 10.0.1.0/24:
localhost.localdomain#configure terminal localhost.localdomain(config)#router bgp 65165 localhost.localdomain(config-router-bgp)#neighbor 10.0.1.20 remote-as 65165 localhost.localdomain(config-router-bgp)#end

2. Configure Router A to advertise the 10.0.1.0/24 network through the BGP protocol:
localhost.localdomain#configure terminal localhost.localdomain(config)#router bgp 65165 localhost.localdomain(config-router-bgp)#network 10.0.1.0 mask 255.255.255.0 localhost.localdomain(config-router-bgp)#end

Router B is also running a BGP instance (AS 65165) and defines Router A as BGP neighbor through network 10.0.1.0/24:
localhost.localdomain#configure terminal localhost.localdomain(config)#router bgp 65165 localhost.localdomain(config-router-bgp)#neighbor 10.0.1.10 remote-as 65165 localhost.localdomain(config-router-bgp)#end

3. Configure Router B to advertise networks 10.0.1.0/24 and 192.168.1.0/24 through the BGP protocol:
localhost.localdomain#configure terminal localhost.localdomain(config)#router bgp 65165 localhost.localdomain(config-router-bgp)#network 10.0.1.0 mask 255.255.255.0 localhost.localdomain(config-router-bgp)#network 192.168.1.0 mask 255.255.255.0 localhost.localdomain(config-router-bgp)#end

4. Configure Router C to activate the OSPF process 1 on the interface that is directly connected to networks 172.16.1.0/24 and 192.168.2.0/24:
localhost.localdomain#configure terminal localhost.localdomain(config)#router ospf 1 localhost.localdomain(config-router-ospf)#network 192.168.2.0 0.0.0.255 area 0.0.0.0 localhost.localdomain(config-router-ospf)#network 172.16.1.0 0.0.0.255 area 0.0.0.0 localhost.localdomain(config-router-ospf)#end

Router A runs two types of dynamic routing protocols (OSPF and BGP). 5. Distribute routes learned from OSPF to BGP:
localhost.localdomain#configure terminal localhost.localdomain(config)#router bgp 65165 localhost.localdomain(config-router-ospf)#redistribute ospf localhost.localdomain(config-router-ospf)#end

Configuring Multiple Dynamic Routing Protocols

6. Do the same for BGP so that routes learned from BGP will be distributed to OSPF:
localhost.localdomain#configure terminal localhost.localdomain(config)#router ospf 1 localhost.localdomain(config-router-ospf)#redistribute bgp localhost.localdomain(config-router-ospf)#end

7. Use the show command to verify the existence of OSPF information on Router C:
localhost.localdomain#show ip ospf 1 Routing Process "ospf 1" with ID 172.16.1.20 Supports opaque LSA It is an autonomous system boundary router and is not an area border router Hold time between two SPFs is 5 Minimum LSA interval 5. Minimum LSA arrival 1 Number of external LSA 2. Checksum sum 1802683 Number of opaque AS LSA 0, Checksum sum 0 Number of areas in this router is 1. 1 normal 0 stub 0 nssa Area 0.0.0.0 Number of interface in this area is 2 It is a normal area Number of LSA 4 Checksum sum 1802683 Number of opaque LSA 0 Checksum sum 0 Area ranges are localhost.localdomain#show ip route ospf Codes: C - connected, S - static, R - RIP, B - BGP, O - OSPF D - DVMRP, 3 - OSPF3, I - IS-IS, K - Kernel A - Aggregate O 192.168.1.0/24 O 192.168.2.0/24 [10/150] via 192.168.7.2, 07:22:49, eth1 [10/150] via 192.168.7.2, 11:23:08, eth2

References

References
For more configuration information see: Check Point SecurePlatformPro and Advanced Routing Suite CLI Guide Advanced Routing Suite - Configuring BGP Advanced Routing Suite - Configuring OSPF Advanced Routing Suite - Dynamic Routing in a ClusterXL Environment Advanced Routing Suite - Configuring PIM

Available at: http://support.checkpoint.com

Documentation Feedback
Check Point is engaged in a continuous effort to improve its documentation. Please help us by sending your comments to: cp_techpub_feedback@checkpoint.com

Вам также может понравиться