KHALED Routing Protocol (KRP).


KHALED Routing Protocol (KRP)


  • Introduction:-

- KHALED Routing Protocol (KRP) is an Exterior Gateway Protocol (EGP) that introduces a new way of routing IP packets from the source to the destination through different Autonomous Systems (ASs).
- The Internet will be subdivided into logical regions or by the physical location of continents.
- The routing process that KHALED Routing Protocol (KRP) uses is based on the following:

a) KRP Region Number (RN).
b) KRP Autonomous System Number (KRP ASN).
c) Best Path Algorithm (AS Path).
d) The efforts made by the IGP within each AS.

- The major difference between KRP and BGP is that KRP does not uses a large table with hundreds of thousands of entries (BGP Table) stored within each Internet router, instead of that, it uses a smarter way of routing based on the KRP RN,  KRP ASN stored within each IP address, Best Path Algorithm (AS Path) and the efforts already being done by each IGP within an AS.
- KRP requires a specific and organized way of IP address assignment for ISPs and Enterprises within a specific region (continent).



Map of The 5 Different Connected Regions Covering The Globe.


The 5 Connected Regions Through Regional Boarder Routers (RBRs)


Sample of 3 Connected Regions and Regional Routers (RRs) Within One Region (RN 3).

Two Connected Regions Containing RBRs, RRs, and LKARs


  • KHALED Routing Protocol (KRP):

- KRP uses new terms that can be defined as follows:

  • Region Number (RN):

- A Region Number (RN) ==> A unique number that identifies a region.
- The 1st hex digit of the 2nd group of an IPv6 address determines on which RN this IPv6 address is located.
- The 1st octet (1st decimal digits) of an IPv4 address determines on which RN this IPv4 address is located.
- The table that will be used listing the Region Number (RN), the corresponding IPv6 1st hex digit of the 2nd group and the IPv4 1st octet pool of decimal numbers is called the Region Number Table (RNT) and is stored on every KRP router and is as follows:


Region Number (RN)
1st Hex Digit
of the 2nd IPv6 group
1st IPv4 Octet
Decimal Digits
1
0 - 5 - A - F
ARIN Pool
2
1 - 6 - B
LACNIC Pool
3
2 - 7 - C
RIPE NCC/APNIC Pool
4
3 - 8 - D
AFRINIC Pool
5
4 - 9 - E
APNIC Pool


  • Regional Boarder Router (RBR):
- A router in a region (with an assigned RN) that has at least one interface connected to a router's interface in another different region (with another assigned RN).

  • Regional Router (RR):
- A router in a region (with an assigned RN) that has all interfaces connected to other routers in the same region (with the same assigned RN).
- A router in a local AS that has at least one interface connected to a router's interface in a different AS in the same region. 

  • Local KRP AS Router (LKAR):
- A router in an AS that has all interfaces connected to other routers in the same AS in the same region.


- Each RBR, RR, and LKAR is configured with a Region Number (RN) that identifies in which region that router is located. 
- All RBRs, RRs, and LKARs interfaces will be assigned by default to the configured Region Number (RN).
- First, the two connected KRP routers' interfaces exchange their RNs: 

  1. If they are the same, the two KRP routers are RRs.
  2. If they are different, the two KRP routers are RBRs.
- Second, the two connected KRP routers' interfaces exchange their KRP ASNs:

     1. If they are the same, the two KRP routers are LKARs.
     2. If they are different, the two KRP routers are RRs.


Note:-

- For ISPs and Enterprises, the RN and KRP ASN are configured manually on every KRP router.

 - For Enterprises, the RN and KRP ASN must be stored on every assigned GUA (in case of IPv6) and on every public IP address (in case of IPv4).


  • KRP Forwarding Mechanism:

- KRP requires the IPv6 and IPv4 assignment for enterprises must follow these requirements:

a) The 2nd two groups of an IPv6 address is represented as follows:

xxxx|yyyy|yyyy|yyyy:yyyy|yyyy|yyyy|yyyy (Binary digits)
XYYY:YYYY (Hexa-decimal digits)

where X hex-digit is associated with a specific Region Number (RN).
and XYYY.YYYY hex digits represents the KRP ASN.


b) The 4 octets of an IPv4 address are represented as follows:

xxxxxxxx.yyyyyyyy.yyyyyyyy.yyyyyyyy (Binary digits)
XXYY.YYYY (Hexa-decimal digits)

where XX hex-digits are associated with a specific Region Number (RN).
and XXYY.YYYY Hex digits represents the KRP ASN.



Note:- - The Region Number (RN) is unique for every region.
           - The KRP ASN must be unique for every AS.
           - For IPv4, the 4 octets are represented in decimal in the IPv4 address itself, but
             the KRP ASN is represented in 8 hexdecimal digits.
           - For IPv4, Enterprises can be assigned more than one KRP ASN.



- There are 3 types of tables, 2 RBR messages and 1 RR message that KRP uses for forwarding a packet:


a) KRP router Regional Table (RT):

- Each RBR and RR creates its own Regional Table (RT).
- The Regional Table (RT) is as follows:


Local RN
Remote RN
Traffic Class
Local KRP ASN
RBR KRP ASN








b) KRP router Forwarding Table (FT):


Local KRP ASN
Remote KRP ASN
RBR KRP ASN
Best AS Path
Output Interface
Next-hop IP address








c) KRP router IGP Routing Table (IRT):


Prefix (Subnet)
Metric
Output Interface
Next-hop IP address






- RBR Advertised Message Information for the local region's KRP ASN is as follows:


Remote RN
Traffic Class
No. of Hops
RBR IP Address






- RBR Advertised Message Information for the remote region's RBR is as follows:


Local RN
Remote RN
Traffic Class
No. of Hops
Timeout Value
RBR KRP ASN









- RR Advertised Message Information is as follows:


Local RN
Remote RN
Local
KRP ASN
RBR
KRP ASN
RR
IP Address







  • KRP Configuration & Troubleshooting Commands on Cisco Router IOS:

Router(config)# router krp "RN" "KRP-ASN"
Router(config-router)# neighbor "RID"  remote-rn  "RN"  remote-krpasn "KRP-ASN"
Router(config-router)# traffic-class "value" (Optional)

Router# show ip krp rt          (To show the KRP Regional Table)
Router# show ip krp ft          (To show the KRP Forwarding Table)
Router# show ip route          (To show the IGP Routing Table)
Router# show ip krp rbr rt    (To show the KRP RBR Regional Table)
Router# show ip krp rbr        (To show the KRP RBR Messages)
Router# show ip krp rr          (To show the KRP RR Messages)

  • KRP Troubleshooting Commands on Microsoft Windows CMD:

C:\ ping "destination-IPv4-address"
C:\ ping6 "destination-IPv6-address"

C:\ tracert "destination-IPv4-address"
C:\ tracert6 "destination-IPv6-address"


Author:
Khaled Omar
Founder and CEO at The Road
29th of March, 2017
6th of October City, Giza, Egypt
+201003620284
@The_Road_Series
@Eng_Khaled_Omar
Copyright (c) reserved for the Author

Comments