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

eBGP configuration

for
CCNA Students
By
Eng. Abeer Hosni

https://www.facebook.com/groups/1720572871550995/
lab 1 (eBGP configuration)

Objective:
Configure eBGP peering between R1 and R2 then advertise their networks using the
network command.
Configuration:
R1(config)#int f0/0
R1(config-if)#ip address 10.0.0.1 255.255.255.252
R1(config-if)#no shutdown
R1(config-if)#int loop 1
R1(config-if)#ip address 1.1.1.1 255.255.255.255

R2(config)#int f1/0
R2(config-if)#ip address 10.0.0.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#int loop 2
R2(config-if)#ip address 2.2.2.2 255.255.255.255

To configure eBGP peering between the two routers:

R1(config)#router bgp 100


R1(config-router)#neighbor 10.0.0.2 remote-as 200

R2(config)#router bgp 200


R2(config-router)#neighbor 10.0.0.1 remote-as 100
*Sep 23 14:19:49.743: %BGP-5-ADJCHANGE: neighbor 10.0.0.1 Up

R1#show ip bgp summary


<Output omitted>
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.0.2 4 200 5 5 1 0 0 00:01:03 0

R1#show ip bgp neighbors


<Output omitted>
BGP state = Established, up for 00:02:40

Now to advertise each router networks, there are two ways to accomplish that. The
first one is by using the network command. The second one which is out of the scope of
our course is by using the redistribution command.

R1(config)#router bgp 100


R1(config-router)#network 1.1.1.1 mask 255.255.255.255

R2(config)#router bgp 200


R2(config-router)#network 2.2.2.2 mask 255.255.255.255

To verify:
R1#show ip bgp
<Output omitted>
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 0.0.0.0 0 32768 i
*> 2.2.2.2/32 10.0.0.2 0 0 200 i

R2#show ip bgp
<Output omitted>
Network Next Hop Metric LocPrf Weight Path
*> 1.1.1.1/32 10.0.0.1 0 0 100 i
*> 2.2.2.2/32 0.0.0.0 0 32768 i

R1#show ip route bgp


<Output omitted>
2.0.0.0/32 is subnetted, 1 subnets
B 2.2.2.2 [20/0] via 10.0.0.2, 00:03:11

R2#show ip route bgp


<Output omitted>
1.0.0.0/32 is subnetted, 1 subnets
B 1.1.1.1 [20/0] via 10.0.0.1, 00:04:30

R1#ping 2.2.2.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/36/76 ms

Note:
When advertising a network using the network command, make sure that it matches
the prefix in the routing table using the mask option.

lab 2 (eBGP-multihop and update-source)

Objective:
Configure eBGP peering between R1 and R2 using their loopback interfaces.
Configuration:
R1(config)#int s1/0

R1(config-if)#ip address 10.0.0.1 255.255.255.252

R1(config-if)#no shutdown

R1(config-if)#int s1/1

R1(config-if)#ip address 11.0.0.1 255.255.255.252

R1(config-if)#no shutdown

R1(config-if)#int loop 1
R1(config-if)#ip address 1.1.1.1 255.255.255.255

R1(config-if)#exit

R1(config)#ip route 2.2.2.2 255.255.255.255 s1/0

R1(config)#ip route 2.2.2.2 255.255.255.255 s1/1

R2(config)#int s1/0

R2(config-if)#ip address 10.0.0.2 255.255.255.252

R2(config-if)#no shutdown

R2(config-if)#int s1/1

R2(config-if)#ip address 11.0.0.2 255.255.255.252

R2(config-if)#no shutdown

R2(config-if)#int loop 2

R2(config-if)#ip address 2.2.2.2 255.255.255.255

R2(config-if)#exit

R2(config)#ip route 1.1.1.1 255.255.255.255 s1/0

R2(config)#ip route 1.1.1.1 255.255.255.255 s1/1

R1(config-router)#neighbor 2.2.2.2 remote-as 200

R1(config-router)#neighbor 2.2.2.2 update-source loop 1

R2(config-router)#neighbor 1.1.1.1 remote-as 100

R2(config-router)#neighbor 1.1.1.1 update-source loop 2

But the adjacency doesn’t come up as the TTL value for the eBGP control plane is 1 by default.

R1#show ip bgp summary

<Output omitted>

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd

2.2.2.2 4 200 0 0 1 0 0 never Idle

R1(config)#router bgp 100


R1(config-router)#neighbor 2.2.2.2 ebgp-multihop 2

R2(config)#router bgp 200

R2(config-router)#neighbor 1.1.1.1 ebgp-multihop 2

