RMU VLabNet 7-BGP-T - Virtual Laboratory Networking Exercises

INFS6230 and INFS6760 – RMU C&IS

 

Trouble-Shooting Page

 

  1. Is my daemons file correct? Please enable just zebra and bgpd. FILE: /etc/quagga/daemons

zebra=yes

bgpd=yes

ospfd=no

ospf6d=no

ripd=no

ripngd=no

isisd=no

  1. Did I start zebra first (before bgpd)? Check this with ps –A to see if the zebra process exists and is above the bgpd process.

vm-vjhst0:~# ps -A

  PID TTY          TIME CMD

 1334 ?        00:00:00 zebra

 1697 ?        00:00:00 syslog-ng

 2108 ?        00:00:00 bgpd

20670 ?        00:00:00 sshd

20674 ttyp0    00:00:00 bash

20679 ttyp0    00:00:00 ps

  1. Is my BGP configuration file correct? In the following configuration file example, all comment lines are backgrounded with a different color. These lines could be omitted, but including internal documentation is part of best practice to support software and network maintenance and should be done. Be careful to substitute VM/Router numbers carefully for the designations <ir0>, <er1>, etc. Consult Figure 3-7 (BGP Router Assignments and Peerings) and Figure 3-8. (Mesh iBGP Peering in an Autonomous System). This (latter) is a model of the (internal) iBGP peering within a single autonomous system, AS 64502, and its (external) eBGP peerings.
  2. Example configuration file FILE: /etc/quagga/bgpd.conf :

! Configuration file model for VM 1mm in AS <asnumber>

! INFS6230 Fall 2010 RMU C&IS

!

hostname bgpd

password #####

enable password #####

!

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

!

router bgp <asnumber>

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 64502

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

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

!

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

! (from your eBGP neighbor list)

!

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

!

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

 

 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

!

Example ‘show run’:

In the BGP router, you can see what is being used by the command ‘show run.’ Compare this result (for VM/Router 125 in AS 64505) with your own configuration file.

vm-vjhst0:~# telnet localhost 2605

Trying 127.0.0.1...

Connected to localhost.

Escape character is '^]'.

 

Hello, this is Quagga (version 0.99.5).

Copyright 1996-2005 Kunihiro Ishiguro, et al.

 

 

User Access Verification

 

Password: #####

bgpd> enable

Password: #####

bgpd# show run

 

Current configuration:

!

hostname bgpd

password #####

enable password #####

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

log stdout

log syslog

!

router bgp 64505

 bgp router-id x.y.z.125

 bgp log-neighbor-changes

 bgp network import-check

 network 10.10.125.0/29

 redistribute connected

 neighbor x.y.z.107 remote-as 64502

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

!

ip prefix-list allowed-in seq 5 deny 10.10.107.0/29

ip prefix-list allowed-in seq 10 permit any

!

line vty

!

end

Notes (for a router in AS 64505):

Password: #####

bgpd> enable

Password: #####

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

bgpd(config)#

bgpd(config)# router bgp 64505

bgpd(config-router)# redistribute connected

bgpd(config-router)#

Please note that the commands redistribute connected, bgp log-neighbor-changes, and bgp network import-check were not in the configuration file, they were entered as commands through the router. Show run does not show the iBGP mesh neighbors, just the eBGP peerings. Comments in the configuration file are not reproduced by show run.

If you make an error in your configuration file, you will get a message like (for example):

vm-dsmst9:~# /usr/lib/quagga/bgpd -d
There is no such command.
Error occured during reading below line.
<whatever the line says.>

Try deleting or editing the line given.

If you make a mistake in the router identifying your AS, it will not be accepted:

bgpd(config)# router bgp 62603

BGP is already running; AS is 64503

Simply reenter the command using the correct AS number.

Once you have edited (and modified) your configuration file, it is necessary to shut BGP down and then start it up again in order for BGP to use your revised configuration file: To shut BGP down: kill `cat /var/run/quagga/bgpd.pid` To (re-)start BGP: /usr/lib/quagga/bgpd -d

 

  1. Is my BGP router running properly?
    1. Check ps –A to see if there is a bgpd process. If not, when the configuration file is correct, start bgpd.

COMMAND: usr/lib/quagga/bgpd -d

    1. Check netstatan to see if there are Port 179 TCP conversation(s) established and if there is listening on Ports 179 (BGP), 2605 (bgpd), and 2601 (zebra).

vm-vjhst0:~# 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:3136     ESTABLISHED

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

    1. The remaining evaluation (as to whether a BGP router is running properly) has to be done by checking peering and paths and comparing notes with output from other routers in the same and different Autonomous Systems.
  1. The log file can contain information of use in case of problems.
    1. Example of normal function:

2007/12/09 19:15:33 BGP: %ADJCHANGE: neighbor x.y.z.107 Down Peer closed the session

2007/12/09 19:15:44 BGP: %ADJCHANGE: neighbor x.y.z.107 Up

    1. Example of problem:

[Indications of resets, problems with peer communications.]

 

Thanks to students in INFS6230A (Fall 2007) for recommendations on and ideas for this page.

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: 2010-11-17