|
BGP 認証と local-as no-prepend の機能 |
|
|
条件 ・R2 R3 間でBGP認証の設定をしてください。 ・R4 が R3 をネイバーをする際 AS400 ではなく AS100 として確立するように設定 してください。また R3 の他のネイバーに AS100 が広報されないようにしてください。
|
R1 interface f0/0 ip address 12.12.12.1 255.255.255.0 interface lo0 ip address 11.11.11.11 255.255.255.0 router ospf 1 network 12.12.12.0 0.0.0.255 area 0 router bgp 300 neighbor 12.12.12.2 remote-as 300 network 11.11.11.0 mask 255.255.255.0 R2 interface f0/0 ip address 12.12.12.2 255.255.255.0 interface f0/1 ip address 23.23.23.2 255.255.255.0 router ospf 1 network 12.12.12.0 0.0.0.255 area 0 network 23.23.23.0 0.0.0.255 area 23 router bgp 300 neighbor 12.12.12.1 remote-as 300 neighbor 12.12.12.1 next-hop-self neighbor 23.23.23.3 rmeote-as 400 R3 interface f0/0 ip address 34.34.34.3 255.255.255.0 interface 0/1 ip address 23.23.23.3 255.255.255.0 router ospf 1 network 23.23.23.0 0.0.0.255 area 23 router rip version 2 network 34.34.34.0 redistribute ospf 1 metric 3 router bgp 400 neighbor 23.23.23.2 remote-as 400 neighbor 34.34.34.4 remote-as 54 redistribute rip subnets R4 interface f0/0 ip address 34.34.34.4 255.255.255.0 interface lo0 ip address 44.44.44.0 255.255.255.0 router rip version 2 network 34.34.34.0 router bgp 54 neighbor 34.34.34.3 remote-as 400 network 44.44.44.0 mask 255.255.255.0 |
|
R2 router bgp 300 neighbor 23.23.23.3 password cisco R3 router bgp 400 neighbor 23.23.23.2 password cisco
|
R4#sh ip bgp
BGP table version is 33, local router ID is 34.34.34.4
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
*> 11.11.11.0/24 34.34.34.3 0 400 300 i
*> 44.44.44.0/24 0.0.0.0 0 32768 i
|
|
R4 router bgp 54 no neighbor 34.34.34.3 remote-as 400 neighbor 34.34.34.3 remote-as 100
|
R4#sh ip bgp
*Apr 27 15:25:02.875: %SYS-5-CONFIG_I: Configured from console by console
R4#sh ip bgp
BGP table version is 35, local router ID is 34.34.34.4
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
*> 11.11.11.0/24 34.34.34.3 0 100 400 300 i
*> 44.44.44.0/24 0.0.0.0 0 32768 i
|
R3#sh ip bgp
BGP table version is 3, local router ID is 34.34.34.3
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
*> 11.11.11.0/24 23.23.23.2 0 300 i
*> 44.44.44.0/24 34.34.34.4 0 0 100 54 i
|
R1#sh ip bgp
BGP table version is 47, local router ID is 12.12.12.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
*> 11.11.11.0/24 0.0.0.0 0 32768 i
*>i44.44.44.0/24 12.12.12.2 0 100 0 400 100 54 i
|
|
R3 router bgp 400 neighbor 34.34.34.4 local-as 100 no-prepend
|
R3#sh ip bgp
BGP table version is 11, local router ID is 34.34.34.3
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
*> 11.11.11.0/24 23.23.23.2 0 300 i
*> 44.44.44.0/24 34.34.34.4 0 0 54 i
|
R4#sh ip bgp
BGP table version is 49, local router ID is 34.34.34.4
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
*> 11.11.11.0/24 34.34.34.3 0 100 400 300 i
*> 44.44.44.0/24 0.0.0.0 0 32768 i
|
| no-prependあり | no-prependなし | |
| R1(R4あて) | 400 54 i | 400 100 54 i |
| R2(R4あて) | 400 54 i | 400 100 54 i |
| R3(R4あて) | 54 i | 100 54 i |
| R4(R1あて) | 100 400 300 i | 100 400 300 i |