Wednesday, 13 March 2019

BGP AS Path Prepending


AS Path is the fourth BGP attribute, and AS Path is a well-known, mandatory attribute. BGP prefers the shortest AS path to get to the destination. In other words, a path with the shortest AS path list is more desirable.




You can manipulate this by using AS path prepending. Manual manipulation of AS path length is called AS path prepending.  The AS path should be extended with multiple copies of the AS number of the sender.

AS path prepending is used to:
1.      

  1.             Ensure proper return path selection.
  2.        .    Distribution of the traffic load for multi-homed customers.


Results of AS path prepending can be observed on the receiving router.
let see the configuration :-

Topology:


Goal:

  • configure the topology as per the diagram and assign the IP address as per the topology.
  • configure IBGP and EBGP.
  • configure AS 650014 to ensure that all routes in AS 650014 should exit router_1 to reach AS 650003 (30.0.0.0) prefix.
  • configure AS 650014 to ensure that the traffic from 30.0.0.0 to 10.0.0.0 return traffic should use the same path as forwarding traffic routers_1_2_3.



R1#show ip interface brief

Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        10.1.1.1        YES manual up                    up
Serial3/0                    1.1.1.1         YES manual up                    up
Serial3/3                    4.1.1.2         YES manual up                    up
Loopback0               11.0.0.1        YES manual up                    up


R2#show ip interface brief

Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        20.1.1.1        YES manual up                    up
Serial3/0                    1.1.1.2         YES manual up                    up
Serial3/1                    2.1.1.1         YES manual up                    up
Loopback0               12.0.0.1        YES manual up                    up


R3#show ip interface brief


Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        30.1.1.1        YES manual up                    up
Serial3/1                    2.1.1.2         YES manual up                    up
Serial3/2                    3.1.1.1         YES manual up                    up
Loopback0               13.0.0.1        YES manual up                    up

R4#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        40.1.1.1        YES manual up                    up
Serial3/2                    3.1.1.2         YES manual up                    up
Serial3/3                    4.1.1.1         YES manual up                    up
Loopback0               14.0.0.1        YES manual up                    up




R1(config)#router bgp 650014
R1(config-router)#neighbor 4.1.1.1 remote-as 650014
R1(config-router)#neighbor 1.1.1.2 remote-as 650002
R1(config-router)#network 10.0.0.0
R1(config-router)#network 1.0.0.0
R1(config-router)#network 4.0.0.0
R1(config-router)#network 11.0.0.0 mask 255.255.255.0
R1(config-router)#exit

R2(config)#router bgp 650002
R2(config-router)#neighbor 1.1.1.1 remote-as 650014

*Mar 13 12:23:30.111: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up

R2(config-router)#neighbor 2.1.1.2 remote-as 650003
R2(config-router)#network 20.0.0.0
R2(config-router)#network 1.0.0.0
R2(config-router)#network 2.0.0.0
R2(config-router)#network 12.0.0.0 mask 255.255.255.0
R2(config-router)#exit

R3(config)#router bgp 650003
R3(config-router)#neighbor 2.1.1.1 remote-as 650002

*Mar 13 12:25:42.495: %BGP-5-ADJCHANGE: neighbor 2.1.1.1 Up

R3(config-router)#neighbor 3.1.1.2 remote-as 650014
R3(config-router)#network 30.0.0.0
R3(config-router)#network 3.0.0.0
R3(config-router)#network 2.0.0.0
R3(config-router)#network 13.0.0.0 mask 255.255.255.0
R3(config-router)#exit

R4(config)#router bgp 650014
R4(config-router)#neighbor 3.1.1.1 remote-as 650003

*Mar 13 12:27:46.807: %BGP-5-ADJCHANGE: neighbor 3.1.1.1 Up

R4(config-router)#neighbor 4.1.1.2 remote-as 650014

*Mar 13 12:28:10.663: %BGP-5-ADJCHANGE: neighbor 4.1.1.2 Up

