08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

24
ZXR10 M6000 BGP Configuration V1.1

Transcript of 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Page 1: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

ZXR10 M6000 BGP Configuration

V1.1

Page 2: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Objectives

Understand the configuration steps of BGPGrasp the configuration of BGP Grasp the Maintenance of BGP

Page 3: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

BGP configuration stepsConfiguring BGP neighbor Configuring BGP Route Advertisement BGP Fault Treatment

Contents.

Page 4: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

BGP configuration steps

Enable BGP routing process, <as-number> is the AS system ID of router, 1~65535.

Configure a BGP neighbor and AS number of a peer

Configure BGP Route Advertisement

ZXR10(config)# router bgp < as-number>

ZXR10(config-bgp)# neighbor [ < ipv4-address> | < peer-group-name>] remote-as < number>

ZXR10(config-bgp)# network< ip-address> < net-mask>ZXR10(config-bgp)# redistribute < protocol>

Page 5: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

BGP configuration stepsConfiguring BGP neighbor Configuring BGP Route Advertisement BGP Fault Treatment

Contents.

Page 6: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Establishing EBGP Neighbor

EBGP:physical connected directly--Use IP addresses of interconnected interfaces

to create BGP connection--Use IP addresses of loopback interfaces to

create BGP connection

Page 7: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Establishing EBGP Neighbor--Direct Connected Address

R1# config terminalR1(config)# interface fei-0/1/0/1R1(config-if)# ip address 129.213.1.1 255.255.255.252R1(config-if)# exitR1(config)# router bgp 65000R1(config-bgp)# neighbor 129.213.1.2 remote-as 65001R1(config-bgp)# exit

R2# config terminalR2(config)# interface fei-0/1/0/1R2(config-if)# ip address 129.213.1.2 255.255.255.252R2(config-if)# exitR2(config)# router bgp 65001R2(config-bgp)# neighbor 129.213.1.1 remote-as 65000R2(config-bgp)# exit

Page 8: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Establishing EBGP Neighbor--Show BGP neighbor

R1#show ip bgp neighborBGP neighbor is 129.213.1.2, remote AS 65001, external link

BGP version 4, remote router ID 129.213.1.2BGP state = Established, up for 00:04:21hold time is 90 seconds, keepalive interval is 30 seconds……Connections established 1Local host: 129.213.1.1, Local port: 179Foreign host: 129.213.1.2, Foreign port: 1024

R2#show ip bgp neighborBGP neighbor is 129.213.1.1, remote AS 65000, external link

BGP version 4, remote router ID 129.213.1.1BGP state = Established, up for 00:00:27hold time is 90 seconds, keepalive interval is 30 seconds……Connections established 1Local host: 129.213.1.2, Local port: 1024Foreign host: 129.213.1.1, Foreign port: 179

Page 9: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Establishing EBGP Neighbor--Loopback address

R1# config terminalR1(config)# interface fei-0/1/0/1R1(config-if)# ip address 192.168.1.1 255.255.255.252R1(config-if)# exitR1(config)# interface Loopback1R1(config-if)# ip address 1.1.1.1 255.255.255.255R1(config-if)# exitR1(config)# router bgp 65000R1(config-bgp)# neighbor 1.1.1.2 remote-as 65001R1(config-bgp)# neighbor 1.1.1.2 ebgp-multihopR1(config-bgp)# neighbor 1.1.1.2 update-source Loopback1R1(config-bgp)# exitR1(config)# ip route 1.1.1.2 255.255.255.255 192.168.1.2

R2(config)# router bgp 65001R2(config-bgp)# neighbor 1.1.1.1 remote-as 65000R2(config-bgp)# neighbor 1.1.1.1 ebgp-multihop ttl 5R2(config-bgp)# neighbor 1.1.1.1 update-source Loopback1R2(config-bgp)# exitR2(config)# ip route 1.1.1.1 255.255.255.255 192.168.1.1

By default, TTL value for EBGP is 1

use "ebgp-multihop" command while establishing EBGP neighbor on not directly connected interfaces. default TTL value is 8

Page 10: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

R1#show ip bgp neighborBGP neighbor is 1.1.1.2, remote AS 65001, external link

BGP version 4, remote router ID 1.1.1.2BGP state = Established, up for 00:01:01hold time is 90 seconds, keepalive interval is 30 seconds……Connections established 1Local host: 1.1.1.1, Local port: 179Foreign host: 1.1.1.2, Foreign port: 1026

