Поиск по этому блогу

04.04.2011

Unequal cost load sharing

В случае использования нескольких каналов связи с одинаковой пропускной способностью, например, пары Е1, можно применить различные технологии, чтобы максимально эффективно использовать полученную полосу пропускания:
- MFR;
- MLPPP;
- Load Balancing с CEF, как per-destination sharing, так и per-packet sharing.

MFR и MLPPP можно использовать только на WAN-интерфейсах (v.35, g.703). Сейчас более распространены случаи, когда организуются резервные каналы связи меньшей пропускной способностью, чем у основного. Иногда ставится задача перенести часть нагрузки на резервный канал.
Возможные варианты:
- Балансировка средствами протокола EIGRP;
- Балансировка средствами MPLS TE.

В конфигурации, собранной на эмуляторе GNS3, используется два маршрутизатора, объединенных между собой парой интерфейсов. Признаюсь, что заметка в основном предназначена для хранения конфигураций.


Маршрутизатор 1:
Router#sh run
Building configuration...

Current configuration : 3831 bytes
!
upgrade fpd auto
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
!
no aaa new-model
ip source-route
ip cef
!
!
!
!
no ip domain lookup
no ipv6 cef
!
multilink bundle-name authenticated
mpls traffic-eng tunnels
mpls traffic-eng link-management timers periodic-flooding 30
!
!
voice dsp waitstate 24898
!
!
!
!
!
!
!
!
!
!
!
!
!
archive
log config
hidekeys
!
!
!
!
!
!
class-map match-all ping
match access-group name ping
!
!
policy-map ping
class ping
bandwidth 50
policy-map 150k
class class-default
shape average 150000
service-policy ping
!
!
!
!
!
interface Loopback0
ip address 10.0.0.1 255.255.255.255
!
interface Loopback1
ip address 192.168.1.1 255.255.255.0
!
interface Tunnel0
bandwidth 1000
ip unnumbered Loopback0
load-interval 30
tunnel destination 10.0.0.2
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng autoroute announce
tunnel mpls traffic-eng priority 7 7
tunnel mpls traffic-eng bandwidth 100
tunnel mpls traffic-eng path-option 1 explicit name SE1/0
tunnel mpls traffic-eng path-option 2 dynamic
tunnel mpls traffic-eng load-share 90
service-policy output 150k
no routing dynamic
!
interface Tunnel1
ip unnumbered Loopback0
load-interval 30
tunnel destination 10.0.0.2
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng autoroute announce
tunnel mpls traffic-eng priority 7 7
tunnel mpls traffic-eng bandwidth 50
tunnel mpls traffic-eng path-option 1 explicit name SE1/1
tunnel mpls traffic-eng path-option 2 dynamic
tunnel mpls traffic-eng load-share 30
no routing dynamic
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface FastEthernet0/0.100
encapsulation dot1Q 100
ip address 10.2.2.0 255.255.255.254
!
interface Serial1/0
bandwidth 100
ip address 10.1.1.0 255.255.255.254
ip router isis
load-interval 30
mpls traffic-eng tunnels
mpls traffic-eng administrative-weight 100
serial restart-delay 0
max-reserved-bandwidth 100
ip rsvp bandwidth 100
!
interface Serial1/1
bandwidth 60
ip address 10.1.1.2 255.255.255.254
ip router isis
load-interval 30
mpls traffic-eng tunnels
mpls traffic-eng administrative-weight 60
serial restart-delay 0
isis metric 20
max-reserved-bandwidth 100
ip rsvp bandwidth 60
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/4
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/5
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/6
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/7
no ip address
shutdown
serial restart-delay 0
!
router isis
net 49.0000.0024.0000.0000.0001.00
is-type level-2-only
advertise passive-only
metric-style wide
mpls traffic-eng router-id Loopback0
mpls traffic-eng level-2
passive-interface Loopback0
!
router bgp 65024
template peer-session AS
remote-as 65024
update-source Loopback0
exit-peer-session
!
no synchronization
bgp log-neighbor-changes
network 192.168.1.0
neighbor 10.0.0.2 inherit peer-session AS
no auto-summary
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
!
!
ip explicit-path name SE1/0 enable
next-address 10.1.1.1
!
ip explicit-path name SE1/1 enable
next-address 10.1.1.3
!
ip access-list extended ping
permit icmp host 192.168.1.2 host 192.168.2.2
!
logging alarm informational
!
!
!
!
route-map aff permit 10
!
!
!
mpls ldp router-id Loopback0
!
control-plane
!
!
!
mgcp fax t38 ecm
mgcp behavior g729-variants static-pt
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
login
!
end

