BGP OSPF Questions: Difference between revisions

Line 390:
= MPLS =
 
* Labels are locally significant between two attached devices .Once the mpls ip is enabled lables are advertised for connected interfaces and IGP learned routes.
* MPLS label - 32 bit
First 20 bits label value
20-22 - Experimental bits for qos
23 - BoS - bottom of stack bit to signify the bottom label in stack
24-32 - TTL vaule
 
* MPLS label is placed between layer 2 and lyer 3 header know as shim headder.
Labels are locally significant between two attached devices .Once the mpls ip is enabled lables are advertised for connected interfaces and IGP learned routes.
* FEC-group or flow of packets that are forwaded along the same path with same treatment.
* Protocol used to distribute labels are LDP, TDP and RSVP TDP is cisco propriatry. There is formation of LIB which contains local binding and remote binding from all the LSR, what extacly the remote binding need to be used based on best route in Ip routing table information is populated in LFIB.
 
* LDP is used for neighbour discovery over udp port 646 on multicast address 224.0.0.2
* For neighbor adjancy on tcp port 646.
* Label advertisemnt is for IGP connected interfaces and IGP leanred routes.
* How does router determine wheather it is ip packet or labeled - there is protocol field is layer 2 frame ,that tell router to look the cef for ip packet or to look LFIB.
* In order to see extract from LFIB:
sh mpls forwading-table
 
* LFIB can be also seen as:
MPLS label -32 bit ,first 20 bits label value .20-22 -experimental bits for qos ,23 -BoS(bottom of stack bit to signify the bottom label in stack ,24-32 (TTL vaule )
sh mpls forwading-table prefix length
 
* MPLS Stack operatios (Push, pop, swap, Untagged, aggregate - summaristion is performed on router, to remove the lable and perform IP lookup)
MPLS label is palced between layer 2 and lyer 3 header know as shim headder.
* Labels 0 to 15 are reserved lables - lable 0 is explict null lable, lable 3 is implict null lable, label 1 router alert, label 14 OAM alert label
* Use of Implict null lable is penultimate hop popping.
* Explict null lable is used to reserve the Qos information.
* Inorder to change the mpls lable range - mpls lable range 16 to 10 lakh
 
* MPLS LDP works on UDP protocol 646 and LDP hello messages are sent over multicast address 224.0.0.2
FEC-group or flow of packets that are forwaded along the same path with same treatment.
* Inroder to check labels are received or not - sh mpls ldp discovery detail
x
Protocol used to distribute labels are LDP ,TDP and RSVP TDP is cisco propriatry.there is formation of LIB which contains local binding and remote binding from all the LSR,what extacly the remote binding need to be used based on best route in Ip routing table information is populated in LFIB.
 
* COMMAND LINES FOR MPLS:
LDP is used for neighbour discovery over udp port 646 on multicast address 224.0.0.2
 
IP CEF
for neighbor adjancy on tcp port 646 .
MPLS LABEL PROTOCOL TDP / LDP
MPLS IP
SH MPLS LDP INTERFACE
sh MPlS LDP NEIGHBOR
sh MPLS FORWADING TABLE SIMMILAR TO sH IP ROUTE.
 
* PHP - Penultimate Hope Popping which says that device next to last hop in the path is going to remove the label for the optimisation of lable lookup so that end device doesnot need to perform two looks while sending the traffic to end customer.
Label advertisemnt is for IGP connected interfaces and IGP leanred routes .
* So to acomplish this router which is next to last hop send implicit null label for all its connected and loopbackinterfaces.
* Note for any destination which is one hop away in mpls forwading tabel we are going to see POP LABEL.
 
* P routers in the core doesnot need to know the full reachbilty of customer routing information as they just swicthed the packets based on labels.
How does router determine wheather it is ip packet or labeled - there is protocol field is layer 2 frame ,that tell router to look the cef for ip packet or to look LFIB.
* FOR MPLS to work correctly we need to enable BGP next hop self command for the EBGP updates to propagate over IBGP PEER with next hop information for loopback interface. If the BGP peering is formed not over loopbacks between PE'sinstead of phyical interfaces peerring will be formed but it will lead to black hole as the pHP will cause third last hop to perform POP operation and traffic will be forwared to next to last hop as ip packet for which it doesnt have information for the destination.
* The isssue is PHP get processed one hop too soon.
 
* MPLS basis consist of two comonents
Inorder to see extract from LFIB- sh mpls forwading-table
1) VRF's -separatation of customer routing information using vrf's per interface
2) exchange of routing information using MP-BGP.
 
* VRF's without MPLS is called VRF lite. When using VRF's lite route distingusiher is only locally significant.
LFIB can be also seen as - sh mpls forwading-table prefix length
* When we create VRF's any packet that comes to interface in VRF then the routing loopkup is done on that VRF's.
 
