Download as ppt, pdf, or txt
Download as ppt, pdf, or txt
You are on page 1of 27

CIS 185 Advanced Routing Protocols

BGP Part 3
Rick Graziani
Cabrillo College
graziani@cabrillo.edu
Last Updated: Fall 2009

Regular Expressions
A regular expression is a pattern to match against an input string.
Character

Description

Matches the beginning of the input string.

Matches the end of the input string.

Matches a space, comma, left brace, right brace,


the beginning of an input string, or the ending
of an input stream

.
*

Matches any single character

Matches 0 or more single- or multiplecharacter patterns.


2

192.10.2.0/24

AS 300
RouterA
130.1.50.32/30

AS 200
RouterB
12.0.0.0/8

RouterC#show ip bgp
Network
Next Hop
*> 11.0.0.0
0.0.0.0
*> 12.0.0.0
200.200.200.65
*> 192.10.2.0
200.200.200.65

200.200.200.64/30

AS 400
RouterC
11.0.0.0/8

Metric LocPrf Weight Path


0
32768 i
0 300 200 i
0
0 300 i

RouterC# show ip bgp regexp ^300


Match beginning of input string, AS_PATH, = 300
Last prepended AS was 300:
Routes matched: 12.0.0.0 and 192.10.2.0

192.10.2.0/24

AS 300
RouterA
130.1.50.32/30

AS 200
RouterB
12.0.0.0/8

RouterC#show ip bgp
Network
Next Hop
*> 11.0.0.0
0.0.0.0
*> 12.0.0.0
200.200.200.65
*> 192.10.2.0
200.200.200.65

200.200.200.64/30

AS 400
RouterC
11.0.0.0/8

Metric LocPrf Weight Path


0
32768 i
0 300 200 i
0
0 300 i

RouterC# show ip bgp regexp ^200


Match beginning of input string, AS_PATH, = 200
Last prepended AS was 200:
Routes matched : none

192.10.2.0/24

AS 300
RouterA
130.1.50.32/30

200.200.200.64/30

AS 200
RouterB
12.0.0.0/8

RouterC#show ip bgp
Network
Next Hop
*> 11.0.0.0
0.0.0.0
*> 12.0.0.0
200.200.200.65
*> 192.10.2.0
200.200.200.65

AS 400
RouterC
11.0.0.0/8

Metric LocPrf Weight Path


0
32768 i
0 300 200 i
0
0 300 i

RouterC# show ip bgp regexp 300$


Match end of input string, AS_PATH, = 300
Originating AS = 300:
Routes matched : 192.10.2.0

192.10.2.0/24

AS 300
RouterA
130.1.50.32/30

200.200.200.64/30

AS 200
RouterB
12.0.0.0/8

RouterC#show ip bgp
Network
Next Hop
*> 11.0.0.0
0.0.0.0
*> 12.0.0.0
200.200.200.65
*> 192.10.2.0
200.200.200.65

AS 400
RouterC
11.0.0.0/8

Metric LocPrf Weight Path


0
32768 i
0 300 200 i
0
0 300 i

RouterC# show ip bgp regexp 200$


Match end of input string, AS_PATH, = 200
Originating AS = 200:
Routes matched : 12.0.0.0

AS 200

AS 100

2.0.0.0

1.0.0.0

AS 1000

AS 400

AS 300

AS 50

10.0.0.0

4.0.0.0

3.0.0.0

5.0.0.0

AS50#show ip bgp
Network
*> 5.0.0.0
*> 1.0.0.0
*> 2.0.0.0
*> 3.0.0.0
*> 4.0.0.0
*> 10.0.0.0

Path
i
100 i
100 200 i
300 i
300 400 i
300 400 1000 I

AS50#show ip bpg regexp 100


Match input string, AS_PATH, containing 100, including 1000
Routes matched : 1.0.0.0, 2.0.0.0, 10.0.0.0

AS 200

AS 100

2.0.0.0

1.0.0.0

AS 1000

AS 400

AS 300

AS 50

10.0.0.0

4.0.0.0

3.0.0.0

5.0.0.0

AS50#show ip bgp
Network
*> 5.0.0.0
*> 1.0.0.0
*> 2.0.0.0
*> 3.0.0.0
*> 4.0.0.0
*> 10.0.0.0

