Gated is configured by editing a configuration file, /etc/gated.conf. The syntax for the gated
configuration file is detailed in the Gated Documentation available from
www.gated.org. The configuration to
be used for this setup is annotated below.
All interfaces are passive that is Gated will not
alter the preference for these connected routes:
Set the AS number and Router ID:
RIP, EGP and OSPF are explicitly turned off. BGP is configured
with two peers, 192.168.192.13 and 192.168.193.14
with AS numbers 64700 and 64602 respectively.
The first peer is configured to use multi-hop BGP by specifying the
gateway for all routes learnt via this session.
All routes learnt from peers with AS 64602, as well as all
directly connected routes should be distributed to peers with AS
64700. In context of the BGP configuration specified above this
means that 192.168.193.0/24 and any routes learnt from
192.168.193.14 will be redistributed to 192.168.192.13.
Thus the peer in POP X will know about all the routes that this
router can see.
No routes should be sent to peers with AS 64602. That is this
router should not send any routes to the router in Network C.
Gated can verify that the syntax of the configuration file is correct.
If the following command produces no output to the terminal and
exits then the config file is syntactically correct:
As discussed in the configuration of
Dents for the POP X router
it is advantageous for routing daemons running on the route
servers for Super Sparrow not to alter the kernel routing table.
To effect this the -n command line option may be used. If Gated
was installed from an RPM then /etc/sysconfig/gated should be
edited to reflect this, otherwise when gated is run -n
should be specified..
If Gated has been installed as an RPM then it can be started using
its init script:
Otherwise, it should be started manually:
Gated should log messages to syslog. Most likely these will
end up in /var/log/messages.
If Gated was installed as an RPM, then chkconfig
can be used to verify that the install set gated to be started
on reboot:
If Gated was not installed as an RPM then adding the following
to /etc/rc.d/rc.local should ensure that gated is started
on system boot. The paths may need to be altered to match the
installation.
The Gated Interactive Interface (GII) allows status information
to be obtained from gated. Before accessing this service an
entry for gii needs to be added to /etc/services.
If Gated was installed as an RPM this is done automatically, otherwise
the following should be added manually:
The password used to grant access to this service the
password for the user gii. If gated was installed
from RPM this user is automatically added with an empty password
forbidding access. If Gated was installed by other means then
this user will need to be added.
To set the password the passwd command. This should match the
password specified in /etc/dents.xml, in
the case of the example given, frub is used.
GII can be used to obtain a variety of information from a running
Gated, including information on BGP peers:
And the prefix covering a given IP address:
This is more or less analogous to the output of
sho ip bgp sum and
sho ip bgp 192.168.192.10 using
GNU Zebra's bgpd
or Cisco IOS.
For reference the resulting configuration file for
the gated daemon is available.
POP Y Router:
/etc/gated.conf.
A complete set of configuration files for this network setup
can be found here.
Please see references.
Copyright © 2000 HormsBuilding the Configuration File
interfaces {interface all passive; };
autonomoussystem 64702;
routerid 192.168.193.11;
rip no;
egp no;
bgp yes {
group type External peeras 64700 {
peer 192.168.192.13 gateway 192.168.193.14;
} ;
group type External peeras 64602 { peer 192.168.193.14 ; } ;
} ;
ospf no;
export proto bgp as 64700 {
proto bgp as 64602 { ALL metric 1; };
proto direct { ALL metric 1; } ;
} ;
export proto bgp as 64602 { } ;
Starting Gated and Debugging
$ gated -C
# GATED_COMMAND_LINE_OPTIONS defines command line options that
# will be passed to gated when it is started.
#
# Uncomment the following to prevent gated from altering
# the kernel routing table
GATED_COMMAND_LINE_OPTIONS="-n"
$ /etc/rc.d/init.d/gated start
Starting gated [ OK ]
$ /usr/sbin/gated -n
Running Gated on System Boot
$ chkconfig --list gated
gated 0:off 1:off 2:on 3:on 4:on 5:on 6:off
If this is not the case, then use chkconfig rectify this
and then use the preceding command to verify the change.
$ chkconfig --add gated
if [ -x /usr/sbin/gated -a -e /etc/gated.conf ]; then
echo Starting gated
/usr/sbin/gated -n
fi
Gated Interactive Interface (GII)
gii 616/tcp #Gated gii
$ /usr/sbin/useradd -c "Gated gii user" -s /bin/false gii
$ passwd gii
Changing password for user gii
New UNIX password:
BAD PASSWORD: it is too short
Retype new UNIX password:
passwd: all authentication tokens updated successfully
$ telnet localhost gii
Trying 127.0.0.1...
Connected to localhost.localdomain.
Escape character is '^]'.
Password?
100 Gated Interactive Interface. Version gated-public-3_6
GateD-roger> sho bgp sum
100 Neighbor V AS MsgRcvd MsgSent State
100 192.168.192.13 4 64700 57 55 Established
100 192.168.193.14 4 64602 56 53 Established
100 BGP summary, 2 groups, 2 peers.
GateD-roger> sh ip walkup 192.168.192.10
100 BGP 192.168.192/24 192.168.193.14 (64702) 64700 64600 IGP (Id 2)
GateD-roger> quit
Connection closed by foreign host.
Configuration File
References
Notes on Commands
Commands shown in paragraphs of preformated text are prefixed by the shell
prompt $ to avoid confusion between commands and their output. An
instruction to run the command echo flim is formated as:
$ echo flim
flim
Last Updated: Tue May 17 17:37:17 2005