R1#conf t
R1(config)#inter f0/0
R1(config-if)#ip add 192.34.1.1 255.255.255.0
R1(config-if)#no shut
R1(config-if)#exit
R1(config)#inter loop 0
R1(config-if)#no shut
R1(config-if)#ip add 34.1.1.1 255.255.255.0
R1(config-if)#exit
R1(config)#inter loop 1
R1(config-if)#no shut
R1(config-if)#ip add 34.1.2.1 255.255.255.0
R1(config-if)#exit
R1(config)#router bgp 1
R1(config-router)#neighbor 192.34.1.2 remote-as 2
R1(config-router)#network 34.1.1.0 mask 255.255.255.0
R1(config-router)#redistribute connected
R2#conf t
R2(config)#inter f0/0
R2(config-if)#ip add 192.34.1.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#router bgp 2
R2(config-router)#neighbor 192.34.1.1 remote-as 1
R2(config-router)#end
R1#show ip bgp
BGP table version is 1, local router ID is 34.1.2.1
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 Metric LocPrf Weight Path
* 34.1.1.0/24 0.0.0.0 0 32768 i
* 34.1.2.0/24 0.0.0.0 0 32768 ?
* 192.34.1.0 0.0.0.0 0 32768 ?
R1#
R2#show ip bgp
BGP table version is 5, local router ID is 192.34.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 Metric LocPrf Weight Path
*> 34.1.1.0/24 192.34.1.1 0 0 1 i
*> 34.1.2.0/24 192.34.1.1 0 0 1 ?
r> 192.34.1.0 192.34.1.1 0 0 1 ?
R2#
R1#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
34.0.0.0/24 is subnetted, 2 subnets
C 34.1.2.0 is directly connected, Loopback1
C 34.1.1.0 is directly connected, Loopback0
C 192.34.1.0/24 is directly connected, FastEthernet0/0
R1#
R2#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
34.0.0.0/24 is subnetted, 2 subnets
B 34.1.2.0 [20/0] via 192.34.1.1, 00:02:18
B 34.1.1.0 [20/0] via 192.34.1.1, 00:02:18
C 192.34.1.0/24 is directly connected, FastEthernet0/0
R2#