Saturday, March 5, 2011

Internet Protocol Control Protocol in PPP links.


 this blog we will look the PPP link's ip route / address negotiation .

In the above diagram, there is not static routing / protocol implemented just serial interface with ppp encapsulation link brought up .
  if you try to ping the R1 interface ip 192.168.100.1  from R2 interface ip 192.168.1.1 will it succeed ?


R2#ping 192.168.100.1
Lets check the router interface:
R1#show run int s1/0
Building configuration...
Current configuration : 160 bytes
!
interface Serial1/0
ip address 192.168.200.1 255.255.255.0 secondary
ip address 192.168.100.1 255.255.255.0
encapsulation ppp
serial restart-delay 0

R2#show run int s1/0
Building configuration...

Current configuration : 110 bytes
!
interface Serial1/0
ip address 192.168.1.1 255.255.255.254
encapsulation ppp
serial restart-delay 0
end

Answer is Yes you can ping.
R2#ping 192.168.100.1

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.100.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 4/36/84 ms
R2#

Check the routing table: " 192.168.100.1" directly connected !!

R2#show ip route
Codes: C - connected, S - static, 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
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
192.168.1.0/30 is subnetted, 1 subnets
C 192.168.1.0 is directly connected, Serial1/0
192.168.100.0/32 is subnetted, 1 subnets
C 192.168.100.1 is directly connected, Serial1/0

How it works :
ip address negotiated through IPCP as defined in RFC 1332
“The IP Control Protocol (IPCP) is responsible for configuring, enabling, and disabling the IP protocol modules on both ends of the point-to-point link.“

enabled the debugging to what is going on :
*Mar 1 00:31:48.207: Se1/0 PPP: I pkt type 0x8021, datagramsize 14 link[ip]
*Mar 1 00:31:48.211: Se1/0 IPCP: I CONFREQ [Open] id 3 len 10
*Mar 1 00:31:48.211: Se1/0 IPCP: Address 192.168.100.2 (0x0306C0A86402)
*Mar 1 00:31:48.215: Se1/0 IPCP: O CONFREQ [Open] id 3 len 10
*Mar 1 00:31:48.215: Se1/0 IPCP: Address 192.168.1.1 (0x0306C0A80101)
*Mar 1 00:31:48.215: Se1/0 IPCP: O CONFACK [Open] id 3 len 10
*Mar 1 00:31:48.219: Se1/0 IPCP: Address 192.168.100.2 (0x0306C0A86402)
*Mar 1 00:31:48.367: Se1/0 PPP: I pkt type 0x8021, datagramsize 14 link[ip]
*Mar 1 00:31:48.367: Se1/0 IPCP: I CONFACK [ACKsent] id 3 len 10
*Mar 1 00:31:48.371: Se1/0 IPCP: Address 192.168.1.1 (0x0306C0A80101)
Further Reading:
Internet Protocol Control Protocol in PPP links - http://tools.ietf.org/html/rfc1332


Friday, March 4, 2011

/31 bit Point to Point ip address configuration .

Can we assign /31 address on the point to point link & save 50 % of ip address?
 Answer is yes.

R2(config)#int fa0/0
R2(config-if)#ip address 192.168.1.0 255.255.255.254
% Warning: use /31 mask on non point-to-point interface cautiously


R4(config)#int fa0/0
R4(config-if)#ip address 192.168.1.1 255.255.255.254
% Warning: use /31 mask on non point-to-point interface cautiously

Let’s try to ping :)

R4#ping 192.168.1.0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.0, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

Ok do we need privilege mode to ping ? no .

R4> ping 192.168.1.0
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.0, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 1/2/4 ms

Let’s check the ip route:

R4#show ip route
Codes: C - connected, S - static, 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
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

192.168.1.0/31 is subnetted, 2 subnets
C 192.168.1.0 is directly connected, FastEthernet0/0
C 192.168.1.2 is directly connected, FastEthernet0/1

I tried to assign the same way on switches 3550,3560 there was no issues.

" im just wondering.... So wht is a the use of Network n Broadcast addrs anyway ?":
Fist if its real point to point interface ( eg: serial, ppp) we don’t need to assign the ip address at all , unnumbered or we could use /32 at both side 
But when we use Ethernet as Point to Point we need to consider the broadcast addresses:

RFC 1812 says in section 4.2.3.1 IP Broadcast Addresses :
“ (2) SHOULD silently discard on receipt (i.e., do not even deliver to
applications in the router) any packet addressed to 0.0.0.0 or {
, 0 }. If these packets are not silently
discarded, they MUST be treated as IP broadcasts (see Section
[5.3.5]). There MAY be a configuration option to allow receipt
of these packets. This option SHOULD default to discarding
them.

Broadcast fall in to two categories:

  • Limited broadcast (Local)
  1. 0.0.0.0
  2.   All one -255.255.255.255
  •   Directed broadcast
  1.   Network < all zero > - this is obsolete ( Reference RFC 3021 section 2.2 )
  2.   Network , < all one>
But our concern here is the directed broadcast , therefore if there is any broadcast it can uses limited broadcast . we have to understand the directed broadcast only affects the local router and  the segment which is the point to point link . Further routing protocols uses the multicast, limited broadcast or unicast addresses that is not going to affected by the /31 addressing scheme.
Anyway directed broadcasts are always filtered as the best practice.
 

Further Reading:
http://www.faqs.org/rfcs/rfc3021.html

http://www.faqs.org/rfcs/rfc1812.html
http://www.cisco.com/en/US/docs/ios/12_2t/12_2t2/feature/guide/ft31addr.html