Tuesday, May 10, 2016

C-Vlan & S-Vlan







QinQ involves use multiple VLAN tags in an Ethernet header so that one VLAN ID can carry another 4096 VLAN IDs in a second tag. This makes a simple and useful tunnelling strategy.

The first/inner tag is the one set by the customer, and the second/outer tag would be set by the network. It’s common in the Service Provider industry 1 to refer to these as Customer VLAN and Service VLAN.

Thursday, April 28, 2016

Weight_Attribute (MED)



MED
1)configure normally

traceroute 4.4.4.4 sourece 5.5.5.5

R4
receives the traffic towards 4.4.4.0/24 from R1
and the traffic towards 44.44.44.0/24 from R2 when use MED

R4
ip prefix-list lo 0 seq 5 permit 4.4.4.0/24
ip prefix-list lo 1 seq 5 permit 44.44.44.0/24
route-map RETURN_TRAFFIC-R1 permit 10
match ip address prefix-list lo 1
set metric 300
route-map RETURN-TRAFFIC-R1 permit 999
route-map RETURN_TRAFFIC-R2 permit 10
match ip address prefix-list lo 0
set metric 300
route-map RETURN-TRAFFIC-R2 permit 999
router bgp 40
nei 10.1.14.1 route-map RETURN_TRAFFIC R1 out
nei 10.1.24.2 route-map RETURN_TRAFFIC R2 out

Weight_Attribute


R2
ip prefix-list CHANGE seq 5 permit 1.1.1.0/24
ip prefix-list CHANGE seq 10 permit 5.5.5.0/24
route-map SET_WEIGHT permit 10
match ip address prefix-list CHANGE
set weight 50

router bgp 20
nei 10.1.24.4 route-map SET_WEIGHT in

#sh ip bgp on R2 (for 1.1.1.0 & 5.5.5.0)

Local-Perference Attribute


1)
R1
router bgp 13
nei 10.1.13.3 soft-reconfiguration inbound

#sh ip bgp nei 10.1.13.3 received-route

2)
R4
add lo 1
ip add 44.44.44.44 255.255.255.0

router bgp 40
net 44.44.44.0 mask 255.255.255.0

3)
R3
access-list 1 permit 4.4.4.0
access-list 1 permit 44.44.44.0
route-map SET_LP permit 20
match ip address 1
set local-perference 200
route-map SET_LP permit 20
router bgp 13
nei 10.1.23.2 route-map SET_LP in

*change LP 100 to 200

BGP_Next_Hop_Self


BGP_LAB2
R1
router bgp 1
net    1.1.1.0 mask 255.255.255.0
nei    10.1.12.2 remote-as 23

R2
router bgp 23
net 2.2.2.0 mask 255.255.255.0
nei 10.1.12.1 remote-as 1
nei 10.1.23.3 remote-as 23
nei 10.1.23.3 next-hop-self

R3
router bgp 23
net    3.3.3.0 mask 255.255.255.0
nei    10.1.23.2 remote-as 23
nei    10.1.34.4 remote-as 4
nei    10.1.103.10 remote-as 10
nei    10.1.23.2 next-hop-self

R4
router bgp 4
net 4.4.4.0 mask 255.255.255.0
nei 10.1.34.3 remote-as 23
nei 10.1.45.5 remote-as 56

R5
router bgp 56
net 5.5.5.0 mask 255.255.255.0
nei 10.1.45.4 remote-as 4
nei 10.1.56.6 remote-as 56
nei 10.1.56.6 next-hop-self

R6
router bgp 56
net 6.6.6.0 mask 255.255.255.0
nei 10.1.56.5 remote-as 56
nei 10.1.56.5 next-hop-self
nei 10.1.67.7 remote-as 789
nei 10.1.116.11 remote-as 112

R7
router bgp 789
net 7.7.7.0 mask 255.255.255.0
nei 10.1.67.6 remote-as 56
nei 10.1.78.8 remote-as 789
nei 10.1.89.9 remote-as 789
nei 10.1.78.8 next-hop-self
nei 10.1.89.9 next-hop-self

R8
net 8.8.8.0 mask 255.255.255.0
nei 10.1.78.7 remote-as 789
nei 10.1.89.9 remote-as 789

R9
net 9.9.9.0 mask 255.255.255.0
nei 10.1.78.7 remote-as 789
nei 10.1.89.9 remote-as 789

R10
router bgp 10
net 10.10.10.0 mask 255.255.255.0
nei 10.1.103.3 remote-as 23

R11
router bgp 112
net 11.11.11.11 mask 255.255.255.0
nei 10.1.112.12 remote-as 112
nei 10.1.116.6 remote-as 56
nei 10.1.112.12 next-hop-self

R12
router 112
net 12.12.12.0 mask 255.255.255.0
nei 10.1.112.11 remote-as 112

BGP_Multihop(Load Balancing) (Lab 9)



BGP__Multihop

1)configure IP add:

R1
router ospf 1
net 10.1.12.0 0.0.0.255 a 0
net 10.1.21.0 0.0.0.255 a 0

int lo 0
ip ospf 1 a 0

router bgp 100
net 11.11.11.0 mask 255.255.255.0
nei 2.2.2.2 remote-as 200
nei 2.2.2.2 ebgp-multihop 2 (cause need to jump 2 hop)
nei 2.2.2.2 update-source lo 0

R2
router ospf 1
net 10.1.12.0 0.0.0.255 a 0
net 10.1.21.0 0.0.0.255 a 0

int lo 0
ip ospf 1 a 0

router bgp 200
net 22.22.22.0 mask 255.255.255.0
nei 1.1.1.1 remote-as 100
nei 1.1.1.1 ebgp-multihop 2
nei 1.1.1.1 update-source lo 0