Path
i
100 i
100 200 i
300 i
300 400 i
300 400 1000 I

AS50#show ip bpg regexp ^100_


Match beginning of input string, AS_PATH, = 100
Last prepended AS was 100:
Routes matched : 1.0.0.0, 2.0.0.0
8

AS 200

AS 100

2.0.0.0

1.0.0.0

AS 1000

AS 400

AS 300

AS 50

10.0.0.0

4.0.0.0

3.0.0.0

5.0.0.0

AS50#show ip bgp
Network
*> 5.0.0.0
*> 1.0.0.0
*> 2.0.0.0
*> 3.0.0.0
*> 4.0.0.0
*> 10.0.0.0

Path
i
100 i
100 200 i
300 i
300 400 i
300 400 1000 I

AS50# show ip bgp regexp _400$


Match end of input string, AS_PATH, = 400
Originating AS = 400:
Routes matched : 4.0.0.0
9

AS 200

AS 100

2.0.0.0

1.0.0.0

AS 1000

AS 400

AS 300

AS 50

10.0.0.0

4.0.0.0

3.0.0.0

5.0.0.0

AS50#show ip bgp
Network
*> 5.0.0.0
*> 1.0.0.0
*> 2.0.0.0
*> 3.0.0.0
*> 4.0.0.0
*> 10.0.0.0

Path
i
100 i
100 200 i
300 i
300 400 i
300 400 1000 I

AS50#show ip bpg regexp _400_


Match anywhere in input string, AS_PATH, 400
Routes matched : 4.0.0.0, 10.0.0.0

10

AS 200

AS 100

2.0.0.0

1.0.0.0

AS 1000

AS 400

AS 300

AS 50

10.0.0.0

4.0.0.0

3.0.0.0

5.0.0.0

AS50#show ip bgp
Network
*> 5.0.0.0
*> 1.0.0.0
*> 2.0.0.0
*> 3.0.0.0
*> 4.0.0.0
*> 10.0.0.0

Path
i
100 i
100 200 i
300 i
300 400 i
300 400 1000 I

AS50#show ip bgp regexp ^300$


Match input string that starts and ends at 300
Routes that originated from directly connected AS 300 customer
Routes matched : 3.0.0.0
11

nslookup

Find your favorite network


12

http://www.traceroute.org/
Optus Route Server Australia (AS7474)

13

#####################################################################

203.202.125.6

Optus BGP Route Viewer


route-views.optus.net.au , Sydney , Australia

This router has the complete view of Optus AS7474 National routes.
This router should _not_ be used to verify Optus backbone routing policy.
The best path shown is the current best path _from this router_.
Please contact ipnws@optus.net.au if you have questions or
comments about this service, its use, or if you might be able to
contribute your view.
The Optus route-views server is NOT to be used with ANY automated scripts
unless expressly authorised by Optus.

######################################################################
route-views.optus.net.au>

14

route-views.optus.net.au> show ip route


Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level2
ia - IS-IS inter area, * - candidate default, U - per-user static
route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 203.202.125.1 to network 0.0.0.0
B
B
B
B
B
B
B
B
B
B
B
B

216.221.5.0/24 [20/0] via 202.160.242.71, 2w4d


216.187.99.0/24 [20/0] via 202.160.242.71, 3w5d
210.51.225.0/24 [20/0] via 202.160.242.71, 1w5d
210.34.240.0/24 [20/0] via 203.13.132.35, 4d22h
209.136.89.0/24 [20/0] via 202.160.242.71, 3w5d
209.34.243.0/24 [20/0] via 202.160.242.71, 3w5d
205.204.1.0/24 [20/0] via 202.160.242.71, 3w5d
205.153.84.0/24 [20/0] via 202.160.242.71, 1w0d
204.255.51.0/24 [20/0] via 202.160.242.71, 3w5d
204.238.34.0/24 [20/0] via 202.160.242.71, 3d07h
204.221.17.0/24 [20/0] via 202.160.242.71, 3w5d
204.17.221.0/24 [20/0] via 202.160.242.71, 3w5d

15

route-views.optus.net.au> show ip bgp


BGP table version is 6386965, local router ID is 203.202.125.6
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
2.0.0.0/16

2.1.0.0/21

2.1.24.0/24

3.0.0.0

3.51.92.0/23

4.0.0.0/9

Next Hop
203.13.132.53
202.160.242.71
203.13.132.35
203.13.132.53
202.160.242.71
203.13.132.35
203.13.132.53
202.160.242.71
203.13.132.35
203.13.132.53
202.160.242.71
203.13.132.35
203.13.132.53
202.160.242.71
203.13.132.35
203.13.132.53
202.160.242.71

Metric LocPrf Weight


0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0
0

Path
7474
7473
7474
7474
7473
7474
7474
7473
7474
7474
7473
7474
7474
7473
7474
7474
7473

7473 6453 12654 i


6453 12654 i
7473 6453 12654 i
7473 6453 12654 i
6453 12654 i
7473 6453 12654 i
7473 6453 12654 i
6453 12654 i
7473 6453 12654 i
7473 15412 9304 80 i
15412 9304 80 i
7473 15412 9304 80 i
7473 3356 7018 i
3356 7018 i
7473 3356 7018 i
7473 3356 i
3356 i

route-views.optus.net.au>

16

route-views.optus.net.au>show ip bgp regexp _2152_


BGP table version is 6387372, local router ID is 203.202.125.6
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
*> 44.0.0.0
*
*
* 63.193.200.0/24
*>
*
* 63.199.32.0/21
*>
*
* 63.199.40.0/22
*>
*
* 63.199.44.0/24
*>

Next Hop
202.160.242.71
203.13.132.53
203.13.132.35
203.13.132.53
202.160.242.71
203.13.132.35
203.13.132.53
202.160.242.71
203.13.132.35
203.13.132.53
202.160.242.71
203.13.132.35
203.13.132.53
202.160.242.71

Metric LocPrf Weight


0
0
0
0
0
0
0
0
0
0
0
0
0
0

Path
7473
7474
7474
7474
7473
7474
7474
7473
7474
7474
7473
7474
7474
7473

11164 2152
7473 11164
7473 11164
7473 11164
11164 2152
7473 11164
7473 11164
11164 2152
7473 11164
7473 11164
11164 2152
7473 11164
7473 11164
11164 2152

7377 i
2152 7377 i
2152 7377 i
2152 25664 i
25664 i
2152 25664 i
2152 25664 i
25664 i
2152 25664 i
2152 25664 i
25664 i
2152 25664 i
2152 25664 i
25664 i

route-views.optus.net.au>

17

route-views.optus.net.au>show ip route 207.62.187.0


Routing entry for 207.62.0.0/16, supernet
Known via "bgp 65535", distance 20, metric 0
Tag 7473, type external
Last update from 202.160.242.71 2w4d ago
Routing Descriptor Blocks:
* 202.160.242.71, from 202.160.242.71, 2w4d ago
Route metric is 0, traffic share count is 1
AS Hops 3
Route tag 7473
route-views.optus.net.au>

65535 This AS
7473 Next AS

18

route-views.optus.net.au>show ip bgp 207.62.187.0


BGP routing table entry for 207.62.0.0/16, version 2385115
Paths: (3 available, best #1, table Default-IP-RoutingTable)
Not advertised to any peer
7473 11164 2152
202.160.242.71 from 202.160.242.71 (202.160.242.71)
Origin IGP, localpref 100, valid, external, best
Community: 7473:22015 7473:32915
7474 7473 11164 2152
203.13.132.53 from 203.13.132.53 (172.26.32.13)
Origin IGP, localpref 100, valid, external
Community: 7473:22015 7473:32955 7474:1403
7474 7473 11164 2152
203.13.132.35 from 203.13.132.35 (172.26.32.42)
Origin IGP, localpref 100, valid, external
Community: 7473:22015 7473:32915 7474:1403
route-views.optus.net.au>

19

http://www.geektools.com/whois.php

20

21

22

http://bgplay.routeviews.org/bgplay/

23

http://www.ripe.net/ris/index.html

24

2152

25

http://www.caida.org

26

CIS 185 Advanced Routing Protocols


BGP Part 3
Rick Graziani
Cabrillo College
graziani@cabrillo.edu
Last Updated: Fall 2009

You might also like