R4(config-router)#network 40.0.0.0
R4(config-router)#network 4.0.0.0
R4(config-router)#network 3.0.0.0
R4(config-router)#network 14.0.0.0 mask 255.255.255.0
R4(config-router)#exit

R1#show ip bgp summary
BGP router identifier 11.0.0.1, local AS number 650014
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.2         4       650002      14      16       21    0    0 00:08:00        7
4.1.1.1         4       650014      14      13       21    0    0 00:03:19        7

R2#show ip bgp summary
BGP router identifier 12.0.0.1, local AS number 650002
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
1.1.1.1         4       650014      17      15       14    0    0 00:09:06        9
2.1.1.2         4       650003      12      15       14    0    0 00:06:54        9

R3#show ip bgp summary
BGP router identifier 13.0.0.1, local AS number 650003
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
2.1.1.1         4       650002      16      13       18    0    0 00:07:58        9
3.1.1.2         4       650014      12      16       18    0    0 00:05:54        9

R4#sh ip bgp summary
BGP router identifier 14.0.0.1, local AS number 650014
Neighbor        V           AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd
3.1.1.1         4       650003      17      12       18    0    0 00:06:20        7
4.1.1.2         4       650014      15      17       18    0    0 00:05:56        7

R3#show ip bgp
BGP table version is 18, local router ID is 13.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *   1.0.0.0          3.1.1.2                                0 650014 i
 *>                   2.1.1.1                  0             0 650002 i
 *>  2.0.0.0          0.0.0.0                  0         32768 i
 *                    2.1.1.1                  0             0 650002 i
 *   3.0.0.0          3.1.1.2                  0             0 650014 i
 *>                   0.0.0.0                  0         32768 i
 *>  4.0.0.0          3.1.1.2                  0             0 650014 i
 *                    2.1.1.1                                0 650002 650014 i
 *>  10.0.0.0         3.1.1.2                                0 650014 i
 *                    2.1.1.1                                0 650002 650014 i
 *>  11.0.0.0/24      3.1.1.2                                0 650014 i
 *                    2.1.1.1                                0 650002 650014 i
 *   12.0.0.0/24      3.1.1.2                                0 650014 650002 i
 *>                   2.1.1.1                  0             0 650002 i
     Network          Next Hop            Metric LocPrf Weight Path
 *>  13.0.0.0/24      0.0.0.0                  0         32768 i
 *   14.0.0.0/24      2.1.1.1                                0 650002 650014 i
 *>                   3.1.1.2                  0             0 650014 i
 *   20.0.0.0         3.1.1.2                                0 650014 650002 i
 *>                   2.1.1.1                  0             0 650002 i
 *>  30.0.0.0         0.0.0.0                  0         32768 i
 *>  40.0.0.0         3.1.1.2                  0             0 650014 i
 *                    2.1.1.1                                0 650002 650014 i

R1#show ip bgp
BGP table version is 21, local router ID is 11.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *   1.0.0.0          1.1.1.2                  0             0 650002 i
 *>                   0.0.0.0                  0         32768 i
 * i 2.0.0.0          3.1.1.1                  0    100      0 650003 i
 *>                   1.1.1.2                  0             0 650002 i
 *>i 3.0.0.0          4.1.1.1                  0    100      0 i
 *                    1.1.1.2                                0 650002 650003 i
 * i 4.0.0.0          4.1.1.1                  0    100      0 i
 *>                   0.0.0.0                  0         32768 i
 *>  10.0.0.0         0.0.0.0                  0         32768 i
 *>  11.0.0.0/24      0.0.0.0                  0         32768 i
 *>  12.0.0.0/24      1.1.1.2                  0             0 650002 i
 *>i 13.0.0.0/24      3.1.1.1                  0    100      0 650003 i
 *                    1.1.1.2                                0 650002 650003 i
 *>i 14.0.0.0/24      4.1.1.1                  0    100      0 i
     Network          Next Hop            Metric LocPrf Weight Path
 *>  20.0.0.0         1.1.1.2                  0             0 650002 i
 *>i 30.0.0.0         3.1.1.1                  0    100      0 650003 i
 *                    1.1.1.2                                0 650002 650003 i
 *>i 40.0.0.0         4.1.1.1                  0    100      0 i

