Hi,
I created these routers with below configuration
R1===================R2
R1 connected to R2 with DTE-DCE serial.
hostname R1 ! interface Loopback0 ip address 131.108.1.1 255.255.255.0 ip policy route-map FROM-131.108.1.1-TO-131.108.3.1 ! interface Loopback1 ip address 131.108.4.1 255.255.255.0 ip policy route-map FROM-131.108.4.1-TO-131.108.6.1 ! interface Serial0 ip address 131.108.2.1 255.255.255.252 no fair-queue ! interface Serial1 ip address 131.108.5.1 255.255.255.252 clockrate 56000 ! router bgp 1 bgp log-neighbor-changes network 131.108.1.0 mask 255.255.255.0 network 131.108.4.0 mask 255.255.255.0 neighbor 131.108.2.2 remote-as 2 neighbor 131.108.5.2 remote-as 2 ! access-list 100 permit icmp host 131.108.1.1 host 131.108.3.1 access-list 101 permit icmp host 131.108.4.1 host 131.108.6.1 route-map FROM-131.108.1.1-TO-131.108.3.1 permit 10 match ip address 100 set ip next-hop 131.108.2.2 ! route-map FROM-131.108.4.1-TO-131.108.6.1 permit 10 match ip address 101 set ip next-hop 131.108.5.2
=========================
hostname R2 ! interface Loopback0 ip address 131.108.3.1 255.255.255.0 ! interface Loopback1 ip address 131.108.6.1 255.255.255.0 ! interface Serial0 ip address 131.108.2.2 255.255.255.252 no fair-queue clockrate 56000 ! interface Serial1 ip address 131.108.5.2 255.255.255.252 ! router bgp 2 bgp log-neighbor-changes network 131.108.3.0 mask 255.255.255.0 network 131.108.6.0 mask 255.255.255.0 neighbor 131.108.2.1 remote-as 1 neighbor 131.108.5.1 remote-as 1
=============================
R1#sh ip route Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2 ia - IS-IS inter area, * - candidate default, U - per-user static route o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
131.108.0.0/16 is variably subnetted, 6 subnets, 2 masks B 131.108.6.0/24 [20/0] via 131.108.2.2, 00:28:55 C 131.108.5.0/30 is directly connected, Serial1 C 131.108.4.0/24 is directly connected, Loopback1 B 131.108.3.0/24 [20/0] via 131.108.2.2, 00:28:55 C 131.108.2.0/30 is directly connected, Serial0 C 131.108.1.0/24 is directly connected, Loopback0 R1#sh ip bgp BGP table version is 5, local router ID is 131.108.4.1 Status codes: s suppressed, d damped, h history, * valid, > best, i - internal Origin codes: i - IGP, e - EGP, ? - incompleteNetwork Next Hop Metric LocPrf Weight Path
*> 131.108.1.0/24 0.0.0.0 0 32768 i- 131.108.3.0/24 131.108.5.2 0 0 2 i
- 131.108.6.0/24 131.108.5.2 0 0 2 i
========================================================
When I tried to ping from 131.108.4.1 to 131.108.6.1, the route-map didn't pickup anything.
R1#debug ip policy Policy routing debugging is on R1#ping Protocol [ip]: Target IP address: 131.108.6.1 Repeat count [5]: Datagram size [100]: Timeout in seconds [2]: Extended commands [n]: y Source address or interface: 131.108.4.1 Type of service [0]: Set DF bit in IP header? [no]: Validate reply data? [no]: Data pattern [0xABCD]: Loose, Strict, Record, Timestamp, Verbose[none]: Sweep range of sizes [n]: Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 131.108.6.1, timeout is 2 seconds: Packet sent with a source address of 131.108.4.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 36/36/40 ms R1#u all R1#debug ip packet IP packet debugging is on R1#ping Protocol [ip]: Target IP address: 131.108.6.1 Repeat count [5]: Datagram size [100]: Timeout in seconds [2]: Extended commands [n]: y Source address or interface: 131.108.4.1 Type of service [0]: Set DF bit in IP header? [no]: Validate reply data? [no]: Data pattern [0xABCD]: Loose, Strict, Record, Timestamp, Verbose[none]: Sweep range of sizes [n]: Type escape sequence to abort. Sending 5, 100-byte ICMP Echos to 131.108.6.1, timeout is 2 seconds: Packet sent with a source address of 131.108.4.1 !!!!! Success rate is 100 percent (5/5), round-trip min/avg/max = 52/73/124 ms R1#
00:40:46: IP: tableid=0, s=131.108.4.1 (local), d=131.108.6.1 (Serial0), routed via RIB 00:40:46: IP: s=131.108.4.1 (local), d=131.108.6.1 (Serial0), len 100, sending 00:40:46: IP: tableid=0, s=131.108.6.1 (Serial0), d=131.108.4.1 (Loopback1), routed via RIB 00:40:46: IP: s=131.108.6.1 (Serial0), d=131.108.4.1, len 100, rcvd 4 00:40:46: IP: tableid=0, s=131.108.4.1 (local), d=131.108.6.1 (Serial0), routed via RIB 00:40:46: IP: s=131.108.4.1 (local), d=131.108.6.1 (Serial0), len 100, sending 00:40:46: IP: tableid=0, s=131.108.6.1 (Serial0), d=131.108.4.1 (Loopback1), routed via RIB 00:40:46: IP: s=131.108.6.1 (Serial0), d=131.108.4.1, len 100, rcvd 4 00:40:46: IP: tableid=0, s=131.108.4.1 (local), d=131.108.6.1 (Serial0), routed via RIB 00:40:46: IP: s=131.108.4.1 (local), d=131.108.6.1 (Serial0), len 100, sending 00:40:46: IP: tableid=0, s=131.108.6.1 (Serial0), d=131.108.4.1 (Loopback1), routed via RIB 00:40:46: IP: s=131.108.6.1 (Serial0), d=131.108.4.1, len 100, rcvd 4 00:40:46: IP: tableid=0, s=131.108.4.1 (local), d=131.108.6.1 (Serial0), routed via RIB 00:40:46: IP: s=131.108.4.1 (local), d=131.108.6.1 (Serial0), len 100, sending 00:40:46: IP: tableid=0, s=131.108.6.1 (Serial0), d=131.108.4.1 (Loopback1), routed via RIB 00:40:46: IP: s=131.108.6.1 (Serial0), d=131.108.4.1, len 100, rcvd 4 00:40:46: IP: tableid=0, s=131.108.4.1 (local), d=131.108.6.1 (Serial0), routed via RIB 00:40:46: IP: s=131.108.4.1 (local), d=131.108.6.1 (Serial0), len 100, sending 00:40:46: IP: tableid=0, s=131.108.6.1 (Serial0), d=131.108.4.1 (Loopback1), routed via RIB 00:40:46: IP: s=131.108.6.1 (Serial0), d=131.108.4.1, len 100, rcvd 4==================================
What I want were:
any ICMP from 131.108.1.1 to 131.108.3.1 will be delivered using route
131.108.1.1-131.108.2.1-131.108.2.2-131.108.3.1any ICMP from 131.108.4.1 to 131.108.6.1 will be delivered using route
131.108.4.1-131.108.5.1-131.108.5.2-131.108.6.1
- Where was the wrong part of configuration?
- Why?
- How can I fix it?