R2#sh ip ro | b ^G
Gateway of last resort is not set
1.0.0.0/24 is subnetted, 1 subnets
S 1.1.1.0 [1/0] via 12.12.12.1
is directly connected, Serial0/1
2.0.0.0/24 is subnetted, 1 subnets
C 2.2.2.0 is directly connected, Loopback0
112.0.0.0/24 is subnetted, 1 subnets
C 112.112.112.0 is directly connected, Serial0/1
12.0.0.0/24 is subnetted, 1 subnets
C 12.12.12.0 is directly connected, Serial0/0
=====================================================
R1#debug ip packet detail
R1#ping 2.2.2.2 so lo0 r 4
Type escape sequence to abort.
Sending 4, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!
Success rate is 100 percent (4/4), round-trip min/avg/max = 4/5/8 ms
R1#
*Mar 1 00:11:24.651: IP: tableid=0, s=1.1.1.1 (local), d=2.2.2.2 (Serial0/0), routed via FIB < Packet 1
*Mar 1 00:11:24.651: IP: s=1.1.1.1 (local), d=2.2.2.2 (Serial0/0), len 100, sending
*Mar 1 00:11:24.651: ICMP type=8, code=0
*Mar 1 00:11:24.655: IP: tableid=0, s=2.2.2.2 (Serial0/0), d=1.1.1.1 (Loopback0), routed via RIB
*Mar 1 00:11:24.655: IP: s=2.2.2.2 (Serial0/0), d=1.1.1.1, len 100, rcvd 4
*Mar 1 00:11:24.655: ICMP type=0, code=0
*Mar 1 00:11:24.655: IP: tableid=0, s=1.1.1.1 (local), d=2.2.2.2 (Serial0/0), routed via FIB < Packet 2
*Mar 1 00:11:24.655: IP: s=1.1.1.1 (local), d=2.2.2.2 (Serial0/0), len 100, sending
*Mar 1 00:11:24.655: ICMP type=8, code=0
*Mar 1 00:11:24.663: IP: tableid=0, s=2.2.2.2 (Serial0/0), d=1.1.1.1 (Loopback0), routed via RIB
*Mar 1 00:11:24.663: IP: s=2.2.2.2 (Serial0/0), d=1.1.1.1, len 100, rcvd 4
*Mar 1 00:11:24.663: ICMP type=0, code=0
*Mar 1 00:11:24.663: IP: tableid=0, s=1.1.1.1 (local), d=2.2.2.2 (Serial0/0), routed via FIB < Packet 3
*Mar 1 00:11:24.663: IP: s=1.1.1.1 (local), d=2.2.2.2 (Serial0/0), len 100, sending
*Mar 1 00:11:24.663: ICMP type=8, code=0
*Mar 1 00:11:24.667: IP: tableid=0, s=2.2.2.2 (Serial0/0), d=1.1.1.1 (Loopback0), routed via RIB
*Mar 1 00:11:24.667: IP: s=2.2.2.2 (Serial0/0), d=1.1.1.1, len 100, rcvd 4
*Mar 1 00:11:24.667: ICMP type=0, code=0
*Mar 1 00:11:24.667: IP: tableid=0, s=1.1.1.1 (local), d=2.2.2.2 (Serial0/0), routed via FIB < Packet 4
*Mar 1 00:11:24.667: IP: s=1.1.1.1 (local), d=2.2.2.2 (Serial0/0), len 100, sending
*Mar 1 00:11:24.667: ICMP type=8, code=0
*Mar 1 00:11:24.671: IP: tableid=0, s=2.2.2.2 (Serial0/0), d=1.1.1.1 (Loopback0), routed via RIB
*Mar 1 00:11:24.671: IP: s=2.2.2.2 (Serial0/0), d=1.1.1.1, len 100, rcvd 4
*Mar 1 00:11:24.671: ICMP type=0, code=0
=====================================================
Umm....Looks like CEF is not happy with us :-P Lets turn it off :-)
R1#ping 2.2.2.2 so lo0 r 4
Type escape sequence to abort.
Sending 4, 100-byte ICMP Echos to 2.2.2.2, timeout is 2 seconds:
Packet sent with a source address of 1.1.1.1
!!!!
Success rate is 100 percent (4/4), round-trip min/avg/max = 4/5/8 ms
R1#
*Mar 1 00:12:25.703: IP: tableid=0, s=1.1.1.1 (local), d=2.2.2.2 (Serial0/0), routed via RIB< Packet 1
*Mar 1 00:12:25.703: IP: s=1.1.1.1 (local), d=2.2.2.2 (Serial0/0), len 100, sending
*Mar 1 00:12:25.703: ICMP type=8, code=0
*Mar 1 00:12:25.707: IP: tableid=0, s=2.2.2.2 (Serial0/0), d=1.1.1.1 (Loopback0), routed via RIB
*Mar 1 00:12:25.707: IP: s=2.2.2.2 (Serial0/0), d=1.1.1.1, len 100, rcvd 4
*Mar 1 00:12:25.707: ICMP type=0, code=0
*Mar 1 00:12:25.707: IP: tableid=0, s=1.1.1.1 (local), d=2.2.2.2 (Serial0/1), routed via RIB< Packet 2
*Mar 1 00:12:25.707: IP: s=1.1.1.1 (local), d=2.2.2.2 (Serial0/1), len 100, sending
*Mar 1 00:12:25.707: ICMP type=8, code=0
*Mar 1 00:12:25.715: IP: tableid=0, s=2.2.2.2 (Serial0/0), d=1.1.1.1 (Loopback0), routed via RIB
*Mar 1 00:12:25.715: IP: s=2.2.2.2 (Serial0/0), d=1.1.1.1, len 100, rcvd 4
*Mar 1 00:12:25.715: ICMP type=0, code=0
*Mar 1 00:12:25.715: IP: tableid=0, s=1.1.1.1 (local), d=2.2.2.2 (Serial0/0), routed via RIB
*Mar 1 00:12:25.715: IP: s=1.1.1.1 (local), d=2.2.2.2 (Serial0/0), len 100, sending < Packet 3
*Mar 1 00:12:25.715: ICMP type=8, code=0
*Mar 1 00:12:25.719: IP: tableid=0, s=2.2.2.2 (Serial0/0), d=1.1.1.1 (Loopback0), routed via RIB
*Mar 1 00:12:25.719: IP: s=2.2.2.2 (Serial0/0), d=1.1.1.1, len 100, rcvd 4
*Mar 1 00:12:25.719: ICMP type=0, code=0
*Mar 1 00:12:25.723: IP: tableid=0, s=1.1.1.1 (local), d=2.2.2.2 (Serial0/1), routed via RIB
*Mar 1 00:12:25.723: IP: s=1.1.1.1 (local), d=2.2.2.2 (Serial0/1), len 100, sending< Packet 4
*Mar 1 00:12:25.723: ICMP type=8, code=0
*Mar 1 00:12:25.723: IP: tableid=0, s=2.2.2.2 (Serial0/0), d=1.1.1.1 (Loopback0), routed via RIB
*Mar 1 00:12:25.727: IP: s=2.2.2.2 (Serial0/0), d=1.1.1.1, len 100, rcvd 4
*Mar 1 00:12:25.727: ICMP type=0, code=0
Everything seems to be in shape now :-)
R1#sh ip route 2.2.2.0
Routing entry for 2.2.2.0/24
Known via "static", distance 1, metric 0 (connected)
Routing Descriptor Blocks:
* 12.12.12.2
Route metric is 0, traffic share count is 1
directly connected, via Serial0/1
Route metric is 0, traffic share count is 1
so conclusion is that despite of how you configure the static route (Exit Interface Vs Next Hop), the AD is always going to be 1.
Though specifying next hop has some advantages over exit interface option on Multi Access network types. But personally I like to use what I call mix of both in which while adding static route you specify exit interface with next hop address. This way we can make sure that no route-recursion issue will occur. And if you are thinking " Route Recursion issues with Static routing - what the hack is that" ?..ummm....let me save it for my next post for CCNA guys :-)
here is the syntax BTW which I just talked about