Wednesday, October 9, 2013

IPv6 Routing Example #1





R1
interface Loopback0
ipv6 address 2001::1/128
 ipv6 ospf 1 area 0

interface Loopback1
ipv6 address 2001:DB8::1/128
 ipv6 ospf 1 area 0

interface FastEthernet0/0
 ipv6 address 2001:192:12::1/64
 ipv6 ospf network point-to-point
 ipv6 ospf 1 area 0

ipv6 router ospf 1
 router-id 1.1.1.1

R2

interface Loopback0
ipv6 address 2001::2/128
 ipv6 ospf 1 area 0

interface Loopback1
ipv6 address 2001:DB8::2/128
 ipv6 ospf 1 area 0

interface FastEthernet0/0
ipv6 address 2001:192:12::2/64
 ipv6 ospf network point-to-point
 ipv6 ospf 1 area 0

interface FastEthernet0/1
ipv6 address 2001:192:23::2/64
 ipv6 rip RIPng enable

ipv6 router ospf 1
 router-id 2.2.2.2
redistribute rip RIPng include-connected

ipv6 router rip RIPng
 redistribute ospf 1 include-connected

R3

interface Loopback0
 ipv6 address 2001::3/128
 ipv6 rip RIPng enable

interface Loopback1
ipv6 address 2001:DB8::3/128
 ipv6 rip RIPng enable

interface FastEthernet0/0
ipv6 address 2001:192:23::3/64
 ipv6 rip RIPng enable

interface FastEthernet0/1
ipv6 address 2001:192:34::3/64

ipv6 router rip RIPng
 redistribute bgp 300

router bgp 300
bgp router-id 3.3.3.3
 bgp log-neighbor-changes
 neighbor 2001:192:34::4 remote-as 400
address-family ipv6
  neighbor 2001:192:34::4 activate
  redistribute rip RIPng include-connected

R4
interface Loopback0
ipv6 address 2001::4/128

R4#sh run int lo1
interface Loopback1
 no ip address
 ipv6 address 2001:DB8::4/128

interface FastEthernet0/0
ipv6 address 2001:192:34::4/64

router bgp 400
bgp router-id 4.4.4.4
 bgp log-neighbor-changes
 neighbor 2001:192:34::3 remote-as 300
address-family ipv6
  neighbor 2001:192:34::3 activate
  network 2001::4/128
  network 2001:DB8::4/128


Tasks

Filter the prefix 2001:DB8::1/128 from being installed in R2 routing table

ipv6 prefix-list MSSK seq 5 deny 2001:DB8::1/128
ipv6 prefix-list MSSK seq 10 permit ::/0 le 128
 
ipv6 router ospf 1
distribute-list prefix-list MSSK in FastEthernet0/0
 
R2#sh ipv6 route ospf 
IPv6 Routing Table - 12 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       D - EIGRP, EX - EIGRP external
O   2001::1/128 [110/10]
     via FE80::C000:74FF:FEF5:0, FastEthernet0/0
 
Assign a metric of 5 to the prefix 2001::1/128 when propagated to the RIP domain
 
ipv6 prefix-list METRIC seq 5 permit 2001::1/128
 
route-map MAP permit 10
 match ipv6 address prefix-list METRIC
 set metric 5
route-map MAP permit 20
 
 
R2(config-route-map)#ipv6 router rip RIPng
R2(config-rtr)#redistribute ospf 1 route-map MAP include-connected
 
R3#sh ipv6 route rip 
IPv6 Routing Table - 13 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
       U - Per-user Static route, M - MIPv6
       I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea, IS - ISIS summary
       O - OSPF intra, OI - OSPF inter, OE1 - OSPF ext 1, OE2 - OSPF ext 2
       ON1 - OSPF NSSA ext 1, ON2 - OSPF NSSA ext 2
       D - EIGRP, EX - EIGRP external
R   2001::1/128 [120/6]
     via FE80::C001:74FF:FEF5:1, FastEthernet0/0
R   2001::2/128 [120/2]
     via FE80::C001:74FF:FEF5:1, FastEthernet0/0
R   2001:192:12::/64 [120/2]
     via FE80::C001:74FF:FEF5:1, FastEthernet0/0
R   2001:DB8::2/128 [120/2]
     via FE80::C001:74FF:FEF5:1, FastEthernet0/0
 
On R3 assign the 2001:DB8::2/128 prefix a weight of 16384
 
R3(config)#ipv6 prefix-list WEIGHT seq 5 permit 2001:DB8::2/128
 
R3(config)#route-map MAP1 permit 10
R3(config-route-map)#match ipv6 address prefix-list WEIGHT
R3(config-route-map)#set weight 16384
R3(config-route-map)#route-map MAP1 permit 20
 
R3(config-route-map)#router bgp 300
R3(config-router)#address-family ipv6 
R3(config-router-af)#redistribute rip RIPng include-connected route-map MAP1
 
