Topologie
https://www.cisco.com/c/en/us/support/docs/ip/border-gateway-protocol-bgp/13762-40.html
conf t
hostname ISP1
interface Lo0
description ISP1 Internet Network
ip address 10.1.1.1 255.255.255.0
exit
interface G0/2
description ISP1 -> ITA
ip address 10.0.0.1 255.255.255.252
no shutdown
end
wr
conf t
hostname ITA
interface Lo0
description Core router network link 1
ip address 192.168.0.1 255.255.255.0
exit
interface Lo1
description Core router network link 2
ip address 192.168.1.1 255.255.255.0
exit
interface G0/1
description ITA -> ISP1
ip address 10.0.0.2 255.255.255.252
no shutdown
exit
interface G0/3
description ITA -> ISP2
ip address 172.16.0.2 255.255.255.252
no shutdown
end
wr
conf t
hostname ISP2
interface Lo0
description ISP2 Internet Network
ip address 172.16.1.1 255.255.255.0
exit
interface G0/2
description ISP2 -> ITA
ip address 172.16.0.1 255.255.255.252
no shutdown
end
wr
router bgp 200
neighbor 10.0.0.2 remote-as 100
network 10.1.1.0 mask 255.255.255.0
router bgp 300
neighbor 172.16.0.2 remote-as 100
network 172.16.1.0 mask 255.255.255.0
router bgp 100
neighbor 10.0.0.1 remote-as 200
neighbor 172.16.0.1 remote-as 300
network 192.168.0.0
network 192.168.1.0
tclsh
foreach address {
10.0.0.1
10.0.0.2
10.1.1.1
172.16.0.1
172.16.0.2
172.16.1.1
192.168.0.1
192.168.1.1
} {
ping $address }
show ip bgp
access-list 1 permit 192.168.0.0 0.0.1.255
router bgp 100
neighbor 10.0.0.1 distribute-list 1 out
neighbor 172.16.0.1 distribute-list 1 out
ip route 0.0.0.0 0.0.0.0 10.0.0.1 210
ip route 0.0.0.0 0.0.0.0 172.16.0.1 220
sur ISP1
int lo 100
ip address 192.168.100.1 255.255.255.0
Désactivation des routes statiques
no ip route 0.0.0.0 0.0.0.0 10.0.0.1 210
no ip route 0.0.0.0 0.0.0.0 172.16.0.1 220
Sur ISP1
router bgp 200
neighbor 10.0.0.2 default-originate
Sur ISP2
router bgp 300
conf t
hostname R2-ISP
interface Loopback0
ip address 10.2.2.1 255.255.255.0
interface G0/1
ip address 192.168.1.6 255.255.255.252
no shutdown
exit
interface G0/3
ip address 172.24.1.17 255.255.255.252
no shutdown
end
wr
conf t
hostname R1-SanJose
interface Loopback0
ip address 10.1.1.1 255.255.255.0
exit
interface G0/2
ip address 192.168.1.5 255.255.255.252
no shutdown
end
wr
conf t
hostname CustRtr
interface Loopback0
ip address 10.3.3.1 255.255.255.0
exit
interface G0/2
ip address 172.24.1.18 255.255.255.252
no shutdown
end
wr
A partir de ISP :
ping 172.24.1.18
ping 192.168.1.5