Verify
*Ping each loopback add:
*ping 22.22.22.22 repeat 1000 from R1
and shutdown int f0/0 in R1 the connection will disconnect only one time

BGP_Maximum Hop (Load Balancing) (Lab 8)


BGP__Maximum Hop

1)Assign IP add: all interfaces

R1
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 1.1.1.0 mask 255.255.255.0
 neighbor 10.1.12.2 remote-as 200
 neighbor 10.1.13.3 remote-as 200
 maximum-paths 2
 no auto-summary


R2
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 network 2.2.2.0 mask 255.255.255.0
 neighbor 10.1.12.1 remote-as 100
 neighbor 10.1.23.3 remote-as 200
 neighbor 10.1.23.3 next-hop-self
 maximum-paths 2

R3
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 network 3.3.3.0 mask 255.255.255.0
 neighbor 10.1.13.1 remote-as 100
 neighbor 10.1.23.2 remote-as 200
 neighbor 10.1.23.2 next-hop-self
 maximum-paths 2 (cause every router have 2 paths)

-Have connection every loopback network
*Verify  "ping 1.1.1.1 source 2.2.2.2 repeat 1000" from R2 and shutdown int s0/0 in R1 then the connection will down & doesn’t know another path so we need to write "maximum-paths 2” in each every routers after all ping again the path will change another to another path

Before NHS
R1
 Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/24       0.0.0.0                  0         32768 i
*  2.2.2.0/24       10.1.13.3                              0 200 i
*>                  10.1.12.2                0             0 200 i
*  3.3.3.0/24       10.1.12.2                              0 200 i
*>                  10.1.13.3                0             0 200 i
R1(config-router)#


R2
   Network          Next Hop            Metric LocPrf Weight Path
* i1.1.1.0/24       10.1.13.1                0    100      0 100 i
*>                  10.1.12.1                0             0 100 i
*> 2.2.2.0/24       0.0.0.0                  0         32768 i
*>i3.3.3.0/24       10.1.23.3                0    100      0 i
R2(config-router)#

R3
  Network          Next Hop            Metric LocPrf Weight Path
* i1.1.1.0/24       10.1.12.1                0    100      0 100 i
*>                  10.1.13.1                0             0 100 i
*>i2.2.2.0/24       10.1.23.2                0    100      0 i
*> 3.3.3.0/24       0.0.0.0                  0         32768 i
R3(config-router)#

After NHS
R1
   Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/24       0.0.0.0                  0         32768 i
*  2.2.2.0/24       10.1.12.2                0             0 200 i
*>                  10.1.13.3                              0 200 i
*  3.3.3.0/24       10.1.12.2                              0 200 i
*>                  10.1.13.3                0             0 200 i
R1(config-if)#


R2
  Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/24       10.1.12.1                0             0 100 i
* i                 10.1.23.3                0    100      0 100 i
*> 2.2.2.0/24       0.0.0.0                  0         32768 i
*>i3.3.3.0/24       10.1.23.3                0    100      0 i
R2(config-router)#

R3
Network          Next Hop            Metric LocPrf Weight Path
* i1.1.1.0/24       10.1.23.2                0    100      0 100 i
*>                  10.1.13.1                0             0 100 i
*>i2.2.2.0/24       10.1.23.2                0    100      0 i
*> 3.3.3.0/24       0.0.0.0                  0         32768 i
R3(config-router)#

Before Maximum Path and After Maximum Path are same
R1
  Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/24       0.0.0.0                  0         32768 i
*> 2.2.2.0/24       10.1.13.3                              0 200 i
*> 3.3.3.0/24       10.1.13.3                0             0 200 i
R1(config-if)#

R2
 Network          Next Hop            Metric LocPrf Weight Path
*>i1.1.1.0/24       10.1.23.3                0    100      0 100 i
*> 2.2.2.0/24       0.0.0.0                  0         32768 i
*>i3.3.3.0/24       10.1.23.3                0    100      0 i
R2(config-if)#

R3
  Network          Next Hop            Metric LocPrf Weight Path
*> 1.1.1.0/24       10.1.13.1                0             0 100 i
*>i2.2.2.0/24       10.1.23.2                0    100      0 i
*> 3.3.3.0/24       0.0.0.0                  0         32768 i
R3(config-router)#


Before Maximum Path
R1
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     2.0.0.0/24 is subnetted, 1 subnets
B       2.2.2.0 [20/0] via 10.1.13.3, 00:07:07
     3.0.0.0/24 is subnetted, 1 subnets
B       3.3.3.0 [20/0] via 10.1.13.3, 00:14:07
     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.13.0 is directly connected, Serial0/1
C       10.1.12.0 is directly connected, Serial0/0
R1(config-if)#

R2
     1.0.0.0/24 is subnetted, 1 subnets
B       1.1.1.0 [20/0] via 10.1.12.1, 00:02:46
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     3.0.0.0/24 is subnetted, 1 subnets
B       3.3.3.0 [200/0] via 10.1.23.3, 00:15:08
     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.12.0 is directly connected, Serial1/0
C       10.1.23.0 is directly connected, FastEthernet0/0
R2(config)#

R3
     1.0.0.0/24 is subnetted, 1 subnets
B       1.1.1.0 [20/0] via 10.1.13.1, 00:14:22
     2.0.0.0/24 is subnetted, 1 subnets
B       2.2.2.0 [200/0] via 10.1.23.2, 00:14:22
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.13.0 is directly connected, Serial1/0
C       10.1.23.0 is directly connected, FastEthernet0/0
R3(config-router)#

After Maximum Path
R1
     1.0.0.0/24 is subnetted, 1 subnets
C       1.1.1.0 is directly connected, Loopback0
     2.0.0.0/24 is subnetted, 1 subnets
