RMU VLabNet 7.4-BGP - Virtual Laboratory Networking Exercises

INFS6230 and INFS6760 – RMU C&IS

 

Command Summary and Examples

 

  1. BGP (Border Gateway Protocol) Please see: http://www.quagga.net/docs/docs-multi/BGP.html#BGP Quagga BGP (including configuration) examples can be found at the Quagga Wiki: http://wiki.quagga.net/index.php/Main/CfEx
    1. See Tanenbaum, §5.6.5 BGP – The Exterior Gateway Routing Protocol, pp. 459-461. Please note examples of routing constraint implementation of policies, p. 460. The Autonomous System (AS) concept; see Tanenbaum, pp. 427, 432, 456-458.
    2. To edit /etc/quagga/daemons so that zebra and bgpd will be enabled as needed on reboot or restart.

Edit command:

vi /etc/quagga/daemons

zebra=yes

bgpd=yes

ospfd=no

ospf6d=no

ripd=no

ripngd=no

isisd=no

    1. Design of INFS6230 activities: Groups: five teams of students (about 4 per team) will form Autonomous Systems (ASs). Each VM will be regarded as a router. Thus VM101 is R101 for these exercises. iBGP connections for students’ routers within team: meshed - every node connected to every other node; exchange of external reachability information within an Autonomous System (AS). eBGP connections with nodes in other Autonomous Systems (ASs); exchange of reachability information between ASs. Learn transit routing and peering between different parties that make up tier 1 of the Internet (learn how the Internet works)
    2. Regarding AS numbers 64701-64704, please see IANA “private AS numbers”: http://www.iana.org/assignments/as-numbers: 64512-65534    Designated for private use (Allocated to the IANA).
    3. Check configuration file, especially /etc/quagga/bgpd.conf. See examples below and eBGP Peering Diagram BGP-2 and BGP-3, Mesh iBGP Peering in an Autonomous System. For example in a given Autonomous System 64701 there will be internal BGP (iBGP) peering from, say, R101 to the three other VMs in the AS: 102, 103, and 104 in the same AS, and eBGP peering to R107 in AS 64702. There will be internal BGP (iBGP) peering from, say, R103 to the three other Routers in the AS: R101, R102, and R104 in the same AS, and eBGP peering to R115 in AS 64704. Edit configuration file to obtain correct configuration.
    4. Make sure zebra has been started first. If not,
      to start zebra: /usr/lib/quagga/zebra -d
    5. To start BGP: /usr/lib/quagga/bgpd -d
    6. Access BGP router: telnet localhost 2605; enter password, use enable to gain command mode
    7. If needed, to shut BGP down: kill `cat /var/run/quagga/bgpd.pid` [Or look up PID nnnn using ps –A and kill nnnn
    8. If needed, to restart quagga: /etc/init.d/quagga restart
    9. Verification, observe established port 179 TCP connection using netstat -an:

tcp        0      0 x.y.z.125:179      x.y.z.107:4336     ESTABLISHED

    1. To check for packets on interface Ethernet 0, use: tcpdump -i eth0 port 179 [best]

or tcpdump -i eth0 port not ssh

or tcpdump -i eth0 proto tcp

    1. Once your BGP router is correctly configured, please leave your router running (except for brief experiments or to correct your configuration and then restart) until the date given in class to shut it down. Please recall the resulting BGP routing responses online to the collective work of the entire class are important to each member of the class as everyone completes BGP documentation.

Figure 3-6: Autonomous Systems 64701-64704; Routing for each AS

See Figure 3-6 (BGP Autonomous Systems)

Figure 3-7: Model of BGP implementation, INFS6230, RMU C&IS, showing which Routers are assigned to which ASs (and thus how to configure mesh iBGP peerings within each AS) and which eBGP peerings should be configured.

See Figure 3-7 (BGP Router Assignments and Peerings, Fall 2009)

Figure 3-8. Mesh iBGP Peering in an Autonomous System. Here is a model of the (internal) iBGP peering within a single autonomous system, AS 64702, and its (external) eBGP peerings.

See Figure 3-8 (BGP K4 Mesh iBGP and eBGP)

See Figure 3-8b (BGP K5 Mesh iBGP and eBGP)

If needed, see the BGP Troubleshooting page.

Please see the /etc/quagga/bgpd.conf file for VM 107 in AS 64702:

Please note notation here: <iR0> is you. Your (mesh) iBGP peerings are to <iR1>, <iR2> and <iR3>. Your external peering is to <eR1>. Some of you may have a second eBGP peering to <eR2>. remote-as means “(in) remote autonomous system.”

Edit command:

vi /etc/quagga/bgpd.conf

! Configuration file model for VM 107 in AS 64702

! INFS6230 Fall 2007 RMU C&IS

!

hostname bgpd

password zebra

enable password #####

!

! <iR0> = substitute your own vm/router number in your iBGP list

!

router bgp 6470n <your own autonomous system number>

bgp router-id 10.10.10.<iR0>

 network 10.10.<iR0>.0/29

!

! internal mesh – iBGP – same AS – <iR1>-<iR3> = substitute internal peer vm numbers

! (from your iBGP neighbor list) x.y.z. = our usual first 3 octets

!

neighbor x.y.z.<iR1> remote-as 64702

 neighbor x.y.z.<iR2> remote-as 64702

 neighbor x.y.z.<iR3> remote-as 64702

!

! external peering – eBGP – other AS – <eR1> = external peer vm number

! (from your eBGP neighbor list)

! prefix-list - <eR1> = substitute external peer vm/router (from your eBGP neighbor list)

!

neighbor x.y.z.<eR1> remote-as 64701

neighbor x.y.z.<eR1> prefix-list allowed-in in

!

ip prefix-list allowed-in seq 5 deny 10.10.<eR1>.0/29

ip prefix-list allowed-in seq 10 permit any

!

! logging

!

log syslog

log file /var/log/quagga/bgpd.log

log stdout

!

line vty

!

About the neighbor statements in any configuration and the iBGP/eBGP distinction:

neighbor x.y.z.105 remote-as 64702 (same AS; therefore iBGP)

 neighbor x.y.z.106 remote-as 64702 (same AS; therefore iBGP)

 neighbor x.y.z.108 remote-as 64702 (same AS; therefore iBGP)

 neighbor x.y.z.101 remote-as 64701 (different AS; therefore eBGP)

 neighbor x.y.z.123 remote-as 64704 (different AS; therefore eBGP)

Fill-in version. Using the guide above, fill in the correct AS numbers and IP and CIDR network addresses:

! Configuration file model (fill-in) for VM 1nn in AS 6470a

! INFS6230 Fall 2007 RMU C&IS

!

hostname bgpd

password zebra

enable password #####

!

! <substitute your own vm/router number in your iBGP list

! <your own autonomous system number>

router bgp 6470n

bgp router-id 10.10.10.____

 network 10.10.____.0/29

!

! internal mesh – iBGP – same AS as yours = substitute internal peer vm numbers

! (from your iBGP neighbor list) x.y.z. = our usual first 3 octets

!

neighbor x.y.z.____ remote-as 6470__

 neighbor x.y.z.____ remote-as 6470__

 neighbor x.y.z.____ remote-as 6470__

!

! external peer vm/router (from your eBGP neighbor list) – different AS from yours

!

neighbor x.y.z.____ remote-as 6470__

neighbor x.y.z.____ prefix-list allowed-in in

!

ip prefix-list allowed-in seq 5 deny 10.10.____.0/29

ip prefix-list allowed-in seq 10 permit any

!

! logging

!

log syslog

log file /var/log/quagga/bgpd.log

log stdout

!

line vty

!

 

Please note that prefix list allowed-in in identifies the name of the prefix-list as allowed-in and as inbound with regard to VM 123. The sequence numbers order the statements in the prefix list.

 

  1. Interactive configuration at the config-router prompt (telnet localhost 2605), example from VM 123 in AS 64704:

Password: zebra

bgpd> enable

Password: #####

bgpd# config t [Note Prompt changes from bgpd> to bgpd#]

bgpd(config)#

bgpd(config)# ip prefix-list allowed-in deny 10.10.107.0/29         çexample, not req’d

bgpd(config)# ip prefix-list allowed-in permit any                  çexample, not req’d

bgpd(config)# router bgp 6470n                                      çuse your AS-number

bgpd(config-router)#

bgpd(config-router)# bgp log-neighbor-changes

bgpd(config-router)# redistribute connected

bgpd(config-router)# bgp network import-check

bgpd(config-router)# quit

bgpd(config)# quit

bgpd# show ip bgp <options>  çyou can enter show ip bgp commands here, see examples belowê

bgpd# quit

<back to system prompt>

By using the ? after the show ip bgp entry, you can see what options you have:

A.B.C.D          Network in the BGP routing table to display

  A.B.C.D/M        IP prefix <network>/<length>, e.g., 35.0.0.0/8

  attribute-info   List all bgp attribute information

  cidr-only        Display only routes with non-natural netmasks

  community        Display routes matching the communities

  community-info   List all bgp community information

  community-list   Display routes matching the community-list

  dampened-paths   Display paths suppressed due to dampening

  filter-list      Display routes conforming to the filter-list

  flap-statistics  Display flap statistics of routes

  ipv4             Address family

  neighbors        Detailed information on TCP and BGP neighbor connections

  paths            Path information

  prefix-list      Display routes conforming to the prefix-list

  regexp           Display routes matching the AS path regular expression

  route-map        Display routes matching the route-map

  rsclient         Information about Route Server Client

  scan             BGP scan status

  summary          Summary of BGP neighbor status

  view             BGP view

  vpnv4            Display VPNv4 NLRI specific information

  <cr>

  1. Error Message examples:

Example of error message if your enter incorrect AS number (like 64704 when AS number is 64703):

bgpd(config)# router bgp 64704

BGP is already running; AS is 64703

  1. BGP router reports:

bgpd# show ip bgp

BGP table version is 0, local router ID is x.y.z.125

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, R Removed

Origin codes: i - IGP, e - EGP, ? - incomplete

 

   Network          Next Hop            Metric LocPrf Weight Path

*> 10.10.105.0/29   x.y.z.105                         0 64702 i

*> 10.10.107.0/29   x.y.z.107           0             0 64702 i

*> 10.10.125.0/29   0.0.0.0                  0         32768  i

 

Total number of prefixes 3

 

bgpd# show ip bgp summary

BGP router identifier 10.10.10.103, local AS number 64703

RIB entries 33, using 2112 bytes of memory

Peers 4, using 10048 bytes of memory

 

Neighbor        V    AS MsgRcvd MsgSent   TblVer  InQ OutQ Up/Down  State/PfxRcd

205.146.48.101  4 64703   52120   53003        0    0    0 05w1d04h        9

205.146.48.102  4 64703   52328   52312        0    0    0 01w5d03h        7

205.146.48.104  4 64703   52316   52312        0    0    0 04w1d04h        3

205.146.48.110  4 64705   52128   52308        0    0    0 04w1d04h       10

 

Please note next-hop eBGP path listings from this command in the BGP router (in AS 64704):

bgpd# show ip bgp prefix-list allowed-in

BGP table version is 0, local router ID is 10.0.0.109

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, R Removed

Origin codes: i - IGP, e - EGP, ? - incomplete

 

   Network          Next Hop            Metric LocPrf Weight Path

*> 10.10.10.96/27   0.0.0.0                  1         32768  ?

*                   205.146.48.123                         0 64704 ?

*> 10.10.102.0/29   205.146.48.102                         0 64704 64702 64701 i

*> 10.10.103.0/29   205.146.48.103                         0 64704 64702 64701 i

*> 10.10.106.0/29   205.146.48.106                         0 64704 64702 i

*> 10.10.107.0/29   205.146.48.107                         0 64704 64702 i

*  10.10.109.0/29   0.0.0.0                  1         32768  ?

*>                  0.0.0.0                  1         32768  i

*> 10.10.116.0/29   205.146.48.116                         0 64704 i

*> 10.10.123.0/29   205.146.48.123                         0 64704 i

*> 205.146.48.96/27 0.0.0.0                  1         32768  ?

*                   205.146.48.123                         0 64704 ?

 

Total number of prefixes 9

 

bgpd# show ip bgp cidr-only

BGP table version is 0, local router ID is 10.10.10.123

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, R Removed

Origin codes: i - IGP, e - EGP, ? - incomplete

 

   Network          Next Hop            Metric LocPrf Weight Path

*> 10.10.10.96/27   0.0.0.0                  1         32768  ?

*>i10.10.116.0/29   205.146.48.116           0    100      0  i

*>i10.10.117.0/29   205.146.48.117           0    100      0  i

*  10.10.123.0/29   0.0.0.0                  1         32768  ?

*>                  0.0.0.0                  1         32768  i

*> 205.146.48.96/27 0.0.0.0                  1         32768  ?

 

Total number of prefixes 5

 

bgpd# show ip bgp ipv4 unicast

BGP table version is 0, local router ID is x.y.z.125

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, R Removed

Origin codes: i - IGP, e - EGP, ? - incomplete

 

   Network          Next Hop            Metric LocPrf Weight Path

*>i10.10.10.96/27   x.y.z.117           1    100      0  ?

*                   x.y.z.101                         0 64702 64701 ?

*                   x.y.z.113                         0 64704 ?

* i10.10.10.96/29   x.y.z.103                100      0 64701 i

*>i                 x.y.z.103           0    100      0 64701 i

*                   x.y.z.101                         0 64702 64701 i

* i10.10.101.0/29   x.y.z.101                100      0 64701 i

*>i                 x.y.z.101                100      0 64701 i

*                   x.y.z.101                         0 64702 64701 i

* i10.10.102.0/29   x.y.z.102                100      0 64701 i

*>i                 x.y.z.102                100      0 64701 i

*                   x.y.z.101                         0 64702 64701 i

*>i10.10.103.0/29   x.y.z.103                100      0 64701 ?

*                   x.y.z.101                         0 64702 64701 ?

*>i10.10.104.0/29   x.y.z.104                100      0 64701 i

*                   x.y.z.101                         0 64702 64701 i

* i10.10.107.0/29   x.y.z.107                100      0 64701 64702 i

*>i                 x.y.z.107                100      0 64701 64702 i

*> 10.10.108.0/29   x.y.z.108                         0 64702 i

*> 10.10.109.0/29   x.y.z.109                         0 64704 64703 i

*> 10.10.110.0/29   x.y.z.109                         0 64704 64703 i

*> 10.10.111.0/29   x.y.z.109                         0 64704 64703 i

*> 10.10.112.0/29   x.y.z.109                         0 64704 64703 i

*> 10.10.113.0/29   x.y.z.113                         0 64704 i

*> 10.10.115.0/29   x.y.z.115                         0 64704 i

*> 10.10.116.0/29   x.y.z.116                         0 64704 i

*>i10.10.117.0/29   x.y.z.117           0    100      0  i

*>i10.10.118.0/29   x.y.z.118           0    100      0  i

*> 10.10.125.0/29   0.0.0.0                  0         32768  i

*>ix.y.z.96/27 x.y.z.117           1    100      0  ?

*                   x.y.z.101                         0 64702 64701 ?

*                   x.y.z.113                         0 64704 ?

Total number of prefixes 19

 

bgpd# show ip bgp prefix-list allowed-in

BGP table version is 0, local router ID is x.y.z.125

Status codes: s suppressed, d damped, h history, * valid, > best, i - internal,

              r RIB-failure, S Stale, R Removed

Origin codes: i - IGP, e - EGP, ? - incomplete

 

   Network          Next Hop            Metric LocPrf Weight Path

*>i10.10.10.96/27   x.y.z.117           1    100      0  ?

*                   x.y.z.101                         0 64702 64701 ?

*                   x.y.z.113                         0 64704 ?

* i10.10.10.96/29   x.y.z.103                100      0 64701 i

*>i                 x.y.z.103           0    100      0 64701 i

*                   x.y.z.101                         0 64702 64701 i

* i10.10.101.0/29   x.y.z.101                100      0 64701 i

*>i                 x.y.z.101                100      0 64701 i

*                   x.y.z.101                         0 64702 64701 i

* i10.10.102.0/29   x.y.z.102                100      0 64701 i

*>i                 x.y.z.102                100      0 64701 i

*                   x.y.z.101                         0 64702 64701 i

*>i10.10.103.0/29   x.y.z.103                100      0 64701 ?

*                   x.y.z.101                         0 64702 64701 ?

*>i10.10.104.0/29   x.y.z.104                100      0 64701 i

*                   x.y.z.101                         0 64702 64701 i

*> 10.10.108.0/29   x.y.z.108                         0 64702 i

*> 10.10.109.0/29   x.y.z.109                         0 64704 64703 i

*> 10.10.110.0/29   x.y.z.109                         0 64704 64703 i

*> 10.10.111.0/29   x.y.z.109                         0 64704 64703 i

*> 10.10.112.0/29   x.y.z.109                         0 64704 64703 i

*> 10.10.113.0/29   x.y.z.113                         0 64704 i

*> 10.10.115.0/29   x.y.z.115                         0 64704 i

*> 10.10.116.0/29   x.y.z.116                         0 64704 i

*>i10.10.117.0/29   x.y.z.117           0    100      0  i

*>i10.10.118.0/29   x.y.z.118           0    100      0  i

*> 10.10.125.0/29   0.0.0.0                  0         32768  i

*>ix.y.z.96/27 x.y.z.117           1    100      0  ?

*                   x.y.z.101                         0 64702 64701 ?

*                   x.y.z.113                         0 64704 ?

Total number of prefixes 18

 

bgpd# show ip bgp neighbors

BGP neighbor is x.y.z.101, remote AS 64701, local AS 64702, external link

  BGP version 4, remote router ID 10.10.10.101

  BGP state = Established, up for 00:03:19

  Last read 00:00:19, hold time is 180, keepalive interval is 60 seconds

  Neighbor capabilities:

    Route refresh: advertised and received(old & new)

    Address family IPv4 Unicast: advertised and received

  Message statistics:

    Inq depth is 0

    Outq depth is 0

                         Sent       Rcvd

    Opens:                  1          1

    Notifications:          0          0

    Updates:               11          5

    Keepalives:             5          4

    Route Refresh:          0          0

    Capability:             0          0

    Total:                 17         10

  Minimum time between advertisement runs is 30 seconds

 

 For address family: IPv4 Unicast

  Community attribute sent to this neighbor(both)

  Inbound path policy configured

  Incoming update prefix filter list is *allowed-in

  8 accepted prefixes

 

  Connections established 1; dropped 0

  Last reset never

Local host: x.y.z.107, Local port: 2480

Foreign host: x.y.z.101, Foreign port: 179

Nexthop: x.y.z.107

Nexthop global: ::

Nexthop local: ::

BGP connection: non shared network

Read thread: on  Write thread: off

 

BGP neighbor is x.y.z.105, remote AS 64702, local AS 64702, internal link

  BGP version 4, remote router ID 0.0.0.0

  BGP state = Active

  Last read 00:03:27, hold time is 180, keepalive interval is 60 seconds

  Message statistics:

    Inq depth is 0

    Outq depth is 0

                         Sent       Rcvd

    Opens:                  2          0

    Notifications:          0          0

    Updates:                0          0

    Keepalives:             0          0

    Route Refresh:          0          0

    Capability:             0          0

    Total:                  2          0

  Minimum time between advertisement runs is 5 seconds

 

 For address family: IPv4 Unicast

  Community attribute sent to this neighbor(both)

  0 accepted prefixes

 

  Connections established 0; dropped 0

  Last reset never

Local host: x.y.z.107, Local port: 3433

Foreign host: x.y.z.105, Foreign port: 179

Nexthop: x.y.z.107

Nexthop global: ::

Nexthop local: ::

BGP connection: non shared network

Next connect timer due in 39 seconds

Read thread: off  Write thread: off

 

BGP neighbor is x.y.z.106, remote AS 64702, local AS 64702, internal link

  BGP version 4, remote router ID 0.0.0.0

  BGP state = Active

  Last read 00:03:27, hold time is 180, keepalive interval is 60 seconds

  Message statistics:

    Inq depth is 0

    Outq depth is 0

                         Sent       Rcvd

    Opens:                  0          0

    Notifications:          0          0

    Updates:                0          0

    Keepalives:             0          0

    Route Refresh:          0          0

    Capability:             0          0

    Total:                  0          0

  Minimum time between advertisement runs is 5 seconds

 

 For address family: IPv4 Unicast

  Community attribute sent to this neighbor(both)

  0 accepted prefixes

 

  Connections established 0; dropped 0

  Last reset never

Next connect timer due in 46 seconds

Read thread: off  Write thread: off

 

BGP neighbor is x.y.z.108, remote AS 64702, local AS 64702, internal link

  BGP version 4, remote router ID 10.10.10.108

  BGP state = Established, up for 00:03:22

  Last read 00:00:22, hold time is 180, keepalive interval is 60 seconds

  Neighbor capabilities:

    Route refresh: advertised and received(old & new)

    Address family IPv4 Unicast: advertised and received

  Message statistics:

    Inq depth is 0

    Outq depth is 0

                         Sent       Rcvd

    Opens:                  1          1

    Notifications:          0          0

    Updates:                5          8

    Keepalives:             5          4

    Route Refresh:          0          0

    Capability:             0          0

    Total:                 11         13

  Minimum time between advertisement runs is 5 seconds

 

 For address family: IPv4 Unicast

  Community attribute sent to this neighbor(both)

  10 accepted prefixes

 

  Connections established 1; dropped 0

  Last reset never

Local host: x.y.z.107, Local port: 2113

Foreign host: x.y.z.108, Foreign port: 179

Nexthop: x.y.z.107

Nexthop global: ::

Nexthop local: ::

BGP connection: non shared network

Read thread: on  Write thread: off

 

BGP neighbor is x.y.z.125, remote AS 64705, local AS 64702, external link

  BGP version 4, remote router ID x.y.z.125

  BGP state = Established, up for 00:03:22

  Last read 00:00:22, hold time is 180, keepalive interval is 60 seconds

  Neighbor capabilities:

    Route refresh: advertised and received(old & new)

    Address family IPv4 Unicast: advertised and received

  Message statistics:

    Inq depth is 0

    Outq depth is 0

                         Sent       Rcvd

    Opens:                  1          1

    Notifications:          0          0

    Updates:                6          2

    Keepalives:             5          4

    Route Refresh:          0          0

    Capability:             0          0

    Total:                 12          7

  Minimum time between advertisement runs is 30 seconds

 

 For address family: IPv4 Unicast

  Community attribute sent to this neighbor(both)

  Inbound path policy configured

  Incoming update prefix filter list is *allowed-in

  2 accepted prefixes

 

  Connections established 1; dropped 0

  Last reset never

Local host: x.y.z.107, Local port: 3430

Foreign host: x.y.z.125, Foreign port: 179

Nexthop: x.y.z.107

Nexthop global: ::

Nexthop local: ::

BGP connection: non shared network

Read thread: on  Write thread: off

  1. Checking ip route with both BGPv4 and OSPFv2 running:

vm-test:/home/test# ip route

10.10.117.0/29 via 205.146.48.117 dev eth0  proto zebra            çBGP note eth0 and via address

10.10.115.0/29 via 10.10.10.115 dev eth1  proto zebra  metric 20   çOSPF note eth1 and via address

10.10.109.0/29 via 10.10.10.109 dev eth1  proto zebra  metric 20   çOSPF note eth1 and via address

10.10.105.0/29 via 10.10.10.105 dev eth1  proto zebra  metric 20   çOSPF note eth1 and via address

10.10.123.0/29 dev eth1  proto kernel  scope link  src 10.10.123.2

10.10.10.96/27 dev eth1  proto kernel  scope link  src 10.10.10.123

205.146.48.96/27 dev eth0  proto kernel  scope link  src 205.146.48.123

default via 205.146.48.97 dev eth0

  1. Checking netstat –an (note LISTEN and ESTABLISHED for port 179, also LISTEN for 2605 (Quagga bgpd); 2601 is zebra).

vm-xyzst0:/# netstat -an

Active Internet connections (servers and established)

Proto Recv-Q Send-Q Local Address           Foreign Address         State

tcp        0      0 0.0.0.0:2601            0.0.0.0:*               LISTEN

tcp        0      0 0.0.0.0:2605            0.0.0.0:*               LISTEN

tcp        0      0 0.0.0.0:179             0.0.0.0:*               LISTEN

tcp        0      0 0.0.0.0:22              0.0.0.0:*               LISTEN

tcp        0      0 127.0.0.1:25            0.0.0.0:*               LISTEN

tcp        0    284 x.y.z.125:22       71.182.227.207:2763     ESTABLISHED

tcp        0      0 x.y.z.125:179      x.y.z.107:4336     ESTABLISHED

  1. Checking netstat -rn

vm-xyzst0:~# netstat -rn

Kernel IP routing table

Destination     Gateway         Genmask         Flags   MSS Window  irtt Iface

10.10.101.0     10.10.10.101    255.255.255.248 UG        0 0          0 eth1

10.10.10.96     x.y.z.103  255.255.255.248 UG        0 0          0 eth0

10.10.117.0     10.10.10.117    255.255.255.248 UG        0 0          0 eth1

10.10.116.0     x.y.z.116  255.255.255.248 UG        0 0          0 eth0

10.10.103.0     x.y.z.103  255.255.255.248 UG        0 0          0 eth0

10.10.119.0     10.10.10.119    255.255.255.248 UG        0 0          0 eth1

10.10.118.0     x.y.z.118  255.255.255.248 UG        0 0          0 eth0

10.10.102.0     x.y.z.102  255.255.255.248 UG        0 0          0 eth0

10.10.113.0     x.y.z.113  255.255.255.248 UG        0 0          0 eth0

10.10.112.0     x.y.z.109  255.255.255.248 UG        0 0          0 eth0

10.10.115.0     x.y.z.115  255.255.255.248 UG        0 0          0 eth0

10.10.114.0     10.10.10.114    255.255.255.248 UG        0 0          0 eth1

10.10.109.0     x.y.z.109  255.255.255.248 UG        0 0          0 eth0

10.10.125.0     0.0.0.0         255.255.255.248 U         0 0          0 eth1

10.10.108.0     x.y.z.108  255.255.255.248 UG        0 0          0 eth0

10.10.111.0     x.y.z.109  255.255.255.248 UG        0 0          0 eth0

10.10.110.0     x.y.z.109  255.255.255.248 UG        0 0          0 eth0

10.10.105.0     10.10.10.105    255.255.255.248 UG        0 0          0 eth1

10.10.104.0     x.y.z.104  255.255.255.248 UG        0 0          0 eth0

10.10.107.0     x.y.z.107  255.255.255.248 UG        0 0          0 eth0

10.10.10.96     0.0.0.0         255.255.255.224 U         0 0          0 eth1

x.y.z.96   0.0.0.0         255.255.255.224 U         0 0          0 eth0

0.0.0.0         x.y.z.97   0.0.0.0         UG        0 0          0 eth0

  1. Checking ip route – For BGP Routing Analytics, see: i6230vlabnet7-BGP_RAN.htm

vm-xyzst0:~# ip route

10.10.101.0/29 via 10.10.10.101 dev eth1  proto zebra  metric 20

10.10.10.96/29 via x.y.z.103 dev eth0  proto zebra

10.10.117.0/29 via 10.10.10.117 dev eth1  proto zebra  metric 20

10.10.116.0/29 via x.y.z.116 dev eth0  proto zebra

10.10.103.0/29 via x.y.z.103 dev eth0  proto zebra

10.10.119.0/29 via 10.10.10.119 dev eth1  proto zebra  metric 20

10.10.118.0/29 via x.y.z.118 dev eth0  proto zebra

10.10.102.0/29 via x.y.z.102 dev eth0  proto zebra

10.10.113.0/29 via x.y.z.113 dev eth0  proto zebra

10.10.112.0/29 via x.y.z.109 dev eth0  proto zebra

10.10.115.0/29 via x.y.z.115 dev eth0  proto zebra

10.10.114.0/29 via 10.10.10.114 dev eth1  proto zebra  metric 20

10.10.109.0/29 via x.y.z.109 dev eth0  proto zebra

10.10.125.0/29 dev eth1  proto kernel  scope link  src 10.10.125.1

10.10.108.0/29 via x.y.z.108 dev eth0  proto zebra

10.10.111.0/29 via x.y.z.109 dev eth0  proto zebra

10.10.110.0/29 via x.y.z.109 dev eth0  proto zebra

10.10.105.0/29 via 10.10.10.105 dev eth1  proto zebra  metric 20

10.10.104.0/29 via x.y.z.104 dev eth0  proto zebra

10.10.107.0/29 via x.y.z.107 dev eth0  proto zebra

10.10.10.96/27 dev eth1  proto kernel  scope link  src 10.10.10.125

x.y.z.96/27 dev eth0  proto kernel  scope link  src x.y.z.125

default via x.y.z.97 dev eth0

  1. ip route | sort

vm-test:/home/test# ip route | sort

10.10.10.96/27 dev eth1  proto kernel  scope link  src 10.10.10.123

10.10.101.0/29 via 205.146.48.101 dev eth0  proto zebra

10.10.102.0/29 via 205.146.48.102 dev eth0  proto zebra

10.10.103.0/29 via 205.146.48.103 dev eth0  proto zebra

10.10.104.0/29 via 205.146.48.104 dev eth0  proto zebra

10.10.105.0/29 via 205.146.48.105 dev eth0  proto zebra

10.10.106.0/29 via 205.146.48.106 dev eth0  proto zebra

10.10.107.0/29 via 205.146.48.107 dev eth0  proto zebra

10.10.109.0/29 via 205.146.48.109 dev eth0  proto zebra

10.10.110.0/29 via 205.146.48.110 dev eth0  proto zebra

10.10.111.0/29 via 205.146.48.111 dev eth0  proto zebra

10.10.113.0/29 via 205.146.48.113 dev eth0  proto zebra

10.10.114.0/29 via 205.146.48.114 dev eth0  proto zebra

10.10.115.0/29 via 205.146.48.115 dev eth0  proto zebra

10.10.116.0/29 via 205.146.48.116 dev eth0  proto zebra

10.10.117.0/29 via 205.146.48.117 dev eth0  proto zebra  metric 1

10.10.123.0/29 dev eth1  proto kernel  scope link  src 10.10.123.2

205.146.48.96/27 dev eth0  proto kernel  scope link  src 205.146.48.123

default via 205.146.48.97 dev eth0

  1. BGP Update Message example.

Frame 13 (112 bytes on wire, 112 bytes captured)

    Arrival Time: Nov 30, 2007 16:46:55.325487000

    [Time delta from previous packet: 0.964156000 seconds]

    [Time since reference or first frame: 1.039985000 seconds]

    Frame Number: 13

    Packet Length: 112 bytes

    Capture Length: 112 bytes

    [Frame is marked: False]

    [Protocols in frame: eth:ip:tcp:bgp]

Ethernet II, Src: Xensourc_3f:9c:a1 (00:16:3e:3f:9c:a1), Dst: Xensourc_22:e3:58 (00:16:3e:22:e3:58)

    Destination: Xensourc_22:e3:58 (00:16:3e:22:e3:58)

        Address: Xensourc_22:e3:58 (00:16:3e:22:e3:58)

        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)

        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)

    Source: Xensourc_3f:9c:a1 (00:16:3e:3f:9c:a1)

        Address: Xensourc_3f:9c:a1 (00:16:3e:3f:9c:a1)

        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)

        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)

    Type: IP (0x0800)

Internet Protocol, Src: x.y.z.107 (x.y.z.107), Dst: x.y.z.125 (x.y.z.125)

    Version: 4

    Header length: 20 bytes

    Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)

        0000 00.. = Differentiated Services Codepoint: Default (0x00)

        .... ..0. = ECN-Capable Transport (ECT): 0

        .... ...0 = ECN-CE: 0

    Total Length: 98

    Identification: 0xb25f (45663)

    Flags: 0x04 (Don't Fragment)

        0... = Reserved bit: Not set

        .1.. = Don't fragment: Set

        ..0. = More fragments: Not set

    Fragment offset: 0

    Time to live: 1

    Protocol: TCP (0x06)

    Header checksum: 0xcb29 [correct]

        [Good: True]

        [Bad : False]

    Source: x.y.z.107 (x.y.z.107)

    Destination: x.y.z.125 (x.y.z.125)

Transmission Control Protocol, Src Port: 2873 (2873), Dst Port: bgp (179), Seq: 84, Ack: 84, Len: 46

    Source port: 2873 (2873)

    Destination port: bgp (179)

    Sequence number: 84    (relative sequence number)

    [Next sequence number: 130    (relative sequence number)]

    Acknowledgement number: 84    (relative ack number)

    Header length: 32 bytes

    Flags: 0x18 (PSH, ACK)

        0... .... = Congestion Window Reduced (CWR): Not set

        .0.. .... = ECN-Echo: Not set

        ..0. .... = Urgent: Not set

        ...1 .... = Acknowledgment: Set

        .... 1... = Push: Set

        .... .0.. = Reset: Not set

        .... ..0. = Syn: Not set

        .... ...0 = Fin: Not set

    Window size: 5840 (scaled)

    Checksum: 0xfc61 [incorrect, should be 0x0fed (maybe caused by checksum offloading?)]

    Options: (12 bytes)

        NOP

        NOP

        Timestamps: TSval 12429545, TSecr 34891405

Border Gateway Protocol

    UPDATE Message

        Marker: 16 bytes

        Length: 46 bytes

        Type: UPDATE Message (2)

        Unfeasible routes length: 0 bytes

        Total path attribute length: 18 bytes

        Path attributes

            ORIGIN: IGP (4 bytes)

                Flags: 0x40 (Well-known, Transitive, Complete)

                    0... .... = Well-known

                    .1.. .... = Transitive

                    ..0. .... = Complete

                    ...0 .... = Regular length

                Type code: ORIGIN (1)

                Length: 1 byte

                Origin: IGP (0)

            AS_PATH: 64702 (7 bytes)

                Flags: 0x40 (Well-known, Transitive, Complete)

                    0... .... = Well-known

                    .1.. .... = Transitive

                    ..0. .... = Complete

                    ...0 .... = Regular length

                Type code: AS_PATH (2)

                Length: 4 bytes

                AS path: 64702

                    AS path segment: 64702

                        Path segment type: AS_SEQUENCE (2)

                        Path segment length: 1 AS

                        Path segment value: 64702

            NEXT_HOP: x.y.z.105 (7 bytes)

                Flags: 0x40 (Well-known, Transitive, Complete)

                    0... .... = Well-known

                    .1.. .... = Transitive

                    ..0. .... = Complete

                    ...0 .... = Regular length

                Type code: NEXT_HOP (3)

                Length: 4 bytes

                Next hop: x.y.z.105 (x.y.z.105)

        Network layer reachability information: 5 bytes

            10.10.105.0/29

                NLRI prefix length: 29

                NLRI prefix: 10.10.105.0 (10.10.105.0)

  1. Note Port Number 179, ACK message example.

Frame 16 (66 bytes on wire, 66 bytes captured)

    Arrival Time: Nov 30, 2007 16:46:55.363603000

    [Time delta from previous packet: 0.036999000 seconds]

    [Time since reference or first frame: 1.078101000 seconds]

    Frame Number: 16

    Packet Length: 66 bytes

    Capture Length: 66 bytes

    [Frame is marked: False]

    [Protocols in frame: eth:ip:tcp]

Ethernet II, Src: Xensourc_22:e3:58 (00:16:3e:22:e3:58), Dst: Xensourc_3f:9c:a1 (00:16:3e:3f:9c:a1)

    Destination: Xensourc_3f:9c:a1 (00:16:3e:3f:9c:a1)

        Address: Xensourc_3f:9c:a1 (00:16:3e:3f:9c:a1)

        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)

        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)

    Source: Xensourc_22:e3:58 (00:16:3e:22:e3:58)

        Address: Xensourc_22:e3:58 (00:16:3e:22:e3:58)

        .... ...0 .... .... .... .... = IG bit: Individual address (unicast)

        .... ..0. .... .... .... .... = LG bit: Globally unique address (factory default)

    Type: IP (0x0800)

Internet Protocol, Src: x.y.z.125 (x.y.z.125), Dst: x.y.z.107 (x.y.z.107)

    Version: 4

    Header length: 20 bytes

    Differentiated Services Field: 0x00 (DSCP 0x00: Default; ECN: 0x00)

        0000 00.. = Differentiated Services Codepoint: Default (0x00)

        .... ..0. = ECN-Capable Transport (ECT): 0

        .... ...0 = ECN-CE: 0

    Total Length: 52

    Identification: 0xebd0 (60368)

    Flags: 0x04 (Don't Fragment)

        0... = Reserved bit: Not set

        .1.. = Don't fragment: Set

        ..0. = More fragments: Not set

    Fragment offset: 0

    Time to live: 1

    Protocol: TCP (0x06)

    Header checksum: 0x91e6 [correct]

        [Good: True]

        [Bad : False]

    Source: x.y.z.125 (x.y.z.125)

    Destination: x.y.z.107 (x.y.z.107)

Transmission Control Protocol, Src Port: bgp (179), Dst Port: 2873 (2873), Seq: 137, Ack: 183, Len: 0

    Source port: bgp (179)

    Destination port: 2873 (2873)

    Sequence number: 137    (relative sequence number)

    Acknowledgement number: 183    (relative ack number)

    Header length: 32 bytes

    Flags: 0x10 (ACK)

        0... .... = Congestion Window Reduced (CWR): Not set

        .0.. .... = ECN-Echo: Not set

        ..0. .... = Urgent: Not set

        ...1 .... = Acknowledgment: Set

        .... 0... = Push: Not set

        .... .0.. = Reset: Not set

        .... ..0. = Syn: Not set

        .... ...0 = Fin: Not set

    Window size: 5792 (scaled)

    Checksum: 0xd7d6 [correct]

    Options: (12 bytes)

        NOP

        NOP

        Timestamps: TSval 34891665, TSecr 12429545

    [SEQ/ACK analysis]

        [This is an ACK to the segment in frame: 15]

        [The RTT to ACK the segment was: 0.036999000 seconds]

m, n = student domain number {nÎN | ((n ≥ 101) Ù (n ≤ 126))}

x.y.z. = first three octets of assigned routable network addresses for INFS6230.

Valerie J. H. Powell, RMU C&IS; Randall S. Johnson, RMU IT Technical Services

© 2006 by Robert Morris University

Update: 2009-12-30