* VNPV4 route- RD+IPV4 prefix (makes vpnv4 routes unique globly (RD is 8 byte).
MPLS Stack operatios (Push ,pop,swap,Untagged ,aggregate- summaristion is performed on router ,to remove the lable and perform IP lookup,)
* mpls vpn label - PE route exchange lable for each customer route via VPNV4.
* Transport label- to tranport packet across remote PE.
 
* RT_route target is used to tell the PE which VRF route belongs and its BGP extented community attribute.
labels 0 to 15 are reserved lables - lable 0 is explict null lable ,lable 3 is implict null lable ,label 1 router alert, label 14 OAM alert label
* If we are running EIGRP over VRF's then we need to specify the autonomus system inside the vrf's separately else EIGRP adjancy will not be formed over EIGRP.
 
* Route Target export- to advertise the routes from vrf into BGP.
Use of Implict null lable is penultimate hop popping.
* Route Target import -To import the routes from BGP into VRF.
* Between the PE's routers peering will be done globaly however customer routes will be redistributed in address-famil vpnv4.
* Please note while configuring vpnv4 we need to acitivate the vpnv4 capabilty with remote-peers.
* loop prevention mechanism for route-target - the route will not import any prefix into vrf unless it is specified.
* Packet structure:
Layer2 header-Transport+VPN--IP header-Layer4 header----Payload
 
* So when the traffic reaches from remote PE to PE on other side it will just refer to VPN label to see which exitinterface or VRF packet belongs too.
* Steps for MPLS once basic connectvity and MPLS is enabled on interface in MPLS n/w
1. Create VRF with route distingusiher+RT
2. Assign VRF to interfaces
3. RUN VRF aware routing process betweem PE to CE
4. ESTABLISH VPNV4 PEERS
5. Redistriute subnet from VRF to BGP and vice versa.
 
* SHAM links are basically creation of Virtual links between PE running BGP network and extending OSPF domain over mpls.
Explict null lable is used to reserve the Qos information .
* When we are running OSPF between PE to CE and rediribute ospf routes into bGP and vice versa there is addtion ospf attibutes that is attached in BGP VPNV4 routes.
* So on other PE sidte when this routes are rediributed back from BGP to ospf these attributes helps where the redisributes routes to place in OSPF database as type 1,2,3,4,or 5.
 
* Additional attributed encoded from OSPF to BGP is like expample ( OSPF domain id ) which is created by the the local process id running if the ospf process id is same as doamin id in VPNV4 prefix, the routes are injected in OPSF database as Type 3 LSA even if they are redistributed from BGP to OSPF.
Inorder to change the mpls lable range - mpls lable range 16 to 10 lakh
* If the domain id do not match the routes are leanred as type 5 for other vpn site.
 
* So if we have backdoor link between two sites, backdoor link is always perfered instead of MPLS, so to avoid it we create a SHAM links over PE's like GRE tunnel to extend the OSPF domain over MPLS. So when the routes are reditrbuted from BGP to OSPF as Intra-area routes rather than inter-area.
 
* How to create SHAM links
MPLS lDP works on UDP protocol 646 and LDP hello messages are sent over multicast address 224.0.0.2
1. Allocate a address between the PE's reachable over mpls
Inroder to check labels are received or not - sh mpls ldp discovery detail
2. under OSPF for that VRf create adjancy over PE's
 
router osps 1 vrf c
area 0 shamlink source address destination address
 
* OSPF path selection creteria - if we have two routes learned as Inter area routes but one of route is leanred BY ABR in backbone area and other via ABR in over non backbone area, prefix is always preferd by backbone area.
 
* Loop prevention mechanism for OSPF changes when its being used as Layer 3 MPLS.
cOMMAND LINES FOR MPLS `
* Using OSPF Between PE/CE customer routes are sent as Type 3 LSA so this sent as DN(down) bit set so if the same route is recieved BY PE on other side it will make PE aware not to redistibute the route back in BGP.
 
* Cabailty VRF lite command under OSPF process is used to ignore down bit and TyPE 3 lSA will not installed in routing table.
1. IP CEF
* For Type 5 LSA either we need to do with DOWN bit or route TAG to prevent the loop.
2. MPLS LABEL PROTOCOL TDP / LDP
3. MPLS IP
 
SH MPLS LDP INTERFACE
sh MPlS LDP NEIGHBOR
sh MPLS FORWADING TABLE SIMMILAR TO sH IP ROUTE.
 
 
 
 
php-Penultimate Hope Popping which says that device next to last hop in the path is going to remove the label for the optimisation of lable lookup so that end device doesnot need to perform two looks while sending the traffic to end customer .
 
so to acomplish this router which is next to last hop send implicit null label for all its connected and loopbackinterfaces .
 
Note for any destination which is one hop away in mpls forwading tabel we are going to see POP LABEL.
 
 
P routers in the core doesnot need to know the full reachbilty of customer routing information as they just swicthed the packets based on labels .
 
 
FOR MPLS to work correctly we need to enable BGP next hop self command for the EBGP updates to propagate over IBGP PEER with next hop information for loopback interface .if the BGP peering is formed not over loopbacks between PE'sinstead of phyical interfaces peerring will be formed but it will lead to black hole as the pHP will cause third last hop to perform POP operation and traffic will be forwared to next to last hop as ip packet for which it doesnt have information for the destination.
the isssue is PHP get processed one hop too soon.
 
 
MPLS basis consist of two comonents
1) VRF's -separatation of customer routing information using vrf's per interface
2)exchange of routing information using MP-BGP.
 
 
VRF's without MPLS is called VRF lite .when using VRF's lite route distingusiher is only locally significant.
 
when we create VRF's any packet that comes to interface in VRF then the routing loopkup is done on that VRF's .
 
 
VNPV4 route- RD+IPV4 prefix (makes vpnv4 routes unique globly.(RD is 8 byte)
 
mpls vpn label - PE route exchange lable for each customer route via VPNV4.
 
Transport label- to tranport packet across remote PE.
 
RT_route traget is used to tell the PE which VRF route belongs and its BGP extented community attribute.
 
 
if we are running EIGRP over VRF's then we need to specify the autonomus system inside the vrf's separately else EIGRP adjancy will not be formed over EIGRP.
 
Route Target export- to advertise the routes from vrf into BGP .
 
Route Target import -To import the routes from BGP into VRF.
 
Between the PE's routers peering will be done globaly however customer routes will be redistributed in address-famil vpnv4 .
 
Please note while configuring vpnv4 we need to acitivate the vpnv4 capabilty with remote-peers.
 
loop prevention mechanism for route-target -the route will not import any prefix into vrf unless it is specified .
 
packet structure- Layer2 header-Transport+VPN--IP header-LAyer4 header----PAyload
 
So when the traffic reaches from remote PE to PE on other side it will just refer to VPN label to see which exitinterface or VRF packet belongs too.
 
 
Steps for MPLS once basic connectvity and MPLS is enabled on interface in MPLS n/w
 
1. create VRF with route distingusiher+RT
 
2. Assign VRF to interfaces
 
3. RUN VRF aware routing process betweem PE to CE
 
4. ESTABLISH VPNV4 PEERS
 
5. Redistriute subnet from VRF to BGP and vice versa..
 
 
SHAM links are basically creation of Virtual links between PE running BGP network and extending OSPF domain over mpls .
 
When we are running OSPF between PEto CE and rediribute ospf routes into bGP and vice versa there is addtion ospf attibutes that is attached in BGP VPNV4 routes.
so on other PE sidte when this routes are rediributed back from BGP to ospf these attributes helps where the redisributes routes to place in OSPF database as type 1,2 ,3,4,or 5.
 
Additionl attributed encoded from OSPF to BGP is like expample ( OSPF domain id ) which is created by the the local process id running if the ospf process id is same as doamin id in VPNV4 prefix ,the routes are injected in OPSF database as Type 3 LSA even if they are redistributed from BGP to OSPF.
if the domain id do not match the routes are leanred as type 5 for other vpn site .
 
So if we have backdoor link between two sites ,backdoor link is always perfered instead of MPLS,so to avoid it we create a SHAM links over PE's like GRE tunnel to extend the OSPF domain over MPLS.so when the routes are reditrbuted from BGP to OSPF as Intraarea routes rather than interarea.
 
How to create SHAM links .
 
1. Allocate a address between the PE's reachable over mpls
 
2. under OSPF for that VRf create adjancy over PE's
 
router osps 1 vrf c
area 0 shamlink source address destination address
 
OSPF path selection creteria -if we have two routes learned as Inter area routes but one of route is leanred BY ABR in backbone area and other via ABR in over non backbone area ,prefix is always preferd by backbone area.
 
Loop prevention mechanism for OSPF changes when its being used as Layer 3 MPLS.
 
Using OSPF Between PE/CE customer routes are sent as Type 3 LSA so this sent as DN(down) bit set so if the same route is recieved BY PE on other side it will make PE aware not to redistibute the route back in BGP.
 
Cabailty VRF lite command under OSPF process is used to ignore down bit and TyPE 3 lSA will not installed in routing table .
 
FOr Type 5 LSA either we need to do with DOWN bit or route TAG to prevent the loop.
 
 
= Switching =