Agenda: exercises-netdot.page

File exercises-netdot.page, 9.2 KB (added by asjl, 7 years ago)
Line 
1% Netdot exercise
2% Network Management Topics
3
4# Introduction
5
6The Network Documentation Tool (Netdot) is an open source tool designed to
7help network administrators collect, organize and maintain network
8documentation. Netdot is actively developed at the University of Oregon.
9
10## Goals
11
12In these exercises we will install Netdot and demonstrate some of its most
13important features.
14
15## Notes
16
17* Commands preceded with "$" imply that you should execute the command as
18  a general user - not as root.
19* Commands preceded with "#" imply that you should be working as root.
20* Commands with more specific command lines (e.g. "RTR-GW>" or "mysql>")
21  imply that you are executing commands on remote equipment, or within
22  another program.
23
24# Installation
25
26## Package Dependencies
27
28Some packages are available in Ubuntu. We'll install those first
29(you will probably want to copy/paste the following):
30
31~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
32$ sudo apt-get -y install apache2 libapache2-mod-perl2 rrdtool librrds-perl \
33graphviz libmodule-build-perl libcgi-pm-perl libclass-dbi-perl \
34libclass-dbi-abstractsearch-perl libapache2-request-perl libhtml-mason-perl \
35libapache-session-perl liburi-perl libsql-translator-perl libsnmp-info-perl \
36snmp-mibs-downloader libnetaddr-ip-perl liblog-dispatch-perl \
37liblog-log4perl-perl libparallel-forkmanager-perl libauthen-radius-perl \
38libtest-simple-perl libtime-local-perl libfile-spec-perl libnet-dns-perl  \
39libcarp-assert-perl libdigest-sha-perl libssl-dev dnssec-tools \
40libsocket6-perl libxml-simple-perl mysql-server libdbix-datasource-perl
41~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
42
43(If you had not installed mysql-server, you'll be asked for a DBA password.
44Use the password that you used to log in to the PC).
45
46Now we'll set up APT to look for the rest of the packages in NSRC's server.
47
48Add the following file:
49
50~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
51$ cd /etc/apt/sources.list.d
52$ sudo EDITOR netdot.apt.nsrc.org.list
53
54  Add these two lines:
55
56deb http://netdot.apt.nsrc.org/ unstable/
57deb-src http://netdot.apt.nsrc.org/ unstable/
58~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
59
60(save and exit editor)
61
62Now install the rest of the packages:
63
64~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
65$ sudo apt-get update
66$ sudo apt-get -y --force-yes install libapache2-authcookie-perl \
67libapache2-sitecontrol-perl libnet-iptrie-perl libnet-irr-perl \
68libnet-appliance-session-perl libbind-config-parser-perl
69~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
70
71Update the following file:
72
73~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
74$ sudo EDITOR /etc/snmp/snmp.conf
75 
76  comment out this line:
77
78mibs:
79
80  to that it becomes:
81
82#mibs:
83~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
84
85(save and exit)
86
87Download the latest Netdot package:
88
89First check if it's available in your classroom's NOC server:
90~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
91$ cd /usr/local/src
92$ sudo wget http://noc.ws.nsrc.org/downloads/netdot-latest.tar.gz
93~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
94
95If not, try from the official site:
96~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
97$ sudo wget --no-check-certificate \
98https://netdot.uoregon.edu/pub/dists/netdot-0.9.10.tar.gz
99~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
100
101Unpack the tarball:
102~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
103$ sudo tar xzvf netdot-0.9.10.tar.gz
104$ cd netdot-0.9.10.tar.gz
105~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
106
107Verify that we have all the necessary dependencies:
108~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
109$ make testdeps
110~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
111
112Initialize the site configuration:
113~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
114$ sudo cp etc/Default.conf etc/Site.conf
115$ sudo EDITOR etc/Site.conf
116
117  Find and change the following values:
118
119NETDOTNAME => 'pcX.ws.nsrc.org'
120DB_DBA_PASSWORD => '(the password you used when installing mysql)',
121DEFAULT_SNMPCOMMUNITIES  =>  ['NetManage', 'public'],
122NMS_DEVICE => 'localhost',
123DEFAULT_DNSDOMAIN  => 'ws.nsrc.org',
124~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
125
126Install the application and initialize the database
127~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
128$ sudo make install APACHEUSER=www-data APACHEGROUP=www-data
129$ sudo make installdb
130$ sudo ln -s /usr/local/netdot/etc/netdot_apache2_local.conf \
131/etc/apache2/conf.d/
132$ sudo service apache2 graceful
133~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
134
135Install the cron jobs for automated tasks
136~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
137$ sudo cp netdot.cron /etc/cron.d/netdot
138~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
139
140# Operation
141
142## Log into the web interface
143
144In your browser, go to:
145~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
146http://pcX.ws.nsrc.org/netdot
147~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
148
149Log in with admin/admin
150
151## Changing default passwords
152
153Netdot comes with three default user accounts. You should change the default
154passwords on those.
155
156Go to the "Contacts" tab, then search for "Admin". You should see the details
157for the Admin user. Click on [edit], and find the Password field. Type the
158password you used to log in to your PC, then click on the "Update" button.
159
160Repeat the same steps for the other default users:
161
162* operator
163* guest
164
165## Discovering devices
166
167If you have not done so yet, configure SNMP on your PC and your router.
168
169Let's create a file with all the devices in the lab network that respond
170to SNMP:
171
172~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
173$sudo EDITOR /home/sysadm/discoverme.txt
174
175Copy and paste the following list:
176
177gw.ws.nsrc.org NetManage
178sw.ws.nsrc.org NetManage
179rtr1.ws.nsrc.org NetManage
180rtr2.ws.nsrc.org NetManage
181rtr3.ws.nsrc.org NetManage
182rtr4.ws.nsrc.org NetManage
183rtr5.ws.nsrc.org NetManage
184rtr6.ws.nsrc.org NetManage
185pc1.ws.nsrc.org NetManage
186pc2.ws.nsrc.org NetManage
187pc3.ws.nsrc.org NetManage
188pc4.ws.nsrc.org NetManage
189pc5.ws.nsrc.org NetManage
190pc6.ws.nsrc.org NetManage
191pc7.ws.nsrc.org NetManage
192pc8.ws.nsrc.org NetManage
193pc9.ws.nsrc.org NetManage
194pc10.ws.nsrc.org NetManage
195pc11.ws.nsrc.org NetManage
196pc12.ws.nsrc.org NetManage
197pc13.ws.nsrc.org NetManage
198pc14.ws.nsrc.org NetManage
199pc15.ws.nsrc.org NetManage
200pc16.ws.nsrc.org NetManage
201pc17.ws.nsrc.org NetManage
202pc18.ws.nsrc.org NetManage
203pc19.ws.nsrc.org NetManage
204pc20.ws.nsrc.org NetManage
205pc21.ws.nsrc.org NetManage
206pc22.ws.nsrc.org NetManage
207pc23.ws.nsrc.org NetManage
208pc24.ws.nsrc.org NetManage
209~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
210
211Now, tell Netdot to discover those devices:
212
213~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
214$ cd /usr/local/netdot
215$ bin/updatedevices.pl -E /home/sysadm/discoverme.txt -IAF
216~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
217
218Go to the web interface and navigate to
219
220Management -> Devices
221
222In the search box, type "*", and hit ENTER
223
224You should see discovered devices in that list. Go to the link for your
225group's router (e.g. rtrX.ws.nsrc.org)
226
227* Navigate to all the tabs: Basic, Interfaces, Modules, IP Info, etc.
228* In the ARP section, you should see one entry with a timestamp.
229  Click on that entry. You should see a table associating IP addresses
230  and MAC addresses. This is the ARP table discovered from rtr1. You should
231  see your PC's IP address and MAC address.
232
233## Finding a computer in your network
234
235* Obtain the MAC address from your laptop (or desktop).
236* In the Netdot web interface, go to Management -> Devices
237* Type (or paste) your MAC address and hit ENTER
238
239Netdot will show you which devices were seeing that MAC address the last
240time that it discovered the network.
241
242## Managing IP address space
243
244Go to Management -> Address Space
245
246You should see a list of private IP blocks (from RFC-1918). These come
247pre-installed in Netdot.
248
249Click on 10.10.0.0/8
250
251You will see a list of discovered IP blocks, which are marked as "Subnets".
252These were found in routers.
253
254### Create a container to include all the group subnets
255
256In the section called "Address Space Tasks" on top, click on the "[new]"
257button and enter the following:
258
259* IP/Prefix: 10.10.0.0/16
260* Owner: click on [new].
261* In the new "Entity" window, enter:
262  * Name: NSRC Lab
263  * Insert button, then [close]
264* Used by: (leave blank)
265* Status: Container
266* Description: NSRC lab student networks
267* Save button
268
269You should now see the new Container page. It shows a graphical representation
270of the /16 block. All the existing subnets are shown in red. The green space
271represents unused or available address space.
272
273
274# More information
275
276[Official Netdot Website](http://netdot.uoregon.edu)
277
278
279