CCNP Network Route -BGP Part

advertisement
CCNP Network Route BGP Part -II
CCNP Network Route BGP Part -II
BGP ROUTE REDISTRIBUTION
Scenario:
R1 R2, R3 in AS 1000 with IP addresses of 192.168.10.1 and
loopback 1.1.1.1, 192.168.10.2 & loopback 2.2.2.2 and
R3 with [FE 0/0 192.168.10.3 & s0/0 10.1.1.1 & 3.3.3.3]
respectively.
R4 is in AS 2000 with ip address of 10.1.1.2 and loopback
address of 4.4.4.4
Lets enable BGP and Create Neighbors first.
R4:
R4(config)#router bgp 2000 
R4(config-router)#neighbor 10.1.1.1 remote-as 1000
Now we confirm it by the command
CCNP Network Route BGP Part -II
R4(config-router)#do show ip bgp summ
BGP router identifier 1.1.1.3, local AS number 2000
BGP table version is 1, main routing table version 1
Neighbor V AS MsgRcvd MsgSent
10.1.1.1
4 1000
0
0
TblVer InQ OutQ Up/Down State/PfxR
0 0 0
never Active
As we can see at the moment it is in Active state , meaning its
actively looking for neighbor which is not present. The reason
is that we have not configured R3 or its neighbor. So lets
configure R3
R3:
R3(config)#router bgp 1000
R3(config-router)#neighbor 10.1.1.2 remote-as 2000
Now lets confirm that the relationship has started.
CCNP Network Route BGP Part -II
R3(config)#do show ip bgp summary
BGP router identifier 192.168.10.3, local AS number 1000
BGP table version is 1, main routing table version 1
Neighbor
10.1.1.2
V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/Pf
4 2000
5
5
1 0 0
00:01:12
0
We can see that the state has changed from Active to a
number “0” and Up/Down timer has started.
Now to reach to loop back of R4 from R3:
We add a static route to R3 and R4 as below:
R3:
R3(config)#ip route 4.4.4.0 255.255.255.0 10.1.1.2
R4:
R4(config)#ip route 3.3.3.0 255.255.255.0 10.1.1.1
CCNP Network Route BGP Part -II
Now Ping to Confirm:
R4#ping 3.3.3.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 3.3.3.3, timeout is 2
seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max =
1/90/192 ms
Wonderful working !!
Now on R3:
R3(config-router)#neighbor 4.4.4.4 remote-as 2000
R3(config-router)#neighbor 4.4.4.4 update-source loopback 0
R3(config-router)#neighbor 4.4.4.4 ebgp-multihop 2
CCNP Network Route BGP Part -II
R4:
R4(config-router)#neighbor 3.3.3.3 remote-as 1000
R4(config-router)#neighbor 3.3.3.3 update-source loopback 0
R4(config-router)#neighbor 3.3.3.3 ebgp-multihop 2
Note: ebgp-multihop means that loopback address is 2 hops away, if
we don’t write it then the TTL value will fail and so does our
reachability.
Now we confirm our settings.
R4#show ip bgp summary
BGP router identifier 10.1.1.2, local AS number 2000
BGP table version is 1, main routing table version 1
Neighbor
V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down
State/PfxRcd
3.3.3.3
4 1000
4
4
1 0 0 00:00:20
0
10.1.1.1
4 1000
30
30
1 0 0 00:26:12
0
All working fine and neighbor relation is formed.
CCNP Network Route BGP Part -II
Now if we look at the routes we can see that there is no BGP
R4#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
S
C
C
3.0.0.0/24 is subnetted, 1 subnets
3.3.3.0 [1/0] via 10.1.1.1
4.0.0.0/32 is subnetted, 1 subnets
4.4.4.4 is directly connected, Loopback0
10.0.0.0/24 is subnetted, 1 subnets
10.1.1.0 is directly connected, Serial0/0
CCNP Network Route BGP Part -II
To solve this routing issue we issue command redistribute connected
as below on both routers R4 and R3:
R4:
R4(config)#router bgp 2000
R4(config-router)#redistribute connected
Now if we look at BGP
R4#show ip bgp
BGP table version is 3, local router ID is 10.1.1.2
Status codes: s suppressed, d damped, h history, * valid, > best, i internal,
r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
Network
Next Hop
*> 4.4.4.4/32
0.0.0.0
*> 10.1.1.0/24
0.0.0.0
Metric LocPrf Weight Path
0
32768 ?
0
32768 ?
CCNP Network Route BGP Part -II
*> means the best routes.
Now If we look at our routes
R3#show ip route
Gateway of last resort is not set
3.0.0.0/32 is subnetted, 1 subnets
C
3.3.3.3 is directly connected, Loopback0
4.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
B
4.4.4.4/32 [20/0] via 4.4.4.4, 00:00:20
S
4.4.4.0/24 [1/0] via 10.1.1.2
C 192.168.10.0/24 is directly connected, FastEthernet0/0
10.0.0.0/24 is subnetted, 1 subnets
C
10.1.1.0 is directly connected, Serial0/0
Hurrah !! We can see a “B” which is BGP
CCNP Network Route BGP Part -II
Now we need to repeat the same step on R3
R3:
R3(config)#router bgp 1000
R3(config-router)#redistribute connected
Now when we check ip routes on R4 it will show as below
R4#show ip route
Gateway of last resort is not set
B
S
C
B
C
3.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
3.3.3.3/32 [20/0] via 10.1.1.1, 00:00:02
3.3.3.0/24 [1/0] via 10.1.1.1
4.0.0.0/32 is subnetted, 1 subnets
4.4.4.4 is directly connected, Loopback0
192.168.10.0/24 [20/0] via 10.1.1.1, 00:00:02
10.0.0.0/24 is subnetted, 1 subnets
10.1.1.0 is directly connected, Serial0/0
CCNP Network Route BGP Part -II
Everything working and BGP is now active.
Next we will configure R1 and R2 but we will cover it in PartIII
Thanks,
Salman Aftab
www.itpings.com
Linuxworld.co
Download