Router#

Маршрутизатор 2:
Building configuration...

Current configuration : 3458 bytes
!
upgrade fpd auto
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
logging message-counter syslog
!
no aaa new-model
ip source-route
ip cef
!
!
!
!
no ip domain lookup
no ipv6 cef
!
multilink bundle-name authenticated
mpls traffic-eng tunnels
mpls traffic-eng link-management timers periodic-flooding 30
!
!
template peer-session
!
!
voice dsp waitstate 24898
!
!
!
!
!
!
!
!
!
!
!
!
!
archive
log config
hidekeys
!
!
!
!
!
!
!
!
!
interface Loopback0
ip address 10.0.0.2 255.255.255.255
!
interface Loopback1
ip address 192.168.2.1 255.255.255.0
!
interface Tunnel0
ip unnumbered Loopback0
load-interval 30
tunnel destination 10.0.0.1
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng autoroute announce
tunnel mpls traffic-eng priority 7 7
tunnel mpls traffic-eng bandwidth 100
tunnel mpls traffic-eng path-option 1 explicit name SE1/0
tunnel mpls traffic-eng path-option 2 dynamic
tunnel mpls traffic-eng load-share 90
no routing dynamic
!
interface Tunnel1
ip unnumbered Loopback0
load-interval 30
tunnel destination 10.0.0.1
tunnel mode mpls traffic-eng
tunnel mpls traffic-eng autoroute announce
tunnel mpls traffic-eng priority 7 7
tunnel mpls traffic-eng bandwidth 50
tunnel mpls traffic-eng path-option 1 explicit name SE1/1
tunnel mpls traffic-eng path-option 2 dynamic
tunnel mpls traffic-eng load-share 30
no routing dynamic
!
interface Tunnel9
no ip address
!
interface FastEthernet0/0
no ip address
shutdown
duplex half
!
interface Serial1/0
bandwidth 128
ip address 10.1.1.1 255.255.255.254
ip router isis
load-interval 30
mpls traffic-eng tunnels
mpls traffic-eng administrative-weight 100
serial restart-delay 0
max-reserved-bandwidth 100
ip rsvp bandwidth 100
!
interface Serial1/1
bandwidth 60
ip address 10.1.1.3 255.255.255.254
ip router isis
load-interval 30
mpls traffic-eng tunnels
mpls traffic-eng administrative-weight 60
serial restart-delay 0
isis metric 20
max-reserved-bandwidth 100
ip rsvp bandwidth 60
!
interface Serial1/2
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/3
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/4
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/5
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/6
no ip address
shutdown
serial restart-delay 0
!
interface Serial1/7
no ip address
shutdown
serial restart-delay 0
!
router isis
net 49.0000.0024.0000.0000.0002.00
is-type level-2-only
advertise passive-only
metric-style wide
mpls traffic-eng router-id Loopback0
mpls traffic-eng level-2
passive-interface Loopback0
!
router bgp 65024
template peer-session AS
remote-as 65024
update-source Loopback0
exit-peer-session
!
no synchronization
bgp log-neighbor-changes
network 192.168.2.0
neighbor 10.0.0.1 inherit peer-session AS
no auto-summary
!
ip forward-protocol nd
no ip http server
no ip http secure-server
!
!
!
ip explicit-path name SE1/0 enable
next-address 10.1.1.0
!
ip explicit-path name SE1/1 enable
next-address 10.1.1.2
!
logging alarm informational
!
!
!
!
!
!
mpls ldp router-id Loopback0
!
control-plane
!
!
!
mgcp fax t38 ecm
mgcp behavior g729-variants static-pt
!
!
!
!
gatekeeper
shutdown
!
!
line con 0
logging synchronous
stopbits 1
line aux 0
stopbits 1
line vty 0 4
login
!
end

Router#

В настройках туннелей включена опция load-sharing, что является по-сути per-packet sharing, но с учетом полосы. В примере это 3 к 1. Очевидно, что использовать подобную балансировку бессмысленно, если физические свойства каналов существенно отличаются.

Используемые материалы:
MPLS TE – Load Sharing
Perfect Load-Balancing: How Close Can You Get?