R2#show ip bgp neighborBGP neighbor is 1.1.1.1, remote AS 65000, external link

BGP version 4, remote router ID 1.1.1.1BGP state = Established, up for 00:02:03hold time is 90 seconds, keepalive interval is 30 seconds……Connections established 1Local host: 1.1.1.2, Local port: 1026Foreign host: 1.1.1.1, Foreign port: 179

Establishing EBGP Neighbor--Show BGP neighbor

Page 11: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Establishing IBGP Neighbor

IBGP:physical connected directly or not connected directly -- Use IP addresses of loopback interfaces to

create BGP connection

-- Synchronization

-- Full mesh

-- valuable nexthop(have reachable route)

Page 12: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Establishing EBGP Neighbor --Loopback addressR2# config terminalR2(config)# interface fei-0/1/0/1R2(config-if)# ip address 192.168.2.1 255.255.255.252R2(config-if)# exitR2(config)# interface Loopback1R2(config-if)# ip address 1.1.1.2 255.255.255.255R2(config-if)# exitR2(config)# router bgp 65001R2(config-bgp)# neighbor 1.1.1.3 remote-as 65001R2(config-bgp)# neighbor 1.1.1.3 update-source Loopback1R2(config-bgp)# neighbor 1.1.1.3 next-hop-selfR2(config-bgp)# no synchronizationR2(config-bgp)# exitR2(config)# router ospf 1R2(config-ospfv2)# network 192.168.2.0 0.0.0.3 area 0R2(config-ospfv2)# network 1.1.1.2 0.0.0.0 area 0R2(config-ospfv2)# exitR3(config)# router bgp 65001R3(config-bgp)#neighbor 1.1.1.2 remote-as 65001R3(config-bgp)#neighbor 1.1.1.2 update-source Loopback1R3(config-bgp)#neighbor 1.1.1.2 next-hop-selfR3(config-bgp)#no synchronizationR3(config-bgp)#exitR3(config)#router ospf 1R3(config-ospfv2)#network 192.168.2.0 0.0.0.3 area 0R3(config-ospfv2)#network 1.1.1.3 0.0.0.0 area 0R3(config-ospfv2)#exit

Page 13: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Establishing IBGP Neighbor--Show BGP Neighbor

R2#show ip bgp neighborBGP neighbor is 1.1.1.3, remote AS 65001, internal link

BGP version 4, remote router ID 1.1.1.3BGP state = Established, up for 00:01:25hold time is 90 seconds, keepalive interval is 30 seconds

……Connections established 1last error code is 6 Local host: 1.1.1.2, Local port: 179Foreign host: 1.1.1.3, Foreign port: 1096

R3#show ip bgp neighborBGP neighbor is 1.1.1.2, remote AS 65001, internal link

BGP version 4, remote router ID 1.1.1.2BGP state = Established, up for 00:03:07

……Connections established 1last error code is 5Local host: 1.1.1.3, Local port: 1096Foreign host: 1.1.1.2, Foreign port: 179

Page 14: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

BGP configuration stepsConfiguring BGP neighbor Configuring BGP Route Advertisement BGP Fault Treatment

Contents.

Page 15: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Configuring BGP Route Advertisement

1. Use network command to advertise routeAdvertise the concrete network routes learned from IGP protocol

(static,RIP、OSPF、ISIS etc)

2. Use redistribute command to advertise routeRedistribute all the routes learned from IGP protocol(s) while

there are a lot of routes which are hard to aggregate

3. BGP route aggregationAggregate the routes to one summary route and advertise to

other BGP neighbors, therefore can reduce the size of IP routing table significantly.

Make sure the mask of all the routes are equal while configuring route aggregation on routers, in order to avoid black hole route

Page 16: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Using network to Advertise Route

R2 runs OSPF as IGP protocol. R2 requires advertising thenetwork segment 18.0.0.0/8 which is discovered by OSPF in BGP.

R2#config terminalR2(config)#interface fei-0/1/0/1R2(config-if)#ip address 192.168.2.1 255.255.255.252R2(config-if)#exitR2(config)#router bgp 65001R2(config-bgp)#neighbor 192.168.2.2 remote-as 65000R2(config-bgp)#network 18.0.0.0 255.255.255.0R2(config-bgp)#exitR2(config)#router ospf 1R2(config-ospfv2)#network 18.0.0.0 0.255.255.255 area 0R2(config-ospfv2)#exit

