!
interface Loopback0
ip address 1.1.1.1 255.255.255.255
!
!
interface Serial0/0
ip address 12.12.12.1 255.255.255.0
clock rate 2000000
!
!
interface Serial0/1
ip address 13.13.13.1 255.255.255.0
clock rate 2000000
!
!
router bgp 1
no synchronization
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
neighbor 12.12.12.2 remote-as 23
neighbor 13.13.13.3 remote-as 23
no auto-summary
!
konfig R4
interface Loopback0
ip address 4.4.4.4 255.255.255.255
!
!
interface Serial0/0
ip address 24.24.24.4 255.255.255.0
clock rate 2000000
!
!
interface Serial0/1
ip address 34.34.34.4 255.255.255.0
clock rate 2000000
!
router bgp 4
no synchronization
bgp log-neighbor-changes
network 4.4.4.4 mask 255.255.255.255
neighbor 24.24.24.2 remote-as 23
neighbor 34.34.34.3 remote-as 23
no auto-summary
!
konfig R3
interface FastEthernet0/0
ip address 23.23.23.3 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
ip address 13.13.13.3 255.255.255.0
clock rate 2000000
!
interface Serial0/1
ip address 34.34.34.3 255.255.255.0
clock rate 2000000
!
router bgp 23
no synchronization
bgp log-neighbor-changes
neighbor 13.13.13.1 remote-as 1
neighbor 23.23.23.2 remote-as 23
neighbor 34.34.34.4 remote-as 4
no auto-summary
!
ip forward-protocol nd
!
konfig R2
interface FastEthernet0/0
ip address 23.23.23.2 255.255.255.0
duplex auto
speed auto
!
interface Serial0/0
ip address 12.12.12.2 255.255.255.0
clock rate 2000000
!
interface FastEthernet0/1
no ip address
duplex auto
speed auto
!
interface Serial0/1
ip address 24.24.24.2 255.255.255.0
clock rate 2000000
router bgp 23
no synchronization
bgp log-neighbor-changes
neighbor 12.12.12.1 remote-as 1
neighbor 23.23.23.3 remote-as 23
neighbor 24.24.24.4 remote-as 4
no auto-summary
!
cara verifikasi
R1#show ip
*Mar 1 00:58:34.951: %SYS-5-CONFIG_I: Configured from console by console
R1#show ip bgp
BGP table version is 5, local router ID is 1.1.1.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
*> 1.1.1.1/32 0.0.0.0 0 32768 i
* 4.4.4.4/32 13.13.13.3 0 23 4 i
*> 12.12.12.2 0 23 4 i
R1#
R1#sh 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
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
4.0.0.0/32 is subnetted, 1 subnets
B 4.4.4.4 [20/0] via 12.12.12.2, 00:19:43
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, Serial0/0
13.0.0.0/24 is subnetted, 1 subnets
C 13.13.13.0 is directly connected, Serial0/1
R1#
router bgp 1
no synchronization
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
neighbor 12.12.12.2 remote-as 23
neighbor 12.12.12.2 route-map WEIGHT in
neighbor 13.13.13.3 remote-as 23
no auto-summary
route-map WEIGHT permit 10
set weight 100
!
R1#show ip bgp
BGP table version is 3, local router ID is 1.1.1.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
*> 1.1.1.1/32 0.0.0.0 0 32768 i
* 4.4.4.4/32 13.13.13.3 0 23 4 i
*> 12.12.12.2 100 23 4 i
R1#
Gateway of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
C 1.1.1.1 is directly connected, Loopback0
4.0.0.0/32 is subnetted, 1 subnets
B 4.4.4.4 [20/0] via 12.12.12.2, 00:02:17
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, Serial0/0
13.0.0.0/24 is subnetted, 1 subnets
C 13.13.13.0 is directly connected, Serial0/1
R1#
[OK]
R3(config)#do sh ip route 1.1.1.1
Routing entry for 1.1.1.1/32
Known via "bgp 23", distance 20, metric 0
Tag 1, type external
Last update from 13.13.13.1 00:01:53 ago
Routing Descriptor Blocks:
* 13.13.13.1, from 13.13.13.1, 00:01:53 ago
Route metric is 0, traffic share count is 1
AS Hops 1
Route tag 1
R3(config)#
router bgp 1
no synchronization
bgp log-neighbor-changes
network 1.1.1.1 mask 255.255.255.255
neighbor 12.12.12.2 remote-as 23
neighbor 12.12.12.2 route-map R2MED out
neighbor 13.13.13.3 remote-as 23
neighbor 13.13.13.3 route-map R3MED out
no auto-summary
!
ip forward-protocol nd
!
!
ip http server
no ip http secure-server
!
ip access-list standard LAN
permit 1.1.1.1
!
!
!
!
route-map WEIGHT permit 10
set weight 100
!
route-map R2MED permit 10
match ip address LAN
set metric 110
!
route-map R2MED permit 20
!
route-map R3MED permit 10
match ip address LAN
set metric 100
!
route-map R3MED permit 20
!
!
R3#sh ip route 1.1.1.1
Routing entry for 1.1.1.1/32
Known via "bgp 23", distance 20, metric 100
Tag 1, type external
Last update from 13.13.13.1 00:13:49 ago
Routing Descriptor Blocks:
* 13.13.13.1, from 13.13.13.1, 00:13:49 ago
Route metric is 100, traffic share count is 1
AS Hops 1
Route tag 1
R3#
R2#sh ip bgp 1.1.1.1
BGP routing table entry for 1.1.1.1/32, version 10
Paths: (2 available, best #2, table Default-IP-Routing-Table)
Advertised to update-groups:
1 2
1
13.13.13.1 (inaccessible) from 23.23.23.3 (34.34.34.3)
Origin IGP, metric 100, localpref 100, valid, internal
1
12.12.12.1 from 12.12.12.1 (1.1.1.1)
Origin IGP, metric 110, localpref 100, valid, external, best
R2#
R1#
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#router bgp 1
R1(config-router)#no nei
R1(config-router)#no neighbor 12.12.12.2 reout
R1(config-router)#no neighbor 12.12.12.2 rout
R1(config-router)#no neighbor 12.12.12.2 route-map R2MED out
R1(config-router)#no nei
R1(config-router)#no neighbor 13.13.13.3 route
R1(config-router)#no neighbor 13.13.13.3 route-map R3MED out
R1(config-router)#nei 12.12.12.2 route-map AS-PREPEND out
R1(config-router)#route
R1(config-router)#route-map AS-PREPEND
R1(config-route-map)#set as
R1(config-route-map)#set as-path prepend 1 1 1
R1(config-route-map)#do clear ip bgp *
R1(config-route-map)#
way of last resort is not set
1.0.0.0/32 is subnetted, 1 subnets
B 1.1.1.1 [20/0] via 12.12.12.1, 00:00:03
4.0.0.0/32 is subnetted, 1 subnets
Tidak ada komentar:
Posting Komentar