Konfigurace a optimalizace protokolu BGP - ukázková konfigurace

Z MilataWiki

Přejít na: navigace, hledání

Uvedená konfigurace obsahuje pouze relevantní příkazy explicitně zadávané při konfiguraci Cisco zařízení.

Konfigurace může posloužit jako návod pro tvorbu vlastní obdoby. Názvy a číslování rozhraní, IP adresy a pojmenování route-map se budou pravděpodobně při konfiguraci vlastní topologie lišit.

Obsah

Směrovač R3

hostname R3
enable password cisco
no ip domain lookup
interface FastEthernet0/0
 ip address 10.0.0.1 255.255.255.252
 no shutdown
interface FastEthernet0/1
 ip address 40.0.0.1 255.255.255.0
 no shutdown
router bgp 200
 network 40.0.0.0 mask 255.255.255.0
 neighbor 10.0.0.2 remote-as 200
ip route 10.0.0.4 255.255.255.252 10.0.0.2
ip route 10.0.0.8 255.255.255.252 10.0.0.2
ip route 10.0.0.12 255.255.255.252 10.0.0.2
line con 0
 exec-timeout 0 0
 logging synchronous
line vty 0 5
 exec-timeout 0 0
 password cisco
 logging synchronous
 login

Směrovač R0

hostname R0
enable password cisco
no ip domain lookup
interface FastEthernet0/0
 ip address 10.0.0.2 255.255.255.252
 no shutdown
interface FastEthernet1/0
 ip address 10.0.0.5 255.255.255.252
 no shutdown
interface FastEthernet1/1
 ip address 10.0.0.14 255.255.255.252
 no shutdown
router bgp 200
 neighbor 10.0.0.1 remote-as 200
 neighbor 10.0.0.6 remote-as 100
 neighbor 10.0.0.13 remote-as 100
ip route 10.0.0.8 255.255.255.252 10.0.0.6
ip route 10.0.0.8 255.255.255.252 10.0.0.13
line con 0
 exec-timeout 0 0
 logging synchronous
line vty 0 5
 exec-timeout 0 0
 password cisco
 logging synchronous
 login

Směrovač R1

hostname R1
enable password cisco
no ip domain lookup
interface FastEthernet0/0
 ip address 10.0.0.9 255.255.255.252
 no shutdown
interface FastEthernet1/0
 ip address 10.0.0.6 255.255.255.252
 no shutdown
interface FastEthernet1/1
 ip address 20.0.0.1 255.255.255.0
 no shutdown
router bgp 100
 network 20.0.0.0 mask 255.255.255.0
 neighbor 10.0.0.5 remote-as 200
 neighbor 10.0.0.5 route-map MY-LOCAL in
 neighbor 10.0.0.5 route-map MY-METRIC out
 neighbor 10.0.0.10 remote-as 100
ip route 10.0.0.0 255.255.255.252 10.0.0.5
ip route 10.0.0.12 255.255.255.252 10.0.0.10
ip route 10.0.0.12 255.255.255.252 10.0.0.5
access-list 1 permit 40.0.0.0 0.0.0.255
access-list 2 permit 20.0.0.0 0.0.0.255
access-list 2 permit 30.0.0.0 0.0.0.255
route-map MY-METRIC permit 10
 match ip address 2
 set metric 10
route-map MY-METRIC permit 20
route-map MY-LOCAL permit 10
 match ip address 1
 set local-preference 10
route-map MY-LOCAL permit 20
line con 0
 exec-timeout 0 0
 logging synchronous
line vty 0 5
 exec-timeout 0 0
 password cisco
 logging synchronous
 login

Směrovač R2

hostname R2
enable password cisco
no ip domain lookup
interface FastEthernet0/0
 ip address 10.0.0.10 255.255.255.252
 no shutdown
interface FastEthernet1/0
 ip address 30.0.0.1 255.255.255.0
 no shutdown
interface FastEthernet1/1
 ip address 10.0.0.13 255.255.255.252
 no shutdown
router bgp 100
 network 30.0.0.0 mask 255.255.255.0
 neighbor 10.0.0.9 remote-as 100
 neighbor 10.0.0.14 remote-as 200
 neighbor 10.0.0.14 route-map MY-LOCAL in
 neighbor 10.0.0.14 route-map MY-METRIC out
ip route 10.0.0.0 255.255.255.252 10.0.0.14
ip route 10.0.0.4 255.255.255.252 10.0.0.14
ip route 10.0.0.4 255.255.255.252 10.0.0.9
access-list 1 permit 40.0.0.0 0.0.0.255
access-list 2 permit 20.0.0.0 0.0.0.255
access-list 2 permit 30.0.0.0 0.0.0.255
route-map MY-METRIC permit 10
 match ip address 2
 set metric 100
route-map MY-METRIC permit 20
route-map MY-LOCAL permit 10
 match ip address 1
 set local-preference 100
route-map MY-LOCAL permit 20
line con 0
 exec-timeout 0 0
 logging synchronous
line vty 0 5
 exec-timeout 0 0
 password cisco
 logging synchronous
 login
Osobní nástroje
výuka