R3#sh bgp ipv6 unicast 
BGP table version is 14, local router ID is 3.3.3.3
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop            Metric LocPrf Weight Path
*> 2001::1/128      ::                       6         32768 ?
*> 2001::2/128      ::                       2         32768 ?
*> 2001::3/128      ::                       0         32768 ?
*> 2001::4/128      2001:192:34::4           0             0 400 i
*> 2001:192:12::/64 ::                       2         32768 ?
*> 2001:192:23::/64 ::                       0         32768 ?
*> 2001:DB8::2/128  ::                       2         16384 ?
*> 2001:DB8::3/128  ::                       0         32768 ?
*> 2001:DB8::4/128  2001:192:34::4           0             0 400 i

Sunday, October 6, 2013

BGP Configuration Example #2





Interfaces 
R1: 
Lo0: 1.1.1.1/32, Lo1: 192.168.1.1/24, Lo2: 192.168.11.1/24, Lo3 192.168.111.1/24
 
R2:
Lo0: 2.2.2.2/32, Lo1: 192.168.2.1/24, Lo2: 192.168.22.1/24, Lo3: 192.168.222.1/24
 
R3:
Lo1: 192.168.3.1/24, Lo2: 192.168.33.1/24, Lo3: 192.168.133.1/24
 
R4
Lo1: 192.168.4.1/24, Lo2: 192.168.44.1/24, Lo3: 192.168.144.1/24
 
Task 1.1 
Configure EIGRP AS 12 on both R1 and R2 and advertise their loopback 0 interfaces in EIGRP
 
R1#sh run | sec router eigrp 
router eigrp 12
 network 1.1.1.1 0.0.0.0
 network 192.168.12.1 0.0.0.0
 no auto-summary
 
R2#sh run | sec router eigrp 
router eigrp 12
network 2.2.2.2 0.0.0.0
network 192.168.12.2 0.0.0.0
no auto-summary
 
Task 1.2 
Make sure updates are exchanged only on the physical interfaces
 
R1(config)#router eigrp 12
R1(config-router)#passive-interface default 
R1(config-router)#no passive-interface fastEthernet 0/0
 
R2(config)#router eigrp 12
R2(config-router)#passive-interface default 
R2(config-router)#no passive-interface fastEthernet 0/0
 
Task 1.3
Configure BGP according to the diagram shown above and advertise loopback 1, 2, 3 interfaces in BGP
 
R1#sh run | sec router bgp
router bgp 100
network 192.168.1.0
 network 192.168.11.0
 network 192.168.12.0
 network 192.168.13.0
 network 192.168.111.0
 neighbor 2.2.2.2 remote-as 100
 neighbor 2.2.2.2 update-source Loopback0
 neighbor 2.2.2.2 next-hop-self
neighbor 192.168.13.3 remote-as 300
 
R2#sh run | sec router bgp
router bgp 100
network 192.168.2.0
 network 192.168.12.0
 network 192.168.22.0
 network 192.168.24.0
 network 192.168.222.0
 neighbor 1.1.1.1 remote-as 100
 neighbor 1.1.1.1 update-source Loopback0
 neighbor 1.1.1.1 next-hop-self
 neighbor 192.168.24.4 remote-as 400
 
R3#sh run | sec router bgp
router bgp 300
 network 192.168.3.0
 network 192.168.33.0
 network 192.168.34.0
 network 192.168.133.0
 neighbor 192.168.13.1 remote-as 100
 neighbor 192.168.34.4 remote-as 400
 
R4#sh run | sec router bgp
router bgp 400
 network 192.168.4.0
 network 192.168.34.0
 network 192.168.44.0
 network 192.168.144.0
 neighbor 192.168.24.2 remote-as 100
 neighbor 192.168.34.3 remote-as 300
 no auto-summary
 
 
Task 1.4
Advertise the transit link between R1 and R2 in BGP on both routers
Advertise the transit link between R1 and R3 in BGP on R1
Advertise the transit link between R2 and R4 in BGP on R2
Advertise the transit link between R3 and R4 in BGP on both routers 
 
Included above
 
Task 1.5
R4 advertises three networks into BGP, traceroute to R4 192.168.4.0 network should match the below output (the configuration should be done on R1 using local preference)
 
R2#traceroute 192.168.4.1 numeric  
 
Type escape sequence to abort.
Tracing the route to 192.168.4.1
 
  1 192.168.12.1 4 msec 8 msec 4 msec
  2 192.168.13.3 4 msec 4 msec 4 msec
  3 192.168.34.4 4 msec 0 msec 4 msec
 
 
access-list 10 permit 192.168.4.0 0.0.0.255
 
route-map LP permit 10
 match ip address 10
 set local-preference 101
route-map LP permit 20
 
router bgp 100
neighbor 192.168.13.3 route-map LP in
 
Task 1.6
R1 advertises three networks into BGP, traceroute to R1 192.168.1.0 network should match the output below (The configuration should be done on R1 using AS-path)
 
R3#traceroute 192.168.11.1 numeric 
 
Type escape sequence to abort.
Tracing the route to 192.168.11.1
 
  1 192.168.34.4 0 msec 4 msec 0 msec
  2 192.168.24.2 [AS 100] 4 msec 0 msec 4 msec
  3 192.168.12.1 [AS 100] 0 msec 4 msec 0 msec
 
access-list 20 permit 192.168.11.0 0.0.0.255
 