*May 14 02:08:26.283: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up

R1#show ip bgp summary

<Output omitted>

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd

2.2.2.2 4 200 4 4 1 0 0 00:00:27 0

R2#show ip bgp summary

<Output omitted>

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd

1.1.1.1 4 100 5 5 1 0 0 00:01:28 0

lab 3 (BGP authentication)


Based on the previous topology.

R1(config)#router bgp 100


R1(config-router)#neighbor 2.2.2.2 password EGCODE
R1(config-router)#do clear ip bgp *
*May 14 02:20:29.315: %TCP-6-BADAUTH: No MD5 digest from 2.2.2.2(179) to
1.1.1.1(64027) tableid – 0

R2(config-router)#neighbor 1.1.1.1 password REDHAT


*May 14 02:22:31.043: %TCP-6-BADAUTH: Invalid MD5 digest from 1.1.1.1(56989) to
2.2.2.2(179) tableid – 0
R2(config-router)#neighbor 1.1.1.1 password EGCODE
*May 14 02:23:14.271: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up
Lab 3 (MP-BGP for IPV6):

Objective:
Configure MP-BGP to support IPV6 for the previous topology.
Configuration:
R1(config)#int f0/0
R1(config-if)#ipv6 address 2001:ab::1/64
R1(config-if)#no shutdown
R1(config-if)#int loop 1
R1(config-if)#ipv6 address 2001::1/128
R1(config-if)#exit
R1(config)#ipv6 unicast-routing
R2(config)#int f0/0
R2(config-if)#ipv6 address 2001:ab::2/64
R2(config-if)#no shutdown
R2(config-if)#int loop 2
R2(config-if)#ipv6 address 2001::2/128
R2(config-if)#exit
R2(config)#ipv6 unicast-routing

R1(config)#router bgp 100


*May 13 23:07:02.623: %BGP-4-NORTRID: BGP could not pick a router-id. Please configure
manually.
R1(config-router)#bgp router-id 1.1.1.1
R1(config-router)#neighbor 2001:ab::2 remote-as 200
R1(config-router)#address-family ipv6
R1(config-router-af)#neighbor 2001:ab::2 activate

R2(config)#router bgp 200


*May 13 23:10:06.563: %BGP-4-NORTRID: BGP could not pick a router-id. Please configure
manually.
R2(config-router)#bgp router-id 2.2.2.2
R2(config-router)#neighbor 2001:ab::1 remote-as 100
R2(config-router)#address-family ipv6
R2(config-router-af)#neighbor 2001:ab::1 activate
*May 13 23:12:15.903: %BGP-5-ADJCHANGE: neighbor 2001:AB::1 Up

Since the two routers are neighbors, we can advertise the networks using the network
command or redistribution.

R2(config)#router bgp 200


R2(config-router)#address-family ipv6
R2(config-router-af)#network 2001::2/128

R1(config)#router bgp 100


R1(config-router)#address-family ipv6
R1(config-router-af)#redistribute connected
To verify:
R1#show bgp ipv6 unicast summary
<Output omitted>
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2001:AB::2 4 200 20 21 4 0 0 00:14:41 1

R2#show bgp ipv6 unicast summary


<Output omitted>
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2001:AB::1 4 100 22 22 4 0 0 00:16:10 2

R1#show bgp ipv6 unicast


<Output omitted>
Network Next Hop Metric LocPrf Weight Path
*> 2001::1/128 :: 0 32768 ?
*> 2001::2/128 2001:AB::2 0 0 200 i
*> 2001:AB::/64 :: 0 32768 ?

R1#show ipv6 route bgp


<Output omitted>
B 2001::2/128 [20/0]
via FE80::C802:12FF:FE34:0, FastEthernet0/0

R1#ping 2001::2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/21/36 ms

R2#show bgp ipv6 unicast


<Output omitted>
Network Next Hop Metric LocPrf Weight Path
*> 2001::1/128 2001:AB::1 0 0 100 ?
*> 2001::2/128 :: 0 32768 i
r> 2001:AB::/64 2001:AB::1 0 0 100 ?

R2#show bgp ipv6 unicast rib-failure


Network Next Hop RIB-failure RIB-NH Matches
2001:AB::/64 2001:AB::1 IPv6 Higher admin distanc n/a

R2#show ipv6 route bgp


<Output omitted>
B 2001::1/128 [20/0]
via FE80::C801:8FF:FE1C:0, FastEthernet0/0

R2#ping 2001::1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 2001::1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 8/25/36 ms

Best wishes

Abeer 

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