Rip (H3C) Case 1 of ospf advanced applications
Case 1:
1. Job Requirements: re-distribute the Routes learned by rip to ospf. Inject the default route into rip and direct it to ospf to achieve route Summary (summarized on the ABR). Configure the peripheral area to configure the full peripheral area. 2. topology
3. device introduction:
Switch: huawei quidway S2000 serials
Router: huawei quidway R2621
4. Device Configuration:
Vswitch Configuration:
[Quidway] vlan 10
[Quidway-vlan10] description in
[Quidway-vlan10] port e0/3 to e0/6
[Quidway-vlan10] quit
[Quidway] int Vlan-interface 10
[Quidway-Vlan-interface10] ip add 192.168.1.1 255.255.255.0
[Quidway] vlan 20
[Quidway-vlan20] description out
[Quidway-vlan20] port e0/1
[Quidway-vlan20] quit
[Quidway] int vlan 20 // enter vlan
[Quidway-Vlan-interface20] ip add 192.168.2.1 255.255.255.0 // with IP
[Quidway-Vlan-interface20] quit
[Quidway] ospf // mode note:
[Quidway-ospf] area 2 // enter the area of the network to be advertised
[Quidway-ospf-area-0.0.0.2] network 192.168.1.0 0.0.255 // advertised network
[Quidway-ospf-area-0.0.0.2] network 192.168.2.0 0.0.255
Vror3 R3 Configuration:
[R3] int e1
[R3-Ethernet1] ip add 192.168.2.2 255.255.255.0
[R3-Ethernet1] int s0
[R3-Serial0] ip add 192.168.3.1 255.255.255.0
[R3-Serial0] quit
[R3] ospf enable // enable the OSPF protocol
[R3] int s0 // enable ospf (all interfaces must be enabled)
[R3-Serial0] ospf enable area 0
[R3-Serial0] int e1
A [R3-Ethernet1] ospf enable area 2
Vro10 R10 Configuration:
[R10] int s0
[R10-Serial0] ip address 192.168.3.2 24
[R10-Serial0] int s1
[R10-Serial1] ip add 192.168.4.1 24
[R10-Serial1] int e1
[R10-Ethernet1] ip add 192.168.5.1 24
[R10] ospf enable
[R10] int s1
A [R10-Serial1] ospf enable area 1
[R10-Serial1] int s0
[R10-Serial0] ospf enable area 0
[R10] rip // start the rip Protocol
[R10-rip] network 192.168.5.0
[R10] int s0 // reset the last end of the serial port!
[R10-Serial0] shutdown
[R10-Serial0] undo shutdow
Vror5 R5 Configuration:
[R5] int s1
[R5-Serial1] ip add 192.168.4.2 24
[R5] int loo 1 // set the loopback interface because no connection is available
[R5-LoopBack1] ip add 192.168.8.1 24 // Master Address
[R5-LoopBack1] ip add 192.168.9.1 24 sub // configure secondary ip address (for routing summary)
[R5-LoopBack1] ip add 192.168.10.1 24 sub
[R5-LoopBack1] ip add 192.168.11.1 24 sub
[R5-LoopBack1] quit
[R5] int s1
A [R5-Serial1] ospf enable area 1
[R5-Serial1] int lo 1
A [R5-LoopBack1] ospf enable area 1
[R5] int s1
[R5-Serial1] shut
[R5-Serial1] undo shut
Vro9 R9 Configuration:
[Router] sysname r9
[R9] int e1
[R9-Ethernet1] ip add 192.168.5.2 24
[R9-Ethernet1] int s0
[R9-Serial0] ip add 192.168.6.1 24
[R9-Serial0] qu
[R9] rip // enable the rip Protocol
Waiting...
RIP is running
[R9-rip] network 192.168.5.0 // advertised network
[R9-rip] network 192.168.6.0
Vrorr12 Configuration:
[R12-Ethernet0] int s0
[R12-Serial0] ip add 192.168.6.2 24
[R12-Serial0] int e1
[R12-Ethernet0] ip add 192.168.7.1 24
[R12] rip
Waiting...
RIP is running
[R12-rip] network 192.168.6.0
[R12-rip] network 192.168.7.0
[R12] int s0 // This interface is reset, otherwise it will not work
[R12-Serial0] shutdown
[R12-Serial0] undo shutdow
5. Route redistribution:
[R10] ospf enable
[R10-ospf] import-route direct // publish a direct connection route
[R10-ospf] import-route rip // send the route information learned by rip to OSPF
[R10] int null 0 // NULL0 must be created first
[R10] ip route 0.0.0.0 0 null 0 // use a default route to point to this interface, indicating that all routes through this interface are discarded
[R10] rip
[R10-rip] import static publish static Routing
View the route table information as follows:
[R9] dis ip rout
Routing Tables:
Destination/Mask Proto Pref Metric Nexthop Interface
0.0.0.0/0 RIP 100 1 192.168.5.1 Ethernet1
127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0
127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.5.0/24 Direct 0 0 192.168.5.2 Ethernet1
192.168.5.2/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.6.0/24 Direct 0 0 192.168.6.2 Serial0
192.168.6.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.6.2/32 Direct 0 0 192.168.6.2 Serial0
<Quidway> dis ip rout
Routing Table: public net
Destination/Mask Protocol Pre Cost Nexthop Interface
127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
192.168.2.0/24 DIRECT 0 0 192.168.2.1 Vlan-interface20
192.168.2.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
192.168.3.0/24 OSPF 10 1572 192.168.2.2 Vlan-interface20
192.168.3.1/32 O_ASE 150 1 192.168.2.2 Vlan-interface20
192.168.4.0/24 OSPF 10 3134 192.168.2.2 Vlan-interface20
192.168.4.2/32 O_ASE 150 1 192.168.2.2 Vlan-interface20
192.168.5.0/24 O_ASE 150 1 192.168.2.2 Vlan-interface20
192.168.6.0/24 O_ASE 150 1 192.168.2.2 Vlan-interface20
192.168.8.0/24 OSPF 10 4696 192.168.2.2 Vlan-interface20
192.168.9.0/24 OSPF 10 4696 192.168.2.2 Vlan-interface20
192.168.10.0/24 OSPF 10 4696 192.168.2.2 Vlan-interface20
192.168.11.0/24 OSPF 10 4696 192.168.2.2 Vlan-interface20
6. Configure the peripheral area:
[Quidway] ospf
[Quidway-ospf] area 2
A [Quidway-ospf-area-0.0.0.2] stub
[R3] ospf
[R3-ospf] stub cost 100 area 2
[R10-ospf] abr-summary 192.168.8.0 mask 255.255.252.0 area 1
View route table:
[R3] dis ip rout
Routing Tables:
Destination/Mask Proto Pref Metric Nexthop Interface
127.0.0.0/8 Direct 0 0 127.0.0.1 LoopBack0
127.0.0.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.2.0/24 Direct 0 0 192.168.2.2 Ethernet1
192.168.2.2/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.3.0/24 Direct 0 0 192.168.3.2 Serial0
192.168.3.1/32 Direct 0 0 127.0.0.1 LoopBack0
192.168.3.2/32 Direct 0 0 192.168.3.2 Serial0
192.168.4.0/24 OSPF 10 3124 192.168.3.2 Serial0
192.168.4.2/32 O_ASE 150 1 192.168.3.2 Serial0
192.168.5.0/24 O_ASE 150 1 192.168.3.2 Serial0
192.168.6.0/24 O_ASE 150 1 192.168.3.2 Serial0
192.168.8.0/22 OSPF 10 4686 192.168.3.2 Serial0
7. Configure the full peripheral area on the ABR:
[R3-ospf] stub cost 100 area 2 no-summary
[Quidway] dis ip rout
Routing Table: public net
Destination/Mask Protocol Pre Cost Nexthop Interface
0.0.0.0/0 OSPF 10 110 192.168.2.2 Vlan-interface20
127.0.0.0/8 DIRECT 0 0 127.0.0.1 InLoopBack0
127.0.0.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
192.168.2.0/24 DIRECT 0 0 192.168.2.1 Vlan-interface20
192.168.2.1/32 DIRECT 0 0 127.0.0.1 InLoopBack0
8. test:
Local Machine:
C: \ Users \ Administrator & gt; ping 192.168.7.253
Pinging 192.168.7.253 with 32 bytes of data:
Reply from 192.168.7.253: byte = 32 time = 41 ms TTL = 59
Reply from 192.168.7.253: byte = 32 time = 37 ms TTL = 59
Reply from 192.168.7.253: byte = 32 time = 37 ms TTL = 59
Reply from 192.168.7.253: byte = 32 time = 37 ms TTL = 59
Ping statistics for 192.168.7.253:
Packet: Sent = 4, received = 4, lost = 0 (0% lost ),
Estimated round-trip time (in milliseconds ):
Minimum = 37 ms, maximum = 41 ms, average = 38 ms