R1,R2,R4 are in AS 100 and R4 is in AS 200. Consider R3 as office router having two connections to one ISP via R1 and R4. Below is the config for MED
R1
===========
!
interface Loopback1
ip address 1.1.1.1 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 192.168.12.1 255.255.255.0
serial restart-delay 0
no fair-queue
!
interface Serial1/1
ip address 192.168.14.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/2
ip address 192.168.13.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router bgp 100
no synchronization
bgp log-neighbor-changes
network 1.1.1.0 mask 255.255.255.0
neighbor 3.3.3.3 remote-as 200
neighbor 3.3.3.3 ebgp-multihop 2
neighbor 192.168.12.2 remote-as 100
neighbor 192.168.14.2 remote-as 100
no auto-summary
!
ip http server
!
ip route 3.3.3.3 255.255.255.255 192.168.13.2
!
R2
============
!
interface Loopback1
ip address 2.2.2.2 255.255.255.0
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 192.168.12.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 192.168.24.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router bgp 100
no synchronization
bgp log-neighbor-changes
network 2.2.2.0 mask 255.255.255.0
neighbor 192.168.12.1 remote-as 100
neighbor 192.168.24.2 remote-as 100
no auto-summary
!
R4
=============
!
interface FastEthernet0/0
no ip address
shutdown
duplex auto
speed auto
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
interface Serial1/0
ip address 192.168.14.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 192.168.24.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/2
ip address 192.168.34.1 255.255.255.0
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router bgp 100
no synchronization
bgp log-neighbor-changes
neighbor 3.3.3.3 remote-as 200
neighbor 3.3.3.3 ebgp-multihop 2
neighbor 192.168.14.1 remote-as 100
neighbor 192.168.24.1 remote-as 100
no auto-summary
!
ip http server
!
ip route 3.3.3.3 255.255.255.255 192.168.34.2
!
R3
==========
!
!
interface Loopback1
ip address 3.3.3.3 255.255.255.0
!
interface FastEthernet0/0
ip address 10.10.10.1 255.255.255.0
duplex auto
speed auto
no keepalive
!
interface FastEthernet0/1
ip address 20.20.20.1 255.255.255.0
duplex auto
speed auto
no keepalive
!
interface Serial1/0
ip address 192.168.13.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/1
ip address 192.168.34.2 255.255.255.0
serial restart-delay 0
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
router bgp 200
no synchronization
bgp log-neighbor-changes
network 10.10.10.0 mask 255.255.255.0
network 20.20.20.0 mask 255.255.255.0
neighbor 192.168.13.1 remote-as 100
neighbor 192.168.13.1 ebgp-multihop 2
neighbor 192.168.13.1 update-source Loopback1
neighbor 192.168.13.1 route-map forr2 out
neighbor 192.168.34.1 remote-as 100
neighbor 192.168.34.1 ebgp-multihop 2
neighbor 192.168.34.1 update-source Loopback1
no auto-summary
!
ip http server
!
!
!
access-list 1 permit 10.10.10.0 0.0.0.255
access-list 2 permit 20.20.20.0 0.0.0.255
!
route-map forf2 permit 20
!
route-map forr1 permit 1
match ip address 1
set metric 200
!
route-map forr2 permit 20
match ip address 2
set metric 400
!
No comments:
Post a Comment