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)#