Kostis Netzwerkberatung
Konstantinos Kostis
Talstr. 25, D-63322 Rödermark
Tel. +49 6074 881056, FAX 881058
kosta@kostis.net, http://www.kostis.net/
You may use this software free of charge at your own risk
netdb 3.0.6 (2001-01-29)
Format files
File Function cisco-example.frm example Cisco router configuration csv-dos.frm CSV export format with MS-DOS EOLN ('\r', '\n') csv-tab.frm TAB separated export format csv.frm CSV export format with Unix EOLN ('\n') dhcpd.frm dhcpd.conf line (template for one entry) hosts.frm hosts file line (template for one entry) unique.frm format to detect address collisions vsatping.frm format for a special application Directory Content find/ format files supporting searches named/ format files for creating DNS zone files properties/ format files for getting values of properties
Not currently used by any netdb script. May be of use anyway.
See csv.frm - only difference is it has MS-DOS eoln (CR and LF).
Not currently used by any netdb script. May be of use anyway.
See csv.frm - differences are
Used by
The follwing text is stored as a single line even though it may be line wrapped on your display/printout:
"%hostname%","%domain%","%ipaddr%","%ipmask%","%mac%","%comment%","%isdnarea%","%isdnnum%","%x25%","%ipxaddr%","%ipxlan%","%decnet%","%location%","%hubport%","%user%","%cnames%"
Used by
Needs leading empty line.
host %hostname%
{
hardware ethernet %colonmac% ;
fixed-address %hostname%.%domainroot% ;
}
Used by
%ipaddr% %hostname%.%domainroot% %hostname% # %location%
Used by
%hostname%,%ipaddr%,%ipxlan%%ipxaddr%,%decnet%,%x25%
Used by
<tr><td>%location%</td><td><a href="/cgi-bin/vsat/vsatping.cgi?%hostname%_%ipaddr%">%hostname%</a></td><td>%ipaddr%</td></tr>
Format files used for searching/finding
Used by
File Content findhn.frm Find netdb entries sorted by hostname findhs.frm Find netdb entries in hosts format sorted by hostname findip.frm Find netdb entries sorted by ipaddr
The follwing text is stored as a single line even though it most likely is line wrapped on your display/printout:
<tr><td>%hostname%%domain%.%domainroot%</td><td>%ipaddr% </td><td>%mac% </td><td>%hubport% </td><td>%location% </td><td>%user% </td></tr>
The follwing text is stored as a single line even though it may be line wrapped on your display/printout:
%ipaddr% %hostname%.%domainroot% %hostname% # %location%/%user%
The follwing text is stored a single line even though it most likely is line wrapped on your display/printout:
%ipaddr% </td><td>%hostname%%domain%.%domainroot% </td><td>%mac% </td><td>%hubport% </td><td>%location% </td><td>%user% </td></tr>
Note that this format file does not include leading <tr><td> HTML tags allowing proper sorting. Those tags are added by the script using this format file after sorting.
DNS/bind format files
Used by /etc/netdb/bin/netdb.mknamed*
File Content add-cname.frm input for nspdate adding RR cname add.frm input for nspdate adding RR A and PTR cnameslist.frm %hostname% %cnames% del-cname.frm input for nspdate deleting RR cname del.frm input for nspdate deleting RR A and PTR named-h.frm RR A in DNS zone file format named-r1.frm RR PTR in DNS zone file format (fixed /24) named-r2.frm RR PTR in DNS zone file format (fixed /16) named-r3.frm RR PTR in DNS zone file format (fixed /8)
Used by
update add %cname%.%domainroot% 86400 CNAME %hostname%.%domainroot%.
You may want to change the TTL value marked green.
Used by
update add %hostname%.%domainroot% 86400 A %ipaddr%
update add %iphostrev4%.in-addr.arpa 86400 PTR %hostname%.%domainroot%.
You may want to change the TTL value marked green.
Used by
%hostname% %cnames%
Used by
update delete %cname%.%domainroot% CNAME
Used by
update delete %hostname%.%domainroot% A
update delete %iphostrev4%.in-addr.arpa PTR
Used by
%hostname% IN A %ipaddr%
Used by
%iphostrev1% IN PTR %hostname%.%ROOTDOMAIN%.
Used by
%iphostrev2% IN PTR %hostname%.%ROOTDOMAIN%.
Used by
%iphostrev3% IN PTR %hostname%.%ROOTDOMAIN%.
Contains format files for all netdb properties and functions. Filenames are identical to properties and functions with extension ".frm".
Content of each file is the property or function it represents.
Used by
content of /etc/netdb/frm/properties/hostname.frm
%hostname%
This is an example Cisco router configuration for a serial line router such as a Cisco 1601 connecting a remote LAN to a central router via serial interface and a leased line.
It is really just an example of what you can do with netdb. You can use this template and generate a complete and always identical configuration for all your leaf LAN routers to be stored on you tftp server. You can also change the order of those commands and feed the result to HyperTerminal connected to your Cisco console.
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
service password-encryption
service udp-small-servers
service tcp-small-servers
!
hostname %hostname%
!
logging buffered 8192 debugging
no logging console
enable secret secret-password
!
memory-size iomem 25
clock timezone GMT 1
clock summer-time GMTDST recurring last Sun Mar 2:00 last Sun Oct 3:00
ip subnet-zero
no ip source-route
no ip domain-lookup
!
!
!
!
interface Serial0
ip unnumbered Ethernet0
no ip directed-broadcast
no ip proxy-arp
no ip route-cache
no cdp enable
!
interface Ethernet0
description %location% (%user%)
ip address %ipaddr% %ipmask%
no ip directed-broadcast
no ip proxy-arp
no ip route-cache
no cdp enable
!
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0
ip route 10.0.0.0 255.0.0.0 Serial0
ip route 172.16.0.0 255.240.0.0 Serial0
ip route 192.168.0.0 255.255.0.0 Serial0
ip route %ipnetaddr% %ipmask% Ethernet0
!
no cdp run
!
line con 0
transport input none
password console-password
line aux 0
line vty 0 4
password telnet-password
login
!
end
passwords are marked red must not be in the clear. Set passwords on a router, do a show running-config and copy and paste encrypted passwords (including 7) and encrypted secrets (including 5) to your configuration. For the sake of simpilicity this example features no DNS, SNMP and NTP configuration. Also not touched is whether you want to enable the Cisco http interface or not. Last but not least since this is a leaf node configuration no routing protocol is enabled. Everything other than the LAN subnet is simply routed through the serial interface, including all RFC-1918 addresses.
How do you use this with netdb? Login as user netdb and do the following:
. /etc/netdb/setvars
cat $DOMAINS.* | netdbget hostname | netdb $NETDB/frm/cisco-example.frm >/tftpboot/hostname
Replace hostname marked green with the hostname of your router.