route-map PREPEND permit 10
 match ip address 20
 set as-path prepend 100 100
route-map PREPEND permit 20
 
R1#sh run | sec router bgp
router bgp 100
neighbor 192.168.13.3 route-map PREPEND out
 
Task 1.7
Change the origin for the 192.168.22.0 prefix to incomplete (configuration should be done on R2)
 
R4#sh ip bgp 
*> 192.168.22.0     192.168.24.2             0             0 100 ?
 
access-list 10 permit 192.168.22.0 0.0.0.255
 
route-map ORIGIN permit 10
 match ip address 10
 set origin incomplete
 
R2#sh run | sec router bgp
router bgp 100
neighbor 192.168.24.4 route-map ORIGIN out
 
Task 1.8
Match the output below (configuration done on R2)
 
R4#sh ip bgp 
*  192.168.222.0    192.168.34.3                           0 300 100 i
*>                  192.168.24.2           222             0 100 i
 
access-list 99 permit 192.168.222.0 0.0.0.255
 
route-map ORIGIN permit 20
 match ip address 99
 set metric 222
route-map ORIGIN permit 30
 
R2#sh run | sec router bgp
router bgp 100
neighbor 192.168.24.4 route-map ORIGIN out
 
Task 1.9
Filter the prefix 192.168.144.0/24 from routes advertised from R2 to R1 using prefix-lists (Match the output below)
 
R2#sh ip bgp neighbors 1.1.1.1 advertised-routes 
BGP table version is 38, local router ID is 2.2.2.2
Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,
              r RIB-failure, S Stale
Origin codes: i - IGP, e - EGP, ? - incomplete
 
   Network          Next Hop            Metric LocPrf Weight Path
*> 192.168.2.0      0.0.0.0                  0         32768 i
*> 192.168.12.0     0.0.0.0                  0         32768 i
*> 192.168.22.0     0.0.0.0                  0         32768 i
*> 192.168.24.0     0.0.0.0                  0         32768 i
*> 192.168.34.0     192.168.24.4             0             0 400 i
*> 192.168.44.0     192.168.24.4             0             0 400 i
*> 192.168.222.0    0.0.0.0                  0         32768 i
 
Total number of prefixes 7
 
R2#sh run | sec ip prefix
ip prefix-list R1 seq 5 deny 192.168.144.0/24
ip prefix-list R1 seq 10 permit 0.0.0.0/0 le 32
 
router bgp 100
neighbor 1.1.1.1 prefix-list R1 out
 
Task 1.10
Match the output below (configuration done on R3)
 
R1#sh ip bgp 192.168.133.0 
BGP routing table entry for 192.168.133.0/24, version 45
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x880
  Advertised to update-groups:
        1
  300
    192.168.13.3 from 192.168.13.3 (192.168.34.3)
      Origin IGP, metric 0, localpref 100, valid, external, best
      Community: 19660803
 
R1#sh ip bgp 192.168.33.0  
BGP routing table entry for 192.168.33.0/24, version 49
Paths: (1 available, best #1, table Default-IP-Routing-Table)
Flag: 0x880
  Advertised to update-groups:
        1
  300
    192.168.13.3 from 192.168.13.3 (192.168.34.3)
      Origin IGP, metric 0, localpref 100, valid, external, best
      Community: 19660802
 
R3#sh run | sec access-list
access-list 10 permit 192.168.33.0 0.0.0.255
access-list 20 permit 192.168.133.0 0.0.0.255
 
route-map COMM permit 10
 match ip address 10
 set community 19660802
route-map COMM permit 20
 match ip address 20
 set community 19660803
 
R3#sh run | sec router bgp
router bgp 300
neighbor 192.168.13.1 send-community
neighbor 192.168.13.1 route-map COMM out
 
Task 1.11
Match the output below using distribute-lists one time (configuration done on R2)
 
R2#sh ip bgp 192.168.33.0
% Network not in table
 
access-list 90 deny   192.168.33.0 0.0.0.255
access-list 90 permit any
 
router bgp 100
distribute-list 90 in
 
Task 1.12
Configure EIGRP domain to rely only on delay in its metric calculation and match the output below
 
R1#sh ip route eigrp 
     2.0.0.0/32 is subnetted, 1 subnets
D       2.2.2.2 [90/153600] via 192.168.12.2, 00:00:38, FastEthernet0/0
D EX 192.168.3.0/24 [170/51200] via 192.168.12.2, 00:00:38, FastEthernet0/0
 
R1, R2
router eigrp 12
metric weights 0 0 0 1 0 0
 
access-list 50 permit 192.168.3.0 0.0.0.255
 
route-map REDISTRIBUTE permit 10
 match ip address 50
 
router eigrp 12
 redistribute bgp 100 metric 10000 100 255 1 1500 route-map REDISTRIBUTE
 
R1(config)#int f0/0
R1(config-if)#delay 100
 
Task 1.13
Match the output below (do not use any filtering techniques)
 
R1#sh ip bgp | inc 192.168.3.0
*>i192.168.3.0      2.2.2.2                  0    100      0 400 300 i
 
R2
router eigrp 12
eigrp stub connected