R1#show ip bgp 30.1.1.1
BGP routing table entry for 30.0.0.0/8, version 20
Paths: (2 available, best #1, table default)
  Advertised to update-groups:
     1
  Refresh Epoch 1
  650003
    3.1.1.1 from 4.1.1.1 (14.0.0.1)
      Origin IGP, metric 0, localpref 100, valid, internal, best
      rx pathid: 0, tx pathid: 0x0
  Refresh Epoch 1
  650002 650003
    1.1.1.2 from 1.1.1.2 (12.0.0.1)
      Origin IGP, localpref 100, valid, external
      rx pathid: 0, tx pathid: 0

 ( by default AS_650014 EXIT VIA R4 to reach AS 650003 route (30.0.0.0) prefix because of shortest AS-PATH)


R1(config)# access-list 10 permit 30.0.0.0 0.255.255.255

R1(config)#route-map cisco permit 10
R1(config-route-map)#match ip address 10
R1(config-route-map)#set local-preference 300
R1(config-route-map)#exit

R1(config)#route-map cisco permit 20
R1(config-route-map)#exit


R1#show ip bgp 30.1.1.1
BGP routing table entry for 30.0.0.0/8, version 22
Paths: (1 available, best #1, table default)
  Advertised to update-groups:
     2
  Refresh Epoch 2
  650002 650003
    1.1.1.2 from 1.1.1.2 (12.0.0.1)
      Origin IGP, localpref 300, valid, external, best
      rx pathid: 0, tx pathid: 0x0

                                               ( now configure return traffic)

R3#show ip bgp
BGP table version is 18, local router ID is 13.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *   1.0.0.0          3.1.1.2                                0 650014 i
 *>                   2.1.1.1                  0             0 650002 i
 *>  2.0.0.0          0.0.0.0                  0         32768 i
 *                    2.1.1.1                  0             0 650002 i
 *   3.0.0.0          3.1.1.2                  0             0 650014 i
 *>                   0.0.0.0                  0         32768 i
 *>  4.0.0.0          3.1.1.2                  0             0 650014 i
 *                    2.1.1.1                                0 650002 650014 i
 *>  10.0.0.0         3.1.1.2                                0 650014 i
 *                    2.1.1.1                                0 650002 650014 i
 *>  11.0.0.0/24      3.1.1.2                                0 650014 i
 *                    2.1.1.1                                0 650002 650014 i
 *   12.0.0.0/24      3.1.1.2                                0 650014 650002 i
 *>                   2.1.1.1                  0             0 650002 i
     Network          Next Hop            Metric LocPrf Weight Path
 *>  13.0.0.0/24      0.0.0.0                  0         32768 i
 *   14.0.0.0/24      2.1.1.1                                0 650002 650014 i
 *>                   3.1.1.2                  0             0 650014 i
 *   20.0.0.0         3.1.1.2                                0 650014 650002 i
 *>                   2.1.1.1                  0             0 650002 i
 *>  30.0.0.0         0.0.0.0                  0         32768 i
 *>  40.0.0.0         3.1.1.2                  0             0 650014 i
 *                    2.1.1.1                                0 650002 650014 i

R3#show ip bgp 10.1.1.1
BGP routing table entry for 10.0.0.0/8, version 13
Paths: (2 available, best #1, table default)
  Advertised to update-groups:
     1
  Refresh Epoch 1
  650014
    3.1.1.2 from 3.1.1.2 (14.0.0.1)
      Origin IGP, localpref 100, valid, external, best
      rx pathid: 0, tx pathid: 0x0
  Refresh Epoch 2
  650002 650014
    2.1.1.1 from 2.1.1.1 (12.0.0.1)
      Origin IGP, localpref 100, valid, external
      rx pathid: 0, tx pathid: 0

R4(config)#access-list 10 permit 10.0.0.0 0.255.255.255

R4(config)#route-map cisco permit 10
R4(config-route-map)#match ip address 10
R4(config-route-map)#set as-path prepend 650014 650014 650014 650014
R4(config-route-map)#exit

R4(config)#route-map cisco permit 20
R4(config-route-map)#exit

R4(config)#router bgp 650014
R4(config-router)#nei
R4(config-router)#neighbor 3.1.1.1 rou
R4(config-router)#neighbor 3.1.1.1 route-m
R4(config-router)#neighbor 3.1.1.1 route-map cisco out
R4(config-router)#end

R3#show ip bgp
BGP table version is 19, local router ID is 13.0.0.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *   1.0.0.0          3.1.1.2                                0 650014 i
 *>                   2.1.1.1                  0             0 650002 i
 *>  2.0.0.0          0.0.0.0                  0         32768 i
 *                    2.1.1.1                  0             0 650002 i
 *   3.0.0.0          3.1.1.2                  0             0 650014 i
 *>                   0.0.0.0                  0         32768 i
 *>  4.0.0.0          3.1.1.2                  0             0 650014 i
 *                    2.1.1.1                                0 650002 650014 i
 *   10.0.0.0         3.1.1.2                                0 650014 650014 650014 650014 650014 i
 *>                   2.1.1.1                                0 650002 650014 i
 *>  11.0.0.0/24      3.1.1.2                                0 650014 i
 *                    2.1.1.1                                0 650002 650014 i
 *   12.0.0.0/24      3.1.1.2                                0 650014 650002 i
     Network          Next Hop            Metric LocPrf Weight Path
 *>                   2.1.1.1                  0             0 650002 i
 *>  13.0.0.0/24      0.0.0.0                  0         32768 i
 *   14.0.0.0/24      2.1.1.1                                0 650002 650014 i
 *>                   3.1.1.2                  0             0 650014 i
 *   20.0.0.0         3.1.1.2                                0 650014 650002 i
 *>                   2.1.1.1                  0             0 650002 i
 *>  30.0.0.0         0.0.0.0                  0         32768 i
 *>  40.0.0.0         3.1.1.2                  0             0 650014 i
 *                    2.1.1.1                                0 650002 650014 i

R3#show ip bgp 10.1.1.1
BGP routing table entry for 10.0.0.0/8, version 19
Paths: (2 available, best #2, table default)
  Advertised to update-groups:
     1
  Refresh Epoch 3
  650014 650014 650014 650014 650014
    3.1.1.2 from 3.1.1.2 (14.0.0.1)
      Origin IGP, localpref 100, valid, external
      rx pathid: 0, tx pathid: 0
  Refresh Epoch 3
  650002 650014
    2.1.1.1 from 2.1.1.1 (12.0.0.1)
      Origin IGP, localpref 100, valid, external, best
      rx pathid: 0, tx pathid: 0x0


R1#traceroute 30.1.1.1
Type escape sequence to abort.
Tracing the route to 30.1.1.1
VRF info: (vrf in name/id, vrf out name/id)
  1 1.1.1.2 52 msec 56 msec 28 msec
  2 2.1.1.2 [AS 650002] 120 msec 140 msec 176 msec

R3#traceroute 10.1.1.1
Type escape sequence to abort.
Tracing the route to 10.1.1.1
VRF info: (vrf in name/id, vrf out name/id)
  1 2.1.1.1 36 msec 44 msec 64 msec
  2 1.1.1.1 [AS 650002] 112 msec 92 msec 76 msec

Friday, 1 March 2019

BGP Route filtering methods


BGP Route filtering methods

 BGP updates can be controlled by using a number of different filtering methods. BGP updates can be filtered based on route information, path information, or on communities. All the methods will achieve the same results choosing one over the other depends on the specific network configuration.


 You might need to control exactly which routes are advertised or redistributed or which paths are chosen. Advertise only some specific routes to neighbors (for security reasons). Redistribute specific routes, preventing routing loops, and Path manipulation of some specific routes.

Changing metric and metric type for specific routes. Changing the administrative distance for specific routes with BGP controlling routes to be advertised to ISP. Control routes to get into routing table Policy-based routing.




lets see the methods of BGP route filtering:





Topology :


Goal: 


  • configure the topology as per the diagram. 
  • configure EBGP as per the topology and advertise directly connected interfaces
  • configure router 2 to block 30.1.1.1/8 networks. make sure router 2 do not install 30.1.1.1/8 network in its routing table.
  • configure distribution list in order to block 30.1.1.1/8 network.

R1#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        10.1.1.1        YES manual up                    up
Serial3/0                    1.1.1.1         YES manual up                    up
Serial3/3                    4.1.1.2         YES manual up                    up
Loopback0              11.0.0.1        YES manual up                    up
Loopback1              11.0.1.1        YES manual up                    up
Loopback2              11.0.2.1        YES manual up                    up
Loopback3              11.0.3.1        YES manual up                    up


R2#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        20.1.1.1        YES manual up                    up
Serial3/0                    1.1.1.2         YES manual up                    up
Serial3/1                    2.1.1.1         YES manual up                    up
Loopback0              12.0.0.1        YES manual up                    up
Loopback1              12.0.1.1        YES manual up                    up
Loopback2              12.0.2.1        YES manual up                    up
Loopback3              12.0.3.1        YES manual up                    up


R3#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        30.1.1.1        YES manual up                    up
Serial3/1                    2.1.1.2         YES manual up                    up
Serial3/2                    3.1.1.1         YES manual up                    up
Loopback0              13.0.0.1        YES manual up                    up
Loopback1              13.0.1.1        YES manual up                    up
Loopback2              13.0.2.1        YES manual up                    up
Loopback3              13.0.3.1        YES manual up                    up

R4#show ip interface brief
Interface              IP-Address      OK? Method Status                Protocol
FastEthernet0/0        40.1.1.1        YES manual up                    up
Serial3/2                    3.1.1.2         YES manual up                    up
Serial3/3                    4.1.1.1         YES manual up                    up
Loopback0              14.0.0.1        YES manual up                    up
Loopback1              14.0.1.1        YES manual up                    up
Loopback2              14.0.2.1        YES manual up                    up
Loopback3              14.0.3.1        YES manual up                    up


R1(config)#router bgp 650001
R1(config-router)#neighbor 1.1.1.2 remote-as 650002
R1(config-router)#neighbor 4.1.1.1 remote-as 650004
R1(config-router)#network 10.0.0.0
R1(config-router)#network 1.0.0.0
R1(config-router)#network 4.0.0.0
R1(config-router)#end

R2(config)#router bgp 650002
R2(config-router)#neighbor 1.1.1.1 remote-as 650001

*Mar  1 14:39:06.207: %BGP-5-ADJCHANGE: neighbor 1.1.1.1 Up

R2(config-router)#neighbor 2.1.1.2 remote-as 650003

*Mar  1 14:39:29.195: %BGP-5-ADJCHANGE: neighbor 2.1.1.2 Up

R2(config-router)#network 20.0.0.0
R2(config-router)#network 2.0.0.0
R2(config-router)#network 1.0.0.0
R2(config-router)#end

R3(config)#router bgp 650003
R3(config-router)#neighbor 2.1.1.1 remote-as 650002
R3(config-router)#neighbor 2.1.1. remote-as 650004

*Mar  1 14:34:49.651: %BGP-5-ADJCHANGE: neighbor 2.1.1.1 Up

R3(config-router)#neighbor 3.1.1.2 remote-as 650004
R3(config-router)#network 30.0.0.0
R3(config-router)#network 3.0.0.0
R3(config-router)#network 2.0.0.0
R3(config-router)#end


R4(config)#router bgp 650004
R4(config-router)#neighbor 3.1.1.1 remote-as 650003

*Mar  1 14:36:26.991: %BGP-5-ADJCHANGE: neighbor 3.1.1.1 Up

R4(config-router)#neighbor 4.1.1.2 remote-as 650001

*Mar  1 14:36:37.771: %BGP-5-ADJCHANGE: neighbor 4.1.1.2 Up

R4(config-router)#network 40.0.0.0
R4(config-router)#network 4.0.0.0
R4(config-router)#network 3.0.0.0
R4(config-router)#end

R1#show ip bgp
BGP table version is 16, local router ID is 11.0.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *   1.0.0.0          1.1.1.2                  0             0 650002 i
 *>                   0.0.0.0                  0         32768 i
 *>  2.0.0.0          1.1.1.2                  0             0 650002 i
 *                    4.1.1.1                                0 650004 650003 i
 *   3.0.0.0          1.1.1.2                                0 650002 650003 i
 *>                   4.1.1.1                  0             0 650004 i
 *>  4.0.0.0          0.0.0.0                  0         32768 i
 *>  10.0.0.0         0.0.0.0                  0         32768 i
 *>  20.0.0.0         1.1.1.2                  0             0 650002 i
 *   30.0.0.0         1.1.1.2                                0 650002 650003 i
 *>                   4.1.1.1                                0 650004 650003 i
 *>  40.0.0.0         4.1.1.1                  0             0 650004 i


R2#show ip bgp
BGP table version is 14, local router ID is 12.0.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.0.0.0          0.0.0.0                  0         32768 i
 *                    1.1.1.1                  0             0 650001 i
 *>  2.0.0.0          0.0.0.0                  0         32768 i
 *                    2.1.1.2                  0             0 650003 i
 *>  3.0.0.0          2.1.1.2                  0             0 650003 i
 *                    1.1.1.1                                0 650001 650004 i
 *   4.0.0.0          2.1.1.2                                0 650003 650004 650001 i
 *>                   1.1.1.1                  0             0 650001 i
 *   10.0.0.0         2.1.1.2                                0 650003 650004 650001 i
 *>                   1.1.1.1                  0             0 650001 i
 *>  20.0.0.0         0.0.0.0                  0         32768 i
 *>  30.0.0.0         2.1.1.2                  0             0 650003 i
     Network          Next Hop            Metric LocPrf Weight Path
 *                    1.1.1.1                                0 650001 650004 650003 i
 *   40.0.0.0         2.1.1.2                                0 650003 650004 i
 *>                   1.1.1.1                                0 650001 650004 i


R3#show ip bgp
BGP table version is 16, local router ID is 13.0.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *>  1.0.0.0          2.1.1.1                  0             0 650002 i
 *                    3.1.1.2                                0 650004 650001 i
 *   2.0.0.0          2.1.1.1                  0             0 650002 i
 *>                   0.0.0.0                  0         32768 i
 *   3.0.0.0          3.1.1.2                  0             0 650004 i
 *>                   0.0.0.0                  0         32768 i
 *   4.0.0.0          2.1.1.1                                0 650002 650001 i
 *>                   3.1.1.2                                0 650004 650001 i
 *   10.0.0.0         2.1.1.1                                0 650002 650001 i
 *>                   3.1.1.2                                0 650004 650001 i
 *   20.0.0.0         3.1.1.2                                0 650004 650001 650002 i
 *>                   2.1.1.1                  0             0 650002 i
 *>  30.0.0.0         0.0.0.0                  0         32768 i
     Network          Next Hop            Metric LocPrf Weight Path
 *   40.0.0.0         2.1.1.1                                0 650002 650001 650004 i
 *>                   3.1.1.2                  0             0 650004 i

R4#show ip bgp
BGP table version is 15, local router ID is 14.0.3.1
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale, m multipath, b backup-path, f RT-Filter,
              x best-external, a additional-path, c RIB-compressed,
Origin codes: i - IGP, e - EGP, ? - incomplete
RPKI validation codes: V valid, I invalid, N Not found

     Network          Next Hop            Metric LocPrf Weight Path
 *   1.0.0.0          3.1.1.1                                0 650003 650002 i
 *>                   4.1.1.2                  0             0 650001 i
 *   2.0.0.0          4.1.1.2                                0 650001 650002 i
 *>                   3.1.1.1                  0             0 650003 i
 *>  3.0.0.0          0.0.0.0                  0         32768 i
 *                    3.1.1.1                  0             0 650003 i
 *>  4.0.0.0          4.1.1.2                  0             0 650001 i
 *>  10.0.0.0         4.1.1.2                  0             0 650001 i
 *   20.0.0.0         3.1.1.1                                0 650003 650002 i
 *>                   4.1.1.2                                0 650001 650002 i
 *>  30.0.0.0         3.1.1.1                  0             0 650003 i
 *>  40.0.0.0         0.0.0.0                  0         32768 i

R2#show ip bgp 30.1.1.1
BGP routing table entry for 30.0.0.0/8, version 9
Paths: (2 available, best #1, table default)
  Advertised to update-groups:
     1
  Refresh Epoch 2
  650003
    2.1.1.2 from 2.1.1.2 (13.0.3.1)
      Origin IGP, metric 0, localpref 100, valid, external, best
      rx pathid: 0, tx pathid: 0x0
  Refresh Epoch 2
  650001 650004 650003
    1.1.1.1 from 1.1.1.1 (11.0.3.1)
      Origin IGP, localpref 100, valid, external
      rx pathid: 0, tx pathid: 0

(we are going block 30.1.1.1/8 network by using distribution list)

R2(config)#access-list 30 deny 30.1.1.1 0.255.255.255
R2(config)#access-list 30 permit any
R2(config)#exit

R2(config)#router bgp 650002
R2(config-router)#neighbor 2.1.1.2 distribute-list 30 in
R2(config-router)#neighbor 1.1.1.1 distribute-list 30 in
R2(config-router)#end

R2#clear ip bgp * soft

R2#show ip bgp 30.1.1.1
% Network not in table

Thursday, 7 February 2019

Introduction Quality of Service

Quality of Service (QOS)


Quality of Service (QOS) help us to queue, limit, filter and make reservations for our network traffic. In QOS series you will find a variety of QoS topics.



lets see some converged issues.






  • Packet loss 
  • Delay
  • Jitter
1.Packet loss

Tail drop occur when the output queues is full. tail drops are common and happen when a link is congested. Now here is question comes what is the impact  of packet loss?. voice breaking up during phone calls, in Teleconferencing voice will not synchronized and picture become very jerky, file corrupted and so on.



2.Delay is the time to takes for a packet to get from the source to the destination, this is something called the one-way delay. The time it takes to get from a source to the destination and back to the source is called the round-trip delay

Here is types of delay:




  1. processing delay: the time it take for a router to take the packet from an input interface, examine it and put it into the output queue of the output interface.
  2. queuing delay: the time a packet resides in the output of a router.
  3. serializing delay the time it take place the "bits on the wire".
  4. propagation delay: the time it takes for the packet to cross the link from one end to the other

3.Jitter is the variation of one-way delay in a stream of packets. jitter is generally caused by congestion in the IP network. the congestion can occur either at the router interface or in a provider or carrier network in the circuit has no been provisioned correctly.


QOS Mechanisms 

  • Classification 
  • Marking 
  • Congestion management 
  • Congestion avoidance 
  • Policing 
  • Shaping 
Classification and Marking supported by a class-oriented QOS mechanism used to mark packets based on classification metering or both. 



Marking, coloring each packet as a member of a network class so that the packet's class can be quickly recognized throughout the rest of the network.

Congestion management is used to prioritize the transmission of packets, with a queuing mechanism on each interface.

Congestion avoidance is used to drop packets early to avoid congestion later in the network

Policing is used to enforce a rate limit by dropping  or marking down packets.

Shaping is used to enforce a rate limit by delaying packets using buffers.




 


 


Instagram

Facebook


Twitter



LINKEDIN








What is BGP Allowas-in Feature? How to configure BGP Allowas-in? GNS3

  BGP Allowas-in is a configuration option in Border Gateway Protocol (BGP) routing that allows a router to accept routes with its own AS (A...