R1#config terminalR1(config)#interface fei-0/1/0/1R1(config-if)#ip address 192.168.2.2 255.255.255.252R1(config-if)#exitR1(config)#router bgp 65000R1(config-bgp)#neighbor 192.168.2.1 remote-as 65001R1(config-bgp)#exit

Page 17: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Using network to Advertise Route-- Show BGP route

R2 runs OSPF as IGP protocol. R2 requires advertising thenetwork segment 18.0.0.0/8 which is discovered by OSPF in BGP.

R1#show ip bgp routeStatus codes: *-valid, >-best, i-internal,s-staleOrigin codes: i-IGP, e-EGP, ?-incomplete

Dest NextHop Metric LocPrf RtPrf Path*>18.0.0.0/8 192.168.2.1 20 65001 i

“*” indicates the route is available“>” indicates the route is the best choice“i” indicates this is a IBGP route, without “i” indicates this is a EBGP route or local routeNext-hop:If the address is full zero, that means this route is generated by router itselfLocal-Pre:the priority level of route which is learned by BGP. The default value is 100Path:shows the origin of this route. Three types: IGP, EGP and incomplete

Page 18: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Using redistribute to Advertise Route

R2 runs OSPF as IGP protocol. Now it needs to redistribute allOSPF routes information on R2 into BGP.

R2#config terminalR2(config)#interface fei-0/1/0/1R2(config-if)#ip address 192.168.2.1 255.255.255.252R2(config-if)#exitR2(config)#router ospf 1R2(config-ospfv2)#network 18.0.0.0 0.0.0.255 area 0R2(config-ospfv2)#exitR2(config)#router bgp 65001R2(config-bgp)#neighbor 192.168.2.2 remote-as 65000R2(config-bgp)#redistribute ospf-intR2(config-bgp)#redistribute connectedR2(config-bgp)#exit

Page 19: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Using redistribute to Advertise Route-- Show BGP Route

R1#show ip bgp routeStatus codes: *-valid, >-best, i-internal,s-staleOrigin codes: i-IGP, e-EGP, ?-incomplete

Dest NextHop Metric LocPrf RtPrf Path*> 18.0.0.0/8 192.168.2.1 20 65001 ?

R2 runs OSPF as IGP protocol. Now it needs to redistribute allOSPF routes information on R2 into BGP.

Page 20: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Configuring Route Aggregation

R1 advertises the segments of its own and the segments of R3 (192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24 and 192.168.3.0/24) to R2 in AS300.OSPF is run on the link between R1 and R3.

R1(config)#interface fei-0/1/0/1R1(config-if)#ip address 2.2.2.2 255.255.255.0R1(config-if)#exitR1(config)#router bgp 100R1(config-bgp)#neighbor 2.2.2.1 remote-as 300R1(config-bgp)#aggregate-address 192.168.0.0

255.255.252.0 count 0 summary-onlyR1(config-bgp)#redistribute ospf-intR1(config-bgp)#redistribute connectedR1(config-bgp)#exitR1(config)#router ospf 1R1(config-ospfv2)#network 192.168.3.0 0.0.0.255 area 0R1(config-ospfv2)#network 10.1.1.0 0.0.0.3 area 0R1(config-ospfv2)#exit

If the command is used without the parameter summary-only, R2 will advertise the detailed

routes with the aggregated route

Page 21: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

Configuring Route Aggregation-- Show BGP route

R2#show ip bgp routeStatus codes: *valid, >best, i-internalOrigin codes: i-IGP, e-EGP, ?-incomplete

Dest NextHop Metric LocPrf RtPrf Path*>192.168.0.0/22 2.2.2.2 20 100 i

R2#show ip bgp route detail 192.168.0.0 255.255.252.0BGP routing table entry for 192.168.0.0/2201:02:19 received from 2.2.2.2

origin i, nexthop 2.2.2.2,atomic,aggr 100 2.2.2.2,as path [100]

R1 advertises the segments of its own and the segments of R3 (192.168.0.0/24, 192.168.1.0/24, 192.168.2.0/24 and 192.168.3.0/24) to R2 in AS300.OSPF is run on the link between R1 and R3.

Page 22: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

BGP configuration stepsConfigures a BGP neighbor Configuring BGP Route Advertisement BGP Fault Treatment

Contents

Page 23: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24

BGP Fault Treatment Flow

Page 24: 08 ip oc304 2_e1_1 zxr10 m6000 bgp configuration 24