As shown in the topology map, this case uses the R1,R2,R3,R4 four routers, which are implemented through Logical-system in olive. R1,R2,R3,R4 is interoperable through RIP, and then we R1 to the R4 10.0.0.4/32 route to achieve load balancing. Here is the configuration script:
[Edit] olive# show # # last changed:2012-07-26 07:46:36 CST version 12.1r1.9;
system {Time-zone Asia/shanghai; root-authentication {Encrypted-password "$1$eb9tnuwo$gyal5nxlo7vdl4n6mrndy1"; # Secret-data} l
Ogin {User Olive {UID 1000;
Class Super-user;
Authentication {Encrypted-password "$1$t5kq/sxd$i12mfkx8pnztgoxj5cs5g0"; # # Secret-data
}} services {ssh;
Telnet
web-management {http;
}}} logical-systems {r1 {interfaces {em1 {unit 12 {
Vlan-id 12;
Family inet {address 10.0.4.5/30;
} \ {Vlan-id 13; Family inet {address 10.0.4.14/30;
} inactive:unit {Vlan-id 15;
Family inet {address 172.30.25.2/30; }} lo0 {Unit 1 {family ine
t {address 10.0.0.1/32; }}} protocols {rip {Group
rip1 {export Direct-to-rip;
Enable RIP neighbor em1.13 on the neighbor em1.12;//interface;
}}} policy-options {policy-statement Direct-to-rip { Term 1 {from Protocol [direct RIP];//direct only notify RIP neighbors of direct-attached routes to the local router, RIP can advertise RIP routes learned from other neighbors, that is, the routes that exist in the RIP routing table of this router, which are not the same, so they are added, and the brackets ' [] ' represent them as logical or then accept;
}} policy-statement load-balance {term 1 { The From {route-filter 10.0.0.4/32 exact;//specifies the route to route 10.0.0.4/32 for load balancing, and this policy is to be advertised to forwarding-table
Inside} then {Load-balance per-packet;//performs actions per packet load balancing
}}} routing-options {
forwarding-table {export load-balance;
}//policy notice to forwarding}} r2 {interfaces {em2 {unit 21 {
Vlan-id 12;
Family inet {address 10.0.4.6/30;
}
} Inactive:unit {Vlan-id 23;
Family inet {address 10.0.4.2/30;
{Vlan-id 24;
Family inet {address 10.0.4.10/30; }} lo0 {Unit 2 {family INE
t {address 10.0.0.2/32; }}} protocols {rip {Group
RIP2 {export Direct-to-rip;
Neighbor em2.21;
Neighbor em2.24;
}}} policy-options {policy-statement Direct-to-rip { Term 1 {from PROtocol [Direct RIP];
then accept; }}} r3 {interfaces {em3 {unit
to {Vlan-id 13;
Family inet {address 10.0.4.13/30;
} inactive:unit {Vlan-id 23;
Family inet {address 10.0.4.1/30;
{Vlan-id 34;
Family inet {address 10.0.2.5/30;
} inactive:unit {Vlan-id 35;
Family inet {address 10.0.2.2/30;
}
}
} Lo0 {Unit 3 {family inet {
Address 10.0.0.3/32; }}} protocols {rip {Group
RIP3 {export Direct-to-rip;
Neighbor em3.31;
Neighbor em3.34;
}}} policy-options {policy-statement Direct-to-rip {
Term 1 {from Protocol [direct RIP];
then accept; }}} r4 {interfaces {em4 {unit
{Vlan-id 24;
Family inet {address 10.0.4.9/30;
}
} unit {Vlan-id 34;
Family inet {address 10.0.2.6/30;
}} lo0 {Unit 4 {
Family inet {address 10.0.0.4/32; }}} protocols {rip {Group
RIP4 {export Direct-to-rip;
Neighbor em4.42;
Neighbor em4.43;
Neighbor lo0.4;
}}} policy-options {policy-statement Direct-to-rip {
Term 1 {from Protocol [direct RIP];
then accept; }}}} interfaces {
EM0 {Unit 0 {family inet {address 192.168.1.254/24;
}}} em1 {vlan-tagging;
} em2 {vlan-tagging;
} em3 {vlan-tagging;
} em4 {vlan-tagging;
} EM5 {vlan-tagging;
} EM6 {vlan-tagging;
} EM7 {vlan-tagging; Below we run Show Route logical-system R1 protocol RIP inet.0:11 destinations, one routes (active, 0 Holddown, 0 hidden) + = Active Route,-= Last Active, * = Both 10.0.0.2/32 *[rip/100] 00:19:39, ME Tric 2, Tag 0 > to 10.0.4.6 via em1.12 10.0.0.3/32 *[rip/100] 00:19:39, metric 2, Tag
0 > to 10.0.4.13 via em1.13 10.0.0.4/32 *[rip/100] 00:19:35, metric 3, tag 0 to 10.0.4.6 via em1.12 > to 10.0.4.13 via em1.13//can see that the routing table shows the best path is 10.0.4.13 via em1.13, from which we cannot see that the router has been implemented
Load balancing, can be viewed by show Route forwarding-table 10.0.2.4/30 *[rip/100] 00:19:39, metric 2, Tag 0 > to 10.0.4.13 via em1.13 10.0.4.8/30 *[rip/100] 00:19:39, metric 2, Tag 0 > to 10. 0.4.6 via em1.12 224.0.0.9/32 *[rip/100] 00:19:39, metric 1 MULTIRECV view forwarding run show Route Forwarding-table | Find R1//find command is just like the beginning of the moment, which shows Logical system:r1 Routing table:default.inet from R1 Type rtref Next Hop Type Index nhref netif default perm 0 rjct 555 1 0.0.0.0/32 Perm 0 dscd 553 1 10.0.0.1/32 intf 0 10.0.0.1 LOCL 780 1 10.0.0.2/32 user 0 10.0.4.6 ucst 781 5 em1.12 10.0.0.3/32User 0 10.0.4.13 ucst 782 5 em1.13 10.0.0.4/32 user 0 Ulst 131070 2 10.0.4.6 ucst 781 5 em1.12 10.0.4.13 UCST 782 5 em1.13 Here we can see the path to 10.0.0.4/32 by two of them are 10.0.4.6 and 10. 0.4.13 10.0.2.4/30 User 0 10.0.4.13 ucst 782 5 em1.13 10.0.4.4/30 intf 0 RSLV 717 1 em1.12 10.0.4.4/32 dest 0 10.0.4.4 recv 714 1 em1.12 10.0.4 .5/32 intf 0 10.0.4.5 locl 715 2 10.0.4.5/32 dest 0 10.0.4.5 locl 715 2 10.0.4.6/32 dest 0 0:c:29:ef:61:93 ucst 781 5 em1.12 10.0.4.7/32 dest 0 10.0.4 .7 BCST 516 1 em1.12 10.0.4.8/30 user 0 10.0.4.6 ucst 781 5 em1.12 10.0.4 .12/30 intf 0 RSLV 721 1 em1.13
10.0.4.12/32 dest 0 10.0.4.12 recv 719 1 em1.13 10.0.4.13/32 dest 0 0:c:29:ef:61:9 D UCST 782 5 em1.13 10.0.4.14/32 intf 0 10.0.4.14 locl 720 2 10.0.4.14/32 de
St 0 10.0.4.14 locl 720 2 10.0.4.15/32 dest 0 10.0.4.15 bcst 718 1 em1.13 224.0.0.0/4 Perm 0 MDSC 554 1 224.0.0.1/32 Perm 0 224.0.0.1 MC St 3 224.0.0.9/32 user 1 224.0.0.9 mcst 3 255.255.255.255/32 Perm 0 BCST 551 1 Look again before applying load balancing to the release run show Route forwarding-table | Find R1 Logical system:r1 Routing table:default.inet internet:destination Type rtref Next Hop Type Index nhref netif default perm 0 rjct 555 1 0.0.0.0/32 per M 0 DSCD 553 1 10.0.0.1/32 intf 0 10.0.0.1 LOCL 780 1 10.0.0.2/32 user 0 10.0.4.6 ucst 775 4 E m1.12 10.0.0.3/32 User 0 10.0.4.13 ucst 784 5 em1.13 10.0.0.4/32 user 0 10.0.4. UCST 784 5 em1.13//You can see load balancing before forwarding R1 to 10.0.0.4/32 path only one 10.0.2.4/30 user 0 10.0.4.13 UCST 784 5 em1.13 10.0.4.4/30 intf 0 RSLV 717 1 em1.12 10.0.4.4/32 Dest 0 10.0.4.4 recv 714 1 em1.12 10.0.4.5/32 intf 0 10.0.4.5 LOCL 71 5 2 10.0.4.5/32 dest 0 10.0.4.5 locl 715 2 10.0.4.6/32 dest 0 0:c:29:ef:61 : UCST 775 4 em1.12 10.0.4.7/32 dest 0 10.0.4.7 bcst 516 1 em1.12 10.0.4.8/30 User 0 10.0.4.6 ucst 775 4 em1.12 10.0.4.12/30 intf 0 RSLV 72 2 1 em1.13 10.0.4.12/32 dest 0 10.0.4.12 recv 720 1 em1.13 10.0.4.13/32 dest 0 0:c:29:ef:61:9d UCS T 784 5 em1.13 10.0.4.14/32 intf 0 10.0.4.14 locl 721 2 10.0.4.14/32 dest 0 10.0.4.14 LOCL 721 2 10.0.4.15/32 dest 0 10.0.4.15 bcst 719 1 em1.13 224.0. 0.0/4 Perm 0 MDSC 554 1 224.0.0.1/32 Perm 0 224.0.0.1 MCST 550 3 224.0.0.9/32 User 1 224.0.0.9 mcst 3 255.255.255.255/32 Perm 0
BCST 551 1 Let's take a look at the traceroute from the R1 to the R4 of the loop mouth. Olive> traceroute 10.0.0.4 logical-system R1 source 10.0.0.1 traceroute to 10.0.0.4 (10.0.0.4) from 10.0.0.1, 30 Hops Max, byte packets 1 10.0.4.13 (10.0.4.13) 1.617 Ms 0.916 Ms 10.0.4.6 (10.0.4.6) 1.007 Ms 2 10.0.0.4 (10.0.0.4) 2.263 ms 1.925 ms 2.547 ms Olive> TraceroutE 10.0.0.4 logical-system R1 source 10.0.0.1 traceroute to 10.0.0.4 (10.0.0.4) from 10.0.0.1, hops max Packets 1 10.0.4.6 (10.0.4.6) 1.761 Ms 10.0.4.13 (10.0.4.13) 1.355 ms 0.914 MS 2 10.0.0.4 (10.0.0.4) 6.277 m S 2.619 Ms 1.937 ms Olive> traceroute 10.0.0.4 logical-system R1 source 10.0.0.1 to 10. 0.0.4 (10.0.0.4) from 10.0.0.1, hops max, byte packets 1 10.0.4.13 (10.0.4.13) 1.579 Ms 10.0.4.6 (10.0.4.6) 1 706 Ms 1.265 MS 2 10.0.0.4 (10.0.0.4) 2.574 ms 2.916 ms 1.993 ms Olive> traceroute 10.0.0.4 Al-system R1 Source 10.0.0.1 traceroute to 10.0.0.4 (10.0.0.4) from 10.0.0.1, hops max, byte packets 1 1 0.0.4.6 (10.0.4.6) 1.517 Ms 10.0.4.13 (10.0.4.13) 0.785 ms 1.212 MS 2 10.0.0.4 (10.0.0.4) 2.068 Ms 1.941 MS 2.2 Notoginseng Ms Olive> traceroute 10.0.0.4 logical-system R1 source 10.0.0.1 traceroute to 10.0.0.4 (10.0.0.4) From 10.0.0.1, hopsMax, byte packets 1 10.0.4.6 (10.0.4.6) 1.588 Ms 0.769 Ms 10.0.4.13 (10.0.4.13) 1.039 Ms 2 10.0.0.4 (10.0. 0.4) 0.847 Ms 0.806 ms 0.781 ms Olive> traceroute 10.0.0.4 logical-system source R1 Trac Eroute to 10.0.0.4 (10.0.0.4) from 10.0.0.1, hops max, byte packets 1 10.0.4.13 (10.0.4.13) 1.179 Ms 1.592 ms 10.0.4.6 (10.0.4.6) 1.108 Ms 2 10.0.0.4 (10.0.0.4) 2.302 ms 1.959 ms 1.946 ms from the above results we can see that every packet R1 to R4 is alternating through 10.0. 4.13 and 10.0.4.6 two paths forward.
This article is from the "Rista" blog, please be sure to keep this source http://rista.blog.51cto.com/2526140/942681