B       2.2.2.0 [20/0] via 10.1.13.3, 00:00:28
                [20/0] via 10.1.12.2, 00:00:28
     3.0.0.0/24 is subnetted, 1 subnets
B       3.3.3.0 [20/0] via 10.1.13.3, 00:00:28
                [20/0] via 10.1.12.2, 00:00:28
     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.13.0 is directly connected, Serial0/1
C       10.1.12.0 is directly connected, Serial0/0
R1(config-router)#

R2
     1.0.0.0/24 is subnetted, 1 subnets
B       1.1.1.0 [20/0] via 10.1.12.1, 00:05:03
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     3.0.0.0/24 is subnetted, 1 subnets
B       3.3.3.0 [200/0] via 10.1.23.3, 00:17:25
     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.12.0 is directly connected, Serial1/0
C       10.1.23.0 is directly connected, FastEthernet0/0
R2(config-router)#

R3
     1.0.0.0/24 is subnetted, 1 subnets
B       1.1.1.0 [20/0] via 10.1.13.1, 00:17:45
     2.0.0.0/24 is subnetted, 1 subnets
B       2.2.2.0 [200/0] via 10.1.23.2, 00:17:45
     3.0.0.0/24 is subnetted, 1 subnets
C       3.3.3.0 is directly connected, Loopback0
     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.13.0 is directly connected, Serial1/0
C       10.1.23.0 is directly connected, FastEthernet0/0
R3(config-router)#

BGP Confederation Lab 2 (Lab 15)


R1
router bgp 64512
net 1.1.1.0 mask 255.255.255.0
nei 10.1.12.2 remote-as 64513
nei 10.1.12.2 next-hop-self
nei 10.1.118.18 remote-as 18
bgp confederation identifier 142
bgp confederation peers 64513


R2
router bgp 64513
net 2.2.2.0 mask 255.255.255.0
neigh 10.1.12.1 remote-as 64512
neigh 10.1.12.1 next-hop-self
neigh 10.1.23.3 remote-as 64513
neigh 10.1.23.3 next-hop-self
bgp confederation identifier 142
bgp confederation peers 64512


R3
router bgp 64513
net 3.3.3.0 mask 255.255.255.0
neigh 10.1.23.2 remote-as 64513
neigh 10.1.23.2 next-hop-self
neigh 10.1.34.4 remote-as 64514
neigh 10.1.34.4 next-hop-self
neigh 10.1.35.5 remote-as 56
bgp confederation identifier 142
bgp confederation peers 64514


R4
router bgp 64514
net 4.4.4.0 mask 255.255.255.0
neigh 10.1.34.3 remote-as 64513
neigh 10.1.34.3 next-hop-self
neigh 10.1.154.15 remote-as 15
bgp confederation identifier 142
bgp confederation peers 64513


R18
router bgp 18
net 18.18.18.0 mask 255.255.255.0
neigh 10.1.118.1 remote-as 142

R15
router bgp 15
net 15.15.15.0 mask 255.255.255.0
neigh 10.1.154.4 remote-as 142

R5
router bgp 64515
net 5.5.5.0 mask 255.255.255.0
neigh 10.1.35.3 remote-as 142
neigh 10.1.175.17 remote-as 17
neigh 10.1.56.6 remote-as 64516
neigh 10.1.56.6 next-hop-self
neigh 10.1.67.7 remote-as 64517
neigh 10.1.67.7 next-hop-self
bgp confederation identifier 56
bgp confederation peers 64516


R6
router bgp 64516
net 6.6.6.0 mask 255.255.255.0
neigh 10.1.56.5 remote-as 64515
neigh 10.1.56.5 remote-as 64515
neigh 10.1.67.7 remote-as 64517
neigh 10.1.67.7 remote-as 64517
bgp confederation identifier 56
bgp confederation peers 64515 64517


R7
router bgp 64517
net 7.7.7.0 mask 255.255.255.0
neigh 10.1.67.6 remote-as 64516
neigh 10.1.67.6 next-hop-self
neigh 10.1.78.8 remote-as 64517
neigh 10.1.78.8 next-hop-self
neigh 10.1.56.5 remote-as 64515
neigh 10.1.56.5 next-hop-self
neigh 10.1.207.20 remote-as 20
bgp confederation identifier 56
bgp confederation peers 64516


R8
router bgp 64517
net 8.8.8.0 mask 255.255.255.0
nei 10.1.78.7 remote-as 64517
nei 10.1.78.7 next-hop-self
nei 10.1.89.9 remote-as 9
nei 10.1.168.16 remote-as 169
bgp confederation identifier 56


R9
router bgp 9
net 9.9.9.0 mask 255.255.255.0
nei 10.1.89.8 remote-as 56
nei 10.1.119.11 remote-as 34

R17
router bgp 17
net 17.17.17.0 mask 255.255.255.0
nei 10.1.175.5 remote-as 56

R20
router bgp 20
net 20.20.20.0 mask 255.255.255.0
neigh 10.1.207.7 remote-as 56
neigh 10.1.162.16 remote-as 169

R16
router bgp 64518
net 16.16.16.0 mask 255.255.255.0
nei 10.1.169.19 remote-as 64519
nei 10.1.169.19 next-hop-self
nei 10.1.162.20 remote-as 20
nei 10.1.168.8 remote-as 56
bgp confederation identifier 169
bgp confederation peers 64519


R19
router bgp 64519
net 19.19.19.0 mask 255.255.255.0
nei 10.1.169.16 remote-as 64518
nei 10.1.169.16 next-hop-self
nei 10.1.149.14 remote-as 34
bgp confederation identifier 169
bgp confederation peers 64518


R11
router bgp 64555
net 11.11.11.0 mask 255.255.255.0
neigh 10.1.101.10 remote-as 10
neigh 10.1.119.9 remote-as 9
neigh 10.1.112.12 remote-as 64520
neigh 10.1.112.12 next-hop-self
bgp confederation identifier 34
bgp confederation peers 64520


R12
router bgp 64520
net 12.12.12.0 mask 255.255.255.0
neigh 10.1.112.11 remote-as 64555
neigh 10.1.112.11 next-hop-self
neigh 10.1.132.13 remote-as 64521
neigh 10.1.132.13 next-hop-self
neigh 10.1.134.14 remote-as 64520
bgp confederation identifier 34
bgp confederation peers 64555 64521
ip route 10.1.134.0 255.255.255.0 10.1.132.13


R13
router bgp 64521
net 13.13.13.0 mask 255.255.255.0
neigh 10.1.132.12 remote-as 64520
neigh 10.1.134.14 remote-as 64520
neigh 10.1.134.14 next-hop-self
bgp confederation identifier 34
bgp confederation peers 64520


R14
router bgp 64520
net 14.14.14.0 mask 255.255.255.0
neigh 10.1.134.13 remote-as 64521
neigh 10.1.134.13 next-hop-self
neigh 10.1.132.12 remote-as 64520
neigh 10.1.149.19 remote-as 169
bgp confederation identifier 34
bgp confederation peers 64521
ip route 10.1.132.0 255.255.255.0 10.1.134.13


R10
router bgp 10
net 10.10.10.0 mask 255.255.255.0
nei 10.1.101.11 remote-as 34

BGP Confederation LAB 1



Step1
R1
router bgp 65511
net 1.1.1.0 mask 255.255.255.0
nei 10.1.12.2 remote-as 65522
nei  10.1.12.2 next-hop-self
nei 10.1.23.3 remote-as 65534
nei 10.1.23.3 next-hop-self
nei 10.1.15.5 remote-as 500
bgp confederation identifier 100
bgp confederation peers 65522

R2
router bgp 65522
net 2.2.2.0 mask 255.255.255.0
nei 10.1.12.1 remote-as 65511
neigh 10.1.12.1 next-hop-self
nei 10.1.23.3 remote-as 65534
neigh 10.1.23.3 next-hop-self
nei 10.1.26.6 remote-as 600
bgp confederation identifier 100
bgp confederation peers 65511
bgp confederation peers 65534

R3
router bgp 65534
net 3.3.3.0 mask 255.255.255.0
neigh 10.1.12.1 remote-as 65511
neigh 10.1.12.1 next-hop-self
nei 10.1.23.2 remote-as 65522
neigh 10.1.23.2 next-hop-self
nei 10.1.34.4 remote-as 65534
nei 10.1.34.4 next-hop-self
nei 10.1.38.8 remote-as 800
bgp confederation identifier 100
bgp confederation peers 65522

R4
router bgp 65534
net 4.4.4.0 mask 255.255.255.0
nei 10.1.34.3 remote-as 65534
nei 10.1.34.3 next-hop-self
nei 10.1.47.7 remote-as 700
bgp confederation identifier 100

R5
router bgp 500
net 5.5.5.0 mask 255.255.255.0
nei 10.1.15.1 remote-as 100

R6
router bgp 600
net 6.6.6.0 mask 255.255.255.0
nei 10.1.26.2 remote-as 100

R7
router bgp 700
net 7.7.7.0 mask 255.255.255.0
nei 10.1.47.4 remote-as 100

R8
router bgp 800
net 8.8.8.0 mask 255.255.255.0
nei 10.1.38.3 remote-as 100

*sh ip bgp summ
*sh ip bgp
*sh ip route

BGP Community Attribute LAB


BGP Community Attribute Lab 5

Questions :

1 - R1 such that when it advertises network 1.1.1.0/24 to R2 in AS 200, the network is not advertised to any of R2's iBGP or eBGP neighbors

2 - Configure R5 such that when it advertises its network 5.5.5.0/24 to R3 in AS 2300, the routers in AS 2300 do Not advertise that Network to any of their eBGP Peer's DO Not Configure R3 to accomplish this task

3 - Configure R3 in AS 2300 to advertise network 3.3.3.0/24 to the routers in its own AS Only, R3 Should Not Advertise this network to any of its eBGP peers

4 - R2 Should be Configured to advertise network 1.1.1.0/24 to all of its iBGP and eBGP peers. you should utilize a well known community attribute to accomplish this task.

" - Internet - if assigned to network, that network should be advertised.

- Local-as - if assigned to network, that network should ONLY be
advetised within that AS

- No-advertise - if assigned to network, that network should NOT be
advertised to any BGP Neighbor ( NOT adv to iBGP + eBGP )

- No-export - if assigned to network, that network should NOT be
advertised to an eBGP neighbor ( NOT adv to eBGP ) "

Best Regards,
Team RHC
====================================================
1)Assign IP add:
2)Configure bgp to get connection in each routers
R1
router bgp 100
net 1.1.1.0 mask 255.255.255.0
nei 10.1.12.2 remote-as 2300

R2
router bgp 2300
net 2.2.2.0 mask 255.255.255.0
nei 10.1.12.1 remote-as 100
nei 10.1.23.3 remote-as 2300
nei 10.1.23.3 next-hop-self
nei 10.1.24.4 remote-as 400

R3
router bgp 2300
net 3.3.3.0 mask 255.255.255.0
nei 10.1.23.2 remote-as 2300
nei 10.1.23.2 next-hop-self
nei 10.1.35.5 remote-as 500

R4
router bgp 400
net 4.4.4.0 mask 255.255.255.0
nei 10.1.24.2 remote-as 2300

R5
router bgp 500
net 5.5.5.0 mask 255.255.255.0
nei 10.1.35.3 remote-as 2300

*Can ping every loopback int with source interface
*See every loopback network


Question 1:
R1
access-list 1 permit 1.1.1.0 0.0.0.255
route-map TEST permit 10
match ip address 1
set community no-advertise
route-map TEST permit 100

router bgp 100
nei 10.1.12.2 route-map TEST out
nei 10.1.12.2 send-community
Verify configuration on R2
sh ip bgp 1.1.1.0
Verify configuration R3
sh ip bgp

*Check sh ip bgp 1.1.1.0 on R2
*Check sh ip bgp 1.1.1.0 on R3       

Question 2:
R5
access-list 1 permit 5.5.5.0
route-map TEST permit 10
match ip address 1
set community no export
route-map TEST permit 100


router bgp 500
nei 10.1.35.3 route-map TEST out
nei 10.1.35.3 send-community
Verify the config on R3
router bgp 2300
nei 10.1.23.2 send-community

R3
router bgp 2300
nei 10.1.23.2 send-community

Question 3:
R3
access-list 1 permit 3.3.3.0
route-map TEST permit 10
match ip address 1
set community local as
route-map TEST permit 100

router bgp 2300
net 3.3.3.0 mask 255.255.255.0 route-map TEST
nei 10.1.23.2 send-community
Verify the config on R3
sh ip bgp 3.3.3.0

R5
sh ip bgp

Question 4:
R2
access-list 1 permit 1.1.1.0
route-map TEST permit 10
match ip address 1
set community internet
route-map TEST permit 100

router bgp 2300
nei 10.1.12.1 route-map TEST in
Verify the config on R2
sh ip bgp 1.1.1.0
sh ip bgp on R4
sh ip bgp on R3

R1
#sh ip bgp nei 10.1.12.2
#sh ip bgp 2.2.2.0
#sh ip bp nei 10.1.12.2 received
#sh ip bp nei 10.1.12.2 received-routes
#sh ip bp nei 10.1.12.2 advertised-routes
====================================
You can set BGP communities in any point where you can use a route-map within BGP:

on routes you’re receiving from a neighbour with the neighbour route-map in router configuration command:

on routes you’re sending to a neighbour with the neighbour route-map out router configuration command:

on routes originated into BGP with the network route-map router configuration command:

on routes redistributed into BGP with the redistribute route-map router configuration command.

Using the community attribute configure R1 such that when it advertises network 1.0.0.0/24 to R2 in 2300, the network is not advertised is not advertised to any of R2’s iBGP or ebgp neighbours.

Configure R5 such that when it advertises its network 5.0.0.0/24 to R3, R3 does NOT advertise that network to any of its eBGP peers. Don’t configure R3 to accomplish this task.

Configure R3 in AS 2300 to advertise network 3.0.0.0/24 to the routers in its own AS Only, R3 shouldn’t advertise this network to any of its eBGP peers.

R1 is advertising network 1.0.0.0/24 which has an attached community attribute of “no advertise” to R2 (Task 2). Router R2 should be configured to advertise network 1.0.0.0/24 to all of its iBGP and eBGP peers. You should utilise a well known community attribute to accomplish this task.

BGP Backdoor


Configure BGP R1, R2 & R3
R1
router bgp 100
net 1.1.1.0 mask 255.255.255.0
neigh 10.1.12.2 remote-as 200
neigh 10.1.13.3 remote-as 300

R2
router bgp 200
net 2.2.2.0 mask 255.255.255.0
neigh 10.1.12.1 remote-as 100

R3
router bgp 300
net 3.3.3.0 mask 255.255.255.0
neigh 10.1.13.1 remote-as 100

Configure EIGRP Between R2 and R3
R2
router ei 100
net 22.22.22.0 mask 255.255.255.0
net 10.1.23.0 mask 255.255.255.0
no au

R3
router ei 100
net 33.33.33.0 mask 255.255.255.0
net 10.1.23.0 mask 255.255.255.0

Add lo1 to BGP on R2 & R3
R2
router bgp 200
net 22.22.22.0 mask 255.255.255.0

R3
router bgp 300
net 33.33.33.0 mask 255.255.255.0

After above configuration R2 use 10.1.12.0 link for 33.33.33.33

Before Backdoor R2 use 10.1.12.0 for 33.33.33.33 cause this link’s AD is 20, 10.1.23.0 link is EIGRP 90
R2#
     1.0.0.0/24 is subnetted, 1 subnets
B       1.1.1.0 [20/0] via 10.1.12.1, 00:02:07
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     33.0.0.0/24 is subnetted, 1 subnets
B       33.33.33.0 [20/0] via 10.1.12.1, 00:00:16
     3.0.0.0/24 is subnetted, 1 subnets
B       3.3.3.0 [20/0] via 10.1.12.1, 00:02:07
     22.0.0.0/24 is subnetted, 1 subnets
C       22.22.22.0 is directly connected, Loopback1
     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.12.0 is directly connected, Serial0/0
C       10.1.23.0 is directly connected, FastEthernet1/0


After Backdoor R2 use 10.1.23.3 for 33.33.33.33 even though AD 90 is higher than 20…
R2#
     1.0.0.0/24 is subnetted, 1 subnets
B       1.1.1.0 [20/0] via 10.1.12.1, 00:03:13
     2.0.0.0/24 is subnetted, 1 subnets
C       2.2.2.0 is directly connected, Loopback0
     33.0.0.0/24 is subnetted, 1 subnets
D       33.33.33.0 [90/156160] via 10.1.23.3, 00:00:25, FastEthernet1/0
     3.0.0.0/24 is subnetted, 1 subnets
B       3.3.3.0 [20/0] via 10.1.12.1, 00:03:13
     22.0.0.0/24 is subnetted, 1 subnets
C       22.22.22.0 is directly connected, Loopback1
     10.0.0.0/24 is subnetted, 2 subnets
C       10.1.12.0 is directly connected, Serial0/0
C       10.1.23.0 is directly connected, FastEthernet1/0

R2#tra 33.33.33.33

Type escape sequence to abort.
Tracing the route to 33.33.33.33

  1 10.1.23.3 4 msec 28 msec 24 msec
R2#

BGP AS-Path_Attribute


R4
ip prefix-list 100 seq 5 permit 4.4.4.0/24
route-map PREPEND permit 10
match ip address prefix-list 100
set as-path prepend 40 40 40
route-map PREPEND permit 999

router bgp 40
nei 10.1.24.2 route-map PREPEND out

#sh ip bgp on R3

BGP Route Reflector 3




R1
int e0/0
ip add 10.1.15.1 255.255.255.0
no sh
int e0/1
ip add 10.1.12.1 255.255.255.0
no sh
int e0/2
ip add 10.1.16.1 255.255.255.0
no sh
int e0/3
ip add 10.1.17.1 255.255.255.0
no sh
!
router ospf 1
 log-adjacency-changes
 network 10.1.15.0 0.0.0.255 area 0
 network 10.1.16.0 0.0.0.255 area 0
 network 10.1.17.0 0.0.0.255 area 0
!
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 neighbor 10.1.12.2 remote-as 100
 neighbor 10.1.15.5 remote-as 200
 neighbor 10.1.15.5 route-reflector-client
 neighbor 10.1.15.5 next-hop-self
 neighbor 10.1.16.6 remote-as 200
 neighbor 10.1.16.6 route-reflector-client
 neighbor 10.1.16.6 next-hop-self
 neighbor 10.1.17.7 remote-as 200
 neighbor 10.1.17.7 route-reflector-client
 neighbor 10.1.17.7 next-hop-self
 no auto-summary

R2
int lo 0
ip add 2.2.2.2 255.255.255.0
int e0/0
ip add 10.1.23.2 255.255.255.0
no sh
int e0/1
ip add 10.1.12.2 255.255.255.0
no sh

router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 2.2.2.0 mask 255.255.255.0
 neighbor 10.1.12.1 remote-as 200
 neighbor 10.1.23.3 remote-as 100
 neighbor 10.1.23.3 next-hop-self
 no auto-summary

R3
int lo 0
ip add 3.3.3.3 255.255.255.0
int e0/0
ip add 10.1.23.3 255.255.255.0
no sh
int e0/1
ip add 10.1.34.3 255.255.255.0
no sh
router bgp 100
 no synchronization
 bgp log-neighbor-changes
 network 3.3.3.0 mask 255.255.255.0
 neighbor 10.1.23.2 remote-as 100
 neighbor 10.1.23.2 next-hop-self
 neighbor 10.1.34.4 remote-as 300
 no auto-summary

R4
int e0/0
ip add 10.1.48.4 255.255.255.0
no sh
int e0/1
ip add 10.1.34.4 255.255.255.0
no sh
int e0/2
ip add 10.1.49.4 255.255.255.0
no sh
int e0/3
ip add 10.1.104.4 255.255.255.0
no sh

router ospf 1
 log-adjacency-changes
 network 10.1.48.0 0.0.0.255 area 0
 network 10.1.49.0 0.0.0.255 area 0
 network 10.1.104.0 0.0.0.255 area 0
!
router bgp 300
 no synchronization
 bgp log-neighbor-changes
 neighbor 10.1.34.3 remote-as 100
 neighbor 10.1.48.8 remote-as 300
 neighbor 10.1.48.8 route-reflector-client
 neighbor 10.1.48.8 next-hop-self
 neighbor 10.1.49.9 remote-as 300
 neighbor 10.1.49.9 route-reflector-client
 neighbor 10.1.49.9 next-hop-self
 neighbor 10.1.104.10 remote-as 300
 neighbor 10.1.104.10 route-reflector-client
 neighbor 10.1.104.10 next-hop-self
 no auto-summary

R5
int lo 0
ip add 5.5.5.5 255.255.255.0
int e0/0
ip add 10.1.15.5 255.255.255.0
no sh
int e0/1
ip add 10.1.56.5 255.255.255.0
no sh
int e0/2
ip add 10.1.115.5 255.255.255.0
no sh
int e1/0
ip add 10.1.125.5 255.255.255.0
no sh
int e1/1
ip add 10.1.135.5 255.255.255.0
no sh

router ospf 1
 log-adjacency-changes
 network 10.1.15.0 0.0.0.255 area 0
 network 10.1.56.0 0.0.0.255 area 0
 network 10.1.115.0 0.0.0.255 area 0
 network 10.1.125.0 0.0.0.255 area 0
 network 10.1.135.0 0.0.0.255 area 0
!
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 network 5.5.5.0 mask 255.255.255.0
 neighbor 10.1.15.1 remote-as 200
 neighbor 10.1.56.6 remote-as 200
 neighbor 10.1.115.11 remote-as 200
 neighbor 10.1.115.11 route-reflector-client
 neighbor 10.1.125.12 remote-as 200
 neighbor 10.1.125.12 route-reflector-client
 neighbor 10.1.135.13 remote-as 200
 neighbor 10.1.135.13 route-reflector-client
 no auto-summary
!

R6
int lo 0
ip add 6.6.6.6 255.255.255.0
int e0/0
ip add 10.1.67.6 255.255.255.0
no sh
int e0/1
ip add 10.1.56.6 255.255.255.0
no sh
int e0/2
ip add 10.1.16.6 255.255.255.0
no sh
int e0/3
ip add 10.1.126.6 255.255.255.0
no sh
int e1/0
ip add 10.1.116.6 255.255.255.0
no sh
int e1/2
ip add 10.1.136.6 255.255.255.0
no sh

router ospf 1
 log-adjacency-changes
 network 10.1.16.0 0.0.0.255 area 0
 network 10.1.56.0 0.0.0.255 area 0
 network 10.1.67.0 0.0.0.255 area 0
 network 10.1.116.0 0.0.0.255 area 0
 network 10.1.126.0 0.0.0.255 area 0
 network 10.1.136.0 0.0.0.255 area 0
!
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 network 6.6.6.0 mask 255.255.255.0
 neighbor 10.1.16.1 remote-as 200
 neighbor 10.1.56.5 remote-as 200
 neighbor 10.1.67.7 remote-as 200
 neighbor 10.1.116.11 remote-as 200
 neighbor 10.1.116.11 route-reflector-client
 neighbor 10.1.126.12 remote-as 200
 neighbor 10.1.126.12 route-reflector-client
 neighbor 10.1.136.13 remote-as 200
 neighbor 10.1.136.13 route-reflector-client
 no auto-summary

R7
int lo 0
ip add 7.7.7.7 255.255.255.0
int e0/0
ip add 10.1.67.7 255.255.255.0
no sh
int e0/1
ip add 10.1.117.7 255.255.255.0
no sh
int e0/2
ip add 10.1.137.7 255.255.255.0
no sh
int e0/3
ip add 10.1.17.7 255.255.255.0
no sh
int e1/1
ip add 10.1.127.7 255.255.255.0
no sh

router ospf 1
 log-adjacency-changes
 network 10.1.17.0 0.0.0.255 area 0
 network 10.1.67.0 0.0.0.255 area 0
 network 10.1.117.0 0.0.0.255 area 0
 network 10.1.127.0 0.0.0.255 area 0
 network 10.1.137.0 0.0.0.255 area 0
!
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 network 7.7.7.0 mask 255.255.255.0
 neighbor 10.1.17.1 remote-as 200
 neighbor 10.1.67.6 remote-as 200
 neighbor 10.1.117.11 remote-as 200
 neighbor 10.1.117.11 route-reflector-client
 neighbor 10.1.127.12 remote-as 200
 neighbor 10.1.127.12 route-reflector-client
 neighbor 10.1.137.13 remote-as 200
 neighbor 10.1.137.13 route-reflector-client
 no auto-summary

R8
int lo 0
ip add 8.8.8.8 255.255.255.0
int e0/0
ip add 10.1.48.8 255.255.255.0
no sh
int e0/1
ip add 10.1.148.8 255.255.255.0
no sh
int e0/2
ip add 10.1.158.8 255.255.255.0
no sh
int e0/3
ip add 10.1.89.8 255.255.255.0
no sh
int e1/0
ip add 10.1.168.8 255.255.255.0
no sh

router ospf 1
 log-adjacency-changes
 network 10.1.48.0 0.0.0.255 area 0
 network 10.1.89.0 0.0.0.255 area 0
 network 10.1.148.0 0.0.0.255 area 0
 network 10.1.158.0 0.0.0.255 area 0
 network 10.1.168.0 0.0.0.255 area 0
!
router bgp 300
 no synchronization
 bgp log-neighbor-changes
 network 8.8.8.0 mask 255.255.255.0
 neighbor 10.1.48.4 remote-as 300
 neighbor 10.1.89.9 remote-as 300
 neighbor 10.1.148.14 remote-as 300
 neighbor 10.1.148.14 route-reflector-client
 neighbor 10.1.158.15 remote-as 300
 neighbor 10.1.158.15 route-reflector-client
 neighbor 10.1.168.16 remote-as 300
 neighbor 10.1.168.16 route-reflector-client
 no auto-summary

R9
int lo 0
ip add 9.9.9.9 255.255.255.0
int e0/0
ip add 10.1.109.9 255.255.255.0
no sh
int e0/1
ip add 10.1.159.9 255.255.255.0
no sh
int e0/2
ip add 10.1.49.9 255.255.255.0
no sh
int e0/3
ip add 10.1.89.9 255.255.255.0
no sh
int e1/0
ip add 10.1.149.9 255.255.255.0
no sh
int e1/1
ip add 10.1.169.9 255.255.255.0
no sh

router ospf 1
 log-adjacency-changes
 network 10.1.49.0 0.0.0.255 area 0
 network 10.1.89.0 0.0.0.255 area 0
 network 10.1.109.0 0.0.0.255 area 0
 network 10.1.149.0 0.0.0.255 area 0
 network 10.1.159.0 0.0.0.255 area 0
 network 10.1.169.0 0.0.0.255 area 0
!
router bgp 300
 no synchronization
 bgp log-neighbor-changes
 network 9.9.9.0 mask 255.255.255.0
 neighbor 10.1.49.4 remote-as 300
 neighbor 10.1.89.8 remote-as 300
 neighbor 10.1.109.10 remote-as 300
 neighbor 10.1.149.14 remote-as 300
 neighbor 10.1.149.14 route-reflector-client
 neighbor 10.1.159.15 remote-as 300
 neighbor 10.1.159.15 route-reflector-client
 neighbor 10.1.169.16 remote-as 300
 neighbor 10.1.169.16 route-reflector-client
 no auto-summary

R10
int lo 0
ip add 10.10.10.10 255.255.255.0
int e0/0
ip add 10.1.109.10 255.255.255.0
no sh
int e0/1
ip add 10.1.161.10 255.255.255.0
no sh
int e0/3
ip add 10.1.104.10 255.255.255.0
no sh
int e1/1
ip add 10.1.151.10 255.255.255.0
no sh
int e1/2
ip add 10.1.141.10 255.255.255.0
no sh

router ospf 1
 log-adjacency-changes
 network 10.1.104.0 0.0.0.255 area 0
 network 10.1.109.0 0.0.0.255 area 0
 network 10.1.141.0 0.0.0.255 area 0
 network 10.1.151.0 0.0.0.255 area 0
 network 10.1.161.0 0.0.0.255 area 0
!
router bgp 300
 no synchronization
 bgp log-neighbor-changes
 network 10.10.10.0 mask 255.255.255.0
 neighbor 10.1.104.4 remote-as 300
 neighbor 10.1.109.9 remote-as 300
 neighbor 10.1.141.14 remote-as 300
 neighbor 10.1.141.14 route-reflector-client
 neighbor 10.1.151.15 remote-as 300
 neighbor 10.1.151.15 route-reflector-client
 neighbor 10.1.161.16 remote-as 300
 neighbor 10.1.161.16 route-reflector-client
 no auto-summary

R11
int lo 0
ip add 11.11.11.11 255.255.255.0
int e0/1
ip add 10.1.117.11 255.255.255.0
no sh
int e0/2
ip add 10.1.115.11 255.255.255.0
no sh
int e1/0
ip add 10.1.116.11 255.255.255.0
no sh

router ospf 1
 log-adjacency-changes
 network 10.1.115.0 0.0.0.255 area 0
 network 10.1.116.0 0.0.0.255 area 0
 network 10.1.117.0 0.0.0.255 area 0
!
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 network 11.11.11.0 mask 255.255.255.0
 neighbor 10.1.115.5 remote-as 200
 neighbor 10.1.116.6 remote-as 200
 neighbor 10.1.117.7 remote-as 200
 no auto-summary

R12
int lo 0
ip add 12.12.12.12 255.255.255.0
int e0/3
ip add 10.1.126.12 255.255.255.0
no sh
int e1/0
ip add 10.1.125.12 255.255.255.0
no sh
int e1/1
ip add 10.1.127.12 255.255.255.0
no sh

router ospf 1
 log-adjacency-changes
 network 10.1.125.0 0.0.0.255 area 0
 network 10.1.126.0 0.0.0.255 area 0
 network 10.1.127.0 0.0.0.255 area 0
!
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 network 12.12.12.0 mask 255.255.255.0
 neighbor 10.1.125.5 remote-as 200
 neighbor 10.1.126.6 remote-as 200
 neighbor 10.1.127.7 remote-as 200
 no auto-summary

R13
int lo 0
ip add 13.13.13.13 255.255.255.0
int e0/2
ip add 10.1.137.13 255.255.255.0
no sh
int e1/1
ip add 10.1.135.13 255.255.255.0
no sh
int e1/2
ip add 10.1.136.13 255.255.255.0
no sh

router ospf 1
 log-adjacency-changes
 network 10.1.135.0 0.0.0.255 area 0
 network 10.1.136.0 0.0.0.255 area 0
 network 10.1.137.0 0.0.0.255 area 0
!
router bgp 200
 no synchronization
 bgp log-neighbor-changes
 network 13.13.13.0 mask 255.255.255.0
 neighbor 10.1.135.5 remote-as 200
 neighbor 10.1.136.6 remote-as 200
 neighbor 10.1.137.7 remote-as 200
 no auto-summary

R14
int lo 0
ip add 14.14.14.14 255.255.255.0
int e0/1
ip add 10.1.148.14 255.255.255.0
no sh
int e1/0
ip add 10.1.149.14 255.255.255.0
no sh
int e1/2
ip add 10.1.141.14 255.255.255.0
no sh

router ospf 1
 log-adjacency-changes
 network 10.1.141.0 0.0.0.255 area 0
 network 10.1.148.0 0.0.0.255 area 0
 network 10.1.149.0 0.0.0.255 area 0
!
router bgp 300
 no synchronization
 bgp log-neighbor-changes
 network 14.14.14.0 mask 255.255.255.0
 neighbor 10.1.141.10 remote-as 300
 neighbor 10.1.148.8 remote-as 300
 neighbor 10.1.149.9 remote-as 300
 no auto-summary

R15
int lo 0
ip add 15.15.15.15 255.255.255.0
int e0/1
ip add 10.1.159.15 255.255.255.0
no sh
int e0/2
ip add 10.1.158.15 255.255.255.0
no sh
int e1/1
ip add 10.1.151.15 255.255.255.0
no sh

router ospf 1
 log-adjacency-changes
 network 10.1.151.0 0.0.0.255 area 0
 network 10.1.158.0 0.0.0.255 area 0
 network 10.1.159.0 0.0.0.255 area 0
!
router bgp 300
 no synchronization
 bgp log-neighbor-changes
 network 15.15.15.0 mask 255.255.255.0
 neighbor 10.1.151.10 remote-as 300
 neighbor 10.1.158.8 remote-as 300
 neighbor 10.1.159.9 remote-as 300
 no auto-summary

R16
interface Loopback0
 ip address 16.16.16.16 255.255.255.0
interface Ethernet0/1
 ip address 10.1.161.16 255.255.255.0
no sh
interface Ethernet1/0
 ip address 10.1.168.16 255.255.255.0
no sh
interface Ethernet1/1
 ip address 10.1.169.16 255.255.255.0
no sh

router ospf 1
 log-adjacency-changes
 network 10.1.161.0 0.0.0.255 area 0
 network 10.1.168.0 0.0.0.255 area 0
 network 10.1.169.0 0.0.0.255 area 0
!
router bgp 300
 no synchronization
 bgp log-neighbor-changes
 network 16.16.16.0 mask 255.255.255.0
 neighbor 10.1.161.10 remote-as 300
 neighbor 10.1.168.8 remote-as 300
 neighbor 10.1.169.9 remote-as 300
 no auto-summary