einfaches BGP

einfach mal einfaches BGP

als erstes werden die F0/0 Interfaces auf den Routern als Loopback Interfaces eingerichtet


conf t
int fa 0/0
no keepalive
loopback
no shut
!

so kann nachher den Interfaces die IP Adresse zugewiesen werden uns sie kommen hoch ohne das etwas angeschlossen ist.

Die Konfig der Router

R1

interface FastEthernet0/0
ip address 150.1.1.1 255.255.255.0
loopback
duplex auto
speed auto
no keepalive
!
interface Serial0/0
ip address 10.0.0.1 255.255.255.252
clock rate 2000000
!
interface Serial0/1
ip address 10.0.0.5 255.255.255.252
clock rate 2000000
!
router bgp 254
no synchronization
bgp router-id 1.1.1.1
bgp log-neighbor-changes
neighbor 10.0.0.2 remote-as 254
neighbor 10.0.0.2 password CCNP
neighbor 10.0.0.2 send-community
neighbor 10.0.0.6 remote-as 254
neighbor 10.0.0.6 password CCNP
neighbor 10.0.0.6 timers 5 15
neighbor 10.0.0.6 send-community
no auto-summary
!

R2

interface FastEthernet0/0
ip address 150.2.2.2 255.255.255.0
loopback
duplex auto
speed auto
no keepalive
!
interface Serial0/0
ip address 10.0.0.2 255.255.255.252
clock rate 2000000
!
router bgp 254
no synchronization
bgp router-id 2.2.2.2
bgp log-neighbor-changes
neighbor 10.0.0.1 remote-as 254
neighbor 10.0.0.1 password CCNP
neighbor 10.0.0.1 timers 5 15
neighbor 10.0.0.1 send-community
no auto-summary
!


R3

interface FastEthernet0/0
ip address 150.3.3.3 255.255.255.0
loopback
duplex auto
speed auto
no keepalive
!
interface Serial1/0
ip address 10.0.0.6 255.255.255.252
serial restart-delay 0
!
interface Serial1/2
ip address 10.0.0.13 255.255.255.252
serial restart-delay 0
!
router bgp 254
no synchronization
bgp router-id 3.3.3.3
bgp log-neighbor-changes
neighbor 10.0.0.5 remote-as 254
neighbor 10.0.0.5 password CCNP
neighbor 10.0.0.5 timers 5 15
neighbor 10.0.0.5 send-community
neighbor 10.0.0.14 remote-as 254
neighbor 10.0.0.14 password CCNP
neighbor 10.0.0.14 timers 5 15
neighbor 10.0.0.14 send-community
no auto-summary
!

R4

interface FastEthernet0/0
ip address 150.4.4.4 255.255.255.0
loopback
duplex auto
speed auto
no keepalive
!
interface Serial0/0
ip address 10.0.0.14 255.255.255.252
clock rate 2000000
!
router bgp 254
no synchronization
bgp router-id 4.4.4.4
bgp log-neighbor-changes
neighbor 10.0.0.13 remote-as 254
neighbor 10.0.0.13 password CCNP
neighbor 10.0.0.13 timers 5 15
neighbor 10.0.0.13 send-community
no auto-summary
!

Überprüfen der Verbindungen/Nachbarschaftsbeziehungen

R1#sh ip bgp summary
BGP router identifier 1.1.1.1, local AS number 254
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.0.2 4 254 195 195 1 0 0 00:15:56 0
10.0.0.6 4 254 149 149 1 0 0 00:12:06 0

R2#sh ip bgp summary
BGP router identifier 2.2.2.2, local AS number 254
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.0.1 4 254 198 198 1 0 0 00:16:11 0

R3#sh ip bgp summary
BGP router identifier 3.3.3.3, local AS number 254
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.0.5 4 254 155 155 1 0 0 00:12:36 0
10.0.0.14 4 254 121 121 1 0 0 00:09:48 0

R4#sh ip bgp summary
BGP router identifier 4.4.4.4, local AS number 254
BGP table version is 1, main routing table version 1

Neighbor V AS MsgRcvd MsgSent TblVer InQ OutQ Up/Down State/PfxRcd
10.0.0.13 4 254 125 125 1 0 0 00:10:07 0

Hinzufügen der Interfaces F0/0

R1
!
conf t
router bgp 254
network 150.1.1.0 mask 255.255.255.0
!

R2
!
conf t
router bgp 254
network 150.2.2.0 mask 255.255.255.0
!


R3

!
conf t
router bgp 254
network 150.3.3.0 mask 255.255.255.0
!

R4
!
conf t
router bgp 254
network 150.4.4.0 mask 255.255.255.0
!

Durch ein einfaches pingen kann man dann die erreichbarkeit testen.
Aber es sind nur die Netze des Nachbarn erreichbar. also nicht von R1 übder R3 zu R4

Überprüfen des Routingtables

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

10.0.0.0/30 is subnetted, 2 subnets
C 10.0.0.0 is directly connected, Serial0/0
C 10.0.0.4 is directly connected, Serial0/1
150.1.0.0/24 is subnetted, 1 subnets
C 150.1.1.0 is directly connected, FastEthernet0/0
150.2.0.0/24 is subnetted, 1 subnets
B 150.2.2.0 [200/0] via 10.0.0.2, 00:04:56
150.3.0.0/24 is subnetted, 1 subnets
B 150.3.3.0 [200/0] via 10.0.0.6, 00:04:21

R2#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

10.0.0.0/30 is subnetted, 1 subnets
C 10.0.0.0 is directly connected, Serial0/0
150.1.0.0/24 is subnetted, 1 subnets
B 150.1.1.0 [200/0] via 10.0.0.1, 00:07:47
150.2.0.0/24 is subnetted, 1 subnets
C 150.2.2.0 is directly connected, FastEthernet0/0

R3#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

10.0.0.0/30 is subnetted, 2 subnets
C 10.0.0.12 is directly connected, Serial1/2
C 10.0.0.4 is directly connected, Serial1/0
150.1.0.0/24 is subnetted, 1 subnets
B 150.1.1.0 [200/0] via 10.0.0.5, 00:08:08
150.3.0.0/24 is subnetted, 1 subnets
C 150.3.3.0 is directly connected, FastEthernet0/0
150.4.0.0/24 is subnetted, 1 subnets
B 150.4.4.0 [200/0] via 10.0.0.14, 00:04:27

R4#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

10.0.0.0/30 is subnetted, 1 subnets
C 10.0.0.12 is directly connected, Serial0/0
150.3.0.0/24 is subnetted, 1 subnets
B 150.3.3.0 [200/0] via 10.0.0.13, 00:03:40
150.4.0.0/24 is subnetted, 1 subnets
C 150.4.4.0 is directly connected, FastEthernet0/0