Example 1-2 IOS Basic BGP Configuration R1. (IGP), and the BGP weight is set to 32,768. Static Route or Routing Protocol: The next-hop BGP attribute is set to the next-hop IP address in the RIB, the origin attribute is set to i (IGP), the BGP weight is set to 32,768.
Hi all. A buddy and I have established a VPN tunnel from Cisco router to Cisco router. We then disabled the tunnel by taking the crypto map off of the interface. We want to set up a BGP network. We can get the neighbor state to show as 'active' under 'show ip bgp summary' but we can't get it to come up. I think maybe we are not peering? Anyway, below is the configuration from my router along with some show commands.4000#sh conf
Using 3157 out of 131066 bytes
!
version 12.1
service single-slot-reload-enable
service tcp-keepalives-in
service timestamps debug uptime
service timestamps log uptime
service password-encryption
!
hostname 4000
!
enable secret 5 $1$h//4$Y.XMFdEoQoXripYl3z6gy0
!
username 2520 password 7 0327782536
!
!
!
!
ip subnet-zero
no ip source-route
ip cef
ip name-server 68.87.xx.xxx
ip name-server 68.87.xx.xxx
ip dhcp excluded-address 192.168.1.0 192.168.1.20
!
ip dhcp pool JOSHSPOOL
network 192.168.1.0 255.255.255.0
dns-server xx.xx.xx.xxx xx.xx.xx.xxx
default-router 192.168.1.1
lease 7
!
!
!
crypto isakmp policy 100
encr 3des
hash md5
authentication pre-share
group 5
lifetime 4000
crypto isakmp key CCNP address xx.xx.xxx.xxx
!
crypto ipsec security-association lifetime seconds 120
!
crypto ipsec transform-set JOSH_TRANSFORM_SET ah-md5-hmac
!
crypto map CCNP 100 ipsec-isakmp
set peer xx.xx.xxx.xxx
set transform-set JOSH_TRANSFORM_SET
match address 123
!
!
!
!
interface Multilink1
ip address 10.0.0.9 255.255.255.252
no cdp enable
ppp multilink
multilink-group 1
!
interface Ethernet0
ip address 192.168.1.1 255.255.255.0
ip nat inside
media-type 10BaseT
no cdp enable
!
interface Ethernet1
ip address xx.xx.xxx.xxx 255.255.255.0
ip verify unicast reverse-path
no ip unreachables
ip nat outside
media-type 10BaseT
ntp disable
no cdp enable
!
interface Serial0
bandwidth 128
ip address 10.0.0.1 255.255.255.252
encapsulation ppp
no fair-queue
clockrate 64000
no cdp enable
ppp authentication chap
ppp multilink
multilink-group 1
!
interface Serial1
bandwidth 128
ip address 10.0.0.5 255.255.255.252
encapsulation ppp
no fair-queue
clockrate 64000
no cdp enable
ppp authentication chap
ppp multilink
multilink-group 1
!
interface Serial2
no ip address
shutdown
no cdp enable
!
interface Serial3
no ip address
shutdown
no cdp enable
!
interface Serial4
no ip address
shutdown
no cdp enable
!
interface Serial5
no ip address
shutdown
no cdp enable
!
interface Serial6
no ip address
shutdown
no cdp enable
!
router bgp 65001
no synchronization
bgp log-neighbor-changes
network 10.0.0.1 mask 255.255.255.252
network 192.168.1.0
redistribute connected
neighbor xx.xx.xxx.xxx remote-as 65002
neighbor xx.xx.xxx.xxx ebgp-multihop 255
no auto-summary
!
ip nat inside source list 1 interface Ethernet1 overload
ip nat inside source static tcp 192.168.1.23 3389 xx.xx.xxx.xxx 3389 extendable
ip classless
ip route 0.0.0.0 0.0.0.0 xx.xx.xxx.xxx
no ip http server
!
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 1 remark This Is My NAT ACL
access-list 123 permit ip host xx.xx.xxx.xxx host xx.xx.xxx.xxx
access-list 123 remark This Is My IPSec ACL
no cdp run
banner login ^C
If you try and hack me...I'll kill you
No, seriously...if you hack me give me a shout @ [email protected]
Let me know how you did it. Thanks! :)
^C
!
line con 0
exec-timeout 0 0
password 7 075F741C1B594C171811001F
logging synchronous
login
line aux 0
line vty 0 4
access-class 101 in
exec-timeout 20 0
password 7 075F741C1B594C171811001F
login
transport input telnet
!
scheduler interval 500
end
4000#
4000#sh ip bgp
BGP table version is 7, local router ID is 192.168.1.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal
Origin codes: i - IGP, e - EGP, ? - incomplete
Network Next Hop Metric LocPrf Weight Path
*> 10.0.0.0/30 0.0.0.0 0 32768 ?
*> 10.0.0.4/30 0.0.0.0 0 32768 ?
*> 10.0.0.8/30 0.0.0.0 0 32768 ?
*> 10.0.0.10/32 0.0.0.0 0 32768 ?
*> xx.xx.xxx.0/24 0.0.0.0 0 32768 ?
*> 192.168.1.0 0.0.0.0 0 32768 i
4000#sh ip bgp summary
BGP router identifier 192.168.1.1, local AS number 65001
BGP table version is 7, main routing table version 7
6 network entries and 6 paths using 798 bytes of memory
2 BGP path attribute entries using 120 bytes of memory
0 BGP route-map cache entries using 0 bytes of memory
0 BGP filter-list cache entries using 0 bytes of memory
BGP activity 50/302 prefixes, 50/44 paths, scan interval 60 secs
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
xx.xx.xxx.xxx 4 65002 0 0 0 0 0 never Active
4000#sh ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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 xx.xx.xxx.xxx to network 0.0.0.0
68.0.0.0/24 is subnetted, 1 subnets
C xx.xx.xxx.0 is directly connected, Ethernet1
10.0.0.0/8 is variably subnetted, 4 subnets, 2 masks
C 10.0.0.10/32 is directly connected, Multilink1
C 10.0.0.8/30 is directly connected, Multilink1
C 10.0.0.0/30 is directly connected, Serial0
C 10.0.0.4/30 is directly connected, Serial1
C 192.168.1.0/24 is directly connected, Ethernet0
S* 0.0.0.0/0 [1/0] via xx.xx.xxx.x
Posted by28 days ago
Understand the Importance of BGP Weight Path Attribute in Network.
Over 16 years, SPOTO helped tens of thousands of candidates achieve their Cisco CCNA, CCNP, CCIE, CISSP certification. Subscribe us and get more news. The following is a technical article that will help you understand the BGP weight attribute in a network.
Cisco routers can use BGP weights to influence routers' choice of outbound routes. To this end, when the router receives the BGP update, the router can use the route map to selectively set a weight for each route, or set a weight for all learned contention routes, and select a route with a larger weight.
The weight is a proprietary attribute of Cisco, and the weight tells us how to exit the autonomous system. The most important path for the most weighted path is 0 to 65,535. By default, the learning path is 0 and the local injection path is 32,768. The weight is a partial attribute that is set when the inbound route is updated.
let us see the configuration:-
Topology:-
GOAL:
·configure the topology as per the diagram.
·configure the basic iBGP and EBGP peering using directly connected interfaces.
·advertise all the interfaces as per the topology
·configure the next-hop address should be the next router address
·configure router 4 to prefer exit path via router1 to reach all the networks.
R1#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 10.1.1.1 YES NVRAM up up
Serial3/0 1.1.1.1 YES NVRAM up up
Serial3/3 4.1.1.2 YES NVRAM up up
Loopback0 11.0.0.1 YES NVRAM up up
Loopback1 11.0.1.1 YES NVRAM up up
Loopback2 11.0.2.1 YES NVRAM up up
Loopback3 11.0.3.1 YES NVRAM up up
R2#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 20.1.1.1 YES NVRAM up up
Serial3/0 1.1.1.2 YES NVRAM up up
Serial3/1 2.1.1.1 YES NVRAM up up
Loopback0 12.0.0.1 YES NVRAM up up
Loopback1 12.0.1.1 YES NVRAM up up
Loopback2 12.0.2.1 YES NVRAM up up
Loopback3 12.0.3.1 YES NVRAM up up
R3#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 30.1.1.1 YES NVRAM up up
Serial3/1 2.1.1.2 YES NVRAM up up
Serial3/2 3.1.1.1 YES NVRAM up up
Loopback0 13.0.0.1 YES NVRAM up up
Loopback1 13.0.1.1 YES NVRAM up up
Loopback2 13.0.2.1 YES NVRAM up up
Loopback3 13.0.3.1 YES NVRAM up up
R4#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 40.1.1.1 YES NVRAM up up
Serial3/2 3.1.1.2 YES NVRAM up up
Serial3/3 4.1.1.1 YES NVRAM up up
Loopback0 14.0.0.1 YES NVRAM up up
Loopback1 14.0.1.1 YES NVRAM up up
Loopback2 14.0.2.1 YES NVRAM up up
Loopback3 14.0.3.1 YES NVRAM up up
R1(config)#router bgp 65111
R1(config-router)#neighbor 1.1.1.2 remote-as 65111
R1(config-router)#neighbor 4.1.1.1 remote-as 65444
R1(config-router)#neighbor 1.1.1.2 next-hop-self
R1(config-router)#network 10.0.0.0
R1(config-router)#network 1.0.0.0
R1(config-router)#network 4.0.0.0
R1(config-router)#network 11.0.0.0 mask 255.255.255.0
R1(config-router)#no auto-summary
R1(config-router)#no synchronization
R2(config)#router bgp 65111
R2(config-router)#neighbor 1.1.1.1 remote-as 65111
R2(config-router)#neighbor 2.1.1.2 remote-as 65333
R2(config-router)#neighbor 1.1.1.1 next-hop-self
R2(config-router)#network 20.0.0.0
R2(config-router)#network 2.0.0.0
R2(config-router)#network 1.0.0.0
R2(config-router)#network 12.0.0.0 mask 255.255.255.0
R2(config-router)#no auto-summary
R2(config-router)#no synchronization
R3(config)#router bgp 65333
R3(config-router)#neighbor 2.1.1.1 remote-as 65111
R3(config-router)#neighbor 3.1.1.2 remote-as 65444
R3(config-router)#network 30.0.0.0
R3(config-router)#network 3.0.0.0
R3(config-router)#network 2.0.0.0
R3(config-router)#network 13.0.0.0 mask 255.255.255.0
R3(config-router)#no synchronization
R3(config-router)#no auto-summary
R4(config)#router bgp 65444
R4(config-router)#neighbor 3.1.1.1 remote-as 65333
R4(config-router)#neighbor 4.1.1.2 remote-as 65111
R4(config-router)#network 40.0.0.0
R4(config-router)#network 4.0.0.0
R4(config-router)#network 14.0.0.0 mask 255.255.255.0
R4(config-router)#network 3.0.0.0
R4(config-router)#no synchronization
R4(config-router)#no auto-summary
R1#show ip bgp summary
BGP router identifier 11.0.3.1, local AS number 65111
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.2 4 65111 14 13 14 0 0 00:06:21 7
4.1.1.1 4 65444 14 9 14 0 0 00:02:07 7
R2#show ip bgp summary
BGP router identifier 12.0.3.1, local AS number 65111
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
1.1.1.1 4 65111 13 14 14 0 0 00:06:56 7
2.1.1.2 4 65333 11 12 14 0 0 00:04:29 6
R3#show ip bgp summary
BGP router identifier 13.0.3.1, local AS number 65333
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
2.1.1.1 4 65111 13 12 14 0 0 00:05:27 9
3.1.1.2 4 65444 11 14 14 0 0 00:03:59 9
R4#show ip bgp summary
BGP router identifier 14.0.3.1, local AS number 65444
Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
3.1.1.1 4 65333 14 12 21 0 0 00:04:25 10
4.1.1.2 4 65111 11 16 21 0 0 00:04:05 9
R4#sh ip bgp
BGP table version is 21, local router ID is 14.0.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 1.0.0.0 4.1.1.2 0 0 65111 i
* 3.1.1.1 0 65333 65111 i
* 2.0.0.0 4.1.1.2 0 65111 i
*> 3.1.1.1 0 0 65333 i
*> 3.0.0.0 0.0.0.0 0 32768 i
* 3.1.1.1 0 0 65333 i
*> 4.0.0.0 0.0.0.0 0 32768 i
* 4.1.1.2 0 0 65111 i
* 3.1.1.1 0 65333 65111 i
*> 10.0.0.0 4.1.1.2 0 0 65111 i
* 3.1.1.1 0 65333 65111 i
*> 11.0.0.0/24 4.1.1.2 0 0 65111 i
* 3.1.1.1 0 65333 65111 i
*> 12.0.0.0/24 4.1.1.2 0 65111 i
Network Next Hop Metric LocPrf Weight Path
* 3.1.1.1 0 65333 65111 i
* 13.0.0.0/24 4.1.1.2 0 65111 65333 i
*> 3.1.1.1 0 0 65333 i
*> 14.0.0.0/24 0.0.0.0 0 32768 i
*> 20.0.0.0 4.1.1.2 0 65111 i
* 3.1.1.1 0 65333 65111 i
* 30.0.0.0 4.1.1.2 0 65111 65333 i
*> 3.1.1.1 0 0 65333 i
*> 40.0.0.0 0.0.0.0 0 32768 i
R4#traceroute 30.1.1.1
Type escape sequence to abort.
Tracing the route to 30.1.1.1
VRF info: (vrf in name/id, vrf out name/id)
1 3.1.1.1 168 msec 60 msec 24 msec
To reach the 30.1.1.1 router 4 by default using 3.1.1.1 interface because it has fewer numbers of AS.
but we want to router 4 go via 4.1.1.1 interface to reach all the networks.
R4(config)#router bgp 65444
R4(config-router)#neighbor 4.1.1.2 weight 20000
R4(config-router)#end
R4#clear ip bgp * soft
R4#traceroute 30.1.1.1
Type escape sequence to abort.
Tracing the route to 30.1.1.1
VRF info: (vrf in name/id, vrf out name/id)
1 4.1.1.2 8 msec 56 msec 4 msec
2 1.1.1.2 [AS 65111] 52 msec 40 msec 36 msec
3 2.1.1.2 [AS 65111] 52 msec 40 msec 64 msec
R4#show ip bgp 30.1.1.1
BGP routing table entry for 30.0.0.0/8, version 22
Paths: (2 available, best #1, table default)
Advertised to update-groups:
1
Refresh Epoch 2
65111 65333
4.1.1.2 from 4.1.1.2 (11.0.3.1)
Origin IGP, localpref 100, weight 20000, valid, external, best
rx pathid: 0, tx pathid: 0x0
Refresh Epoch 3
65333
3.1.1.1 from 3.1.1.1 (13.0.3.1)
Origin IGP, metric 0, localpref 100, valid, external
rx pathid: 0, tx pathid: 0
R4#show ip bgp
R4#show ip bgp
BGP table version is 29, local router ID is 14.0.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found
Network Next Hop Metric LocPrf Weight Path
*> 1.0.0.0 4.1.1.2 0 20000 65111 i
* 3.1.1.1 0 65333 65111 i
*> 2.0.0.0 4.1.1.2 20000 65111 i
* 3.1.1.1 0 0 65333 i
*> 3.0.0.0 0.0.0.0 0 32768 i
* 3.1.1.1 0 0 65333 i
*> 4.0.0.0 0.0.0.0 0 32768 i
* 4.1.1.2 0 20000 65111 i
* 3.1.1.1 0 65333 65111 i
*> 10.0.0.0 4.1.1.2 0 20000 65111 i
* 3.1.1.1 0 65333 65111 i
*> 11.0.0.0/24 4.1.1.2 0 20000 65111 i
* 3.1.1.1 0 65333 65111 i
*> 12.0.0.0/24 4.1.1.2 20000 65111 i
Network Next Hop Metric LocPrf Weight Path
* 3.1.1.1 0 65333 65111 i
*> 13.0.0.0/24 4.1.1.2 20000 65111 65333 i
* 3.1.1.1 0 0 65333 i
*> 14.0.0.0/24 0.0.0.0 0 32768 i
*> 20.0.0.0 4.1.1.2 20000 65111 i
* 3.1.1.1 0 65333 65111 i
*> 30.0.0.0 4.1.1.2 20000 65111 65333 i
* 3.1.1.1 0 0 65333 i
*> 40.0.0.0 0.0.0.0 0 32768 i
100% Upvoted