walkthrough Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group Version 1.



Similar documents
netkit lab Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group Version 1.

netkit lab load balancer dns 1.2 Massimo Rimondini Version Author(s)

netkit lab dns Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group Version Author(s)

netkit lab static-routing Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group

netkit lab web server and browser 1.2 Giuseppe Di Battista, Maurizio Patrignani, Massimo Rimondini Version Author(s)

netkit lab two-hosts Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group

Version Author(s) Web Description

netkit lab single-host Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group

netkit lab bgp: multi-homed Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group

netkit lab bgp: prefix-filtering Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group

netkit lab Traffic Engineering with MPLS for Linux Version Author(s) F. Di Ciccio, F. Antonini (Kasko Networks S.r.l.)

netkit lab MPLS VPNs with overlapping address spaces 1.0 S.Filippi, L.Ricci, F.Antonini Version Author(s)

netkit lab load balancer web switch 1.1 Giuseppe Di Battista, Massimo Rimondini Version Author(s)

SI455 Advanced Computer Networking. Lab2: Adding DNS and Servers (v1.0) Due 6 Feb by start of class

CSIS 3230 Computer Networking Principles, Spring 2012 Lab 7 Domain Name System (DNS)

NETWORK EMULATION AND NETKIT

Local DNS Attack Lab. 1 Lab Overview. 2 Lab Environment. SEED Labs Local DNS Attack Lab 1

Creating a master/slave DNS server combination for your Grid Infrastructure

How To Manage Dns On An Elfiq Link Load Balancer (Link Balancer) On A Pcode (Networking) On Ipad Or Ipad (Netware) On Your Ipad On A Ipad At A Pc Or Ipa

DNS. Computer Networks. Seminar 12

Application and service delivery with the Elfiq idns module

Corso di Configurazione e Gestione di Reti Locali

Configuring the BIND name server (named) Configuring the BIND resolver Constructing the name server database files

DNS. Computer networks - Administration 1DV202. fredag 30 mars 12

Zimbra :: The Leader in Open Source Collaboration. Administrator's PowerTip #3: June 21, 2007 Zimbra Forums - Zimbra wiki - Zimbra Blog

ITIS 2110 Lab 11: Domain Name Server. Tyler Everhart 11/12/2010

Solaris Networking Guide. Stewart Watkiss. Volume. New User To Technical Expert Solaris Bookshelf. This document is currently under construction

- Domain Name System -

DNS : Domain Name System

Building a Linux IPv6 DNS Server

Using Webmin and Bind9 to Setup DNS Sever on Linux

DNS Pharming Attack Lab

Services: DNS domain name system

Advanced Internetworking

Emulating Computer Networks with Netkit. Massimo Rimondini

Apache and Virtual Hosts Exercises

Module 2. Configuring and Troubleshooting DNS. Contents:

Domain Name Server. Training Division National Informatics Centre New Delhi

Workshop on Scientific Applications for the Internet of Things (IoT) March

ECE 4321 Computer Networks. Network Programming

DNS + DHCP. Michael Tsai 2015/04/27

HTG XROADS NETWORKS. Network Appliance How To Guide: DNS Delegation. How To Guide

Lab 4 Domain Name System - DNS CMPE 150

Module 6: Managing and Monitoring Domain Name System

KAREL UCAP DNS AND DHCP CONCEPTS MANUAL MADE BY: KAREL ELEKTRONIK SANAYI ve TICARET A.S. Organize Sanayi Gazneliler Caddesi 10

Set up and run your own Cesidian Root DNS server

2 HDE Controller X DNS Server Manual

DNS Service on Linux. Supawit Wannapila CCNA, RHCE

LOCKSS on LINUX. Network Data Transition 02/17/2011

IP networks Introduction to laboratory

Installing and Setting up Microsoft DNS Server

Network Configuration

A Beginner's Guide to Setting Up A Web Hosting System (Or, the design and implementation of a system for the worldwide distribution of pictures of

DNS. DNS Fundamentals. Goals of this lab: Prerequisites: LXB, NET

Tunnel Client FAQ. Table of Contents. Version 0v5, November 2014 Revised: Kate Lance Author: Karl Auer

Domain Name Servers. Domain Types WWW host names. Internet Names. COMP476 Networked Computer Systems. Domain Name Servers

Lab 5 Explicit Proxy Performance, Load Balancing & Redundancy

Copyright

DNS. The Root Name Servers. DNS Hierarchy. Computer System Security and Management SMD139. Root name server. .se name server. .

IP Address: the per-network unique identifier used to find you on a network

How to connect your new virtual machine to the Internet

DNS based Load Balancing with Fault Tolerance

Domain Name System (DNS) Fundamentals

Getting Started with AWS. Hosting a Static Website

DNS and BIND Primer. Pete Nesbitt linux1.ca. April 2012

Trend Micro Encryption Gateway 5

HOWTO: Set up a Vyatta device with ThreatSTOP in router mode

SSL VPN. Virtual Appliance Installation Guide. Virtual Private Networks

How to Configure Split DNS

DNS Root NameServers

Hadoop Multi-node Cluster Installation on Centos6.6

DNS and BIND. David White

How to set up the Integrated DNS Server for Inbound Load Balancing

3. The Domain Name Service

LAB THREE STATIC ROUTING

2G1701 Advanced Internetworking Group 5 : KiStaNEt ISP Project Report

Trend Micro Incorporated reserves the right to make changes to this document and to the products described herein without notice.

Clearswift SECURE Exchange Gateway Installation & Setup Guide. Version 1.0

DNS Session 4: Delegation and reverse DNS. Joe Abley AfNOG 2006 workshop

Understanding DNS (the Domain Name System)

Configuring DNS. Finding Feature Information

APPLICATION NOTE. How to build pylon applications for ARM

Sample Configuration Using the ip nat outside source list C

Copyright International Business Machines Corporation All rights reserved. US Government Users Restricted Rights Use, duplication or disclosure

Setup a Virtual Host/Website

DNS Resolving using nslookup

Remote DNS Cache Poisoning Attack Lab

Immersion Day. Creating an Elastic Load Balancer. Rev

Cork Institute of Technology Master of Science in Computing in Education National Framework of Qualifications Level 9

White Paper. Fabasoft on Linux - Preparation Guide for Community ENTerprise Operating System. Fabasoft Folio 2015 Update Rollup 2

Lecture 2 CS An example of a middleware service: DNS Domain Name System

Trouble Shooting SiteManager to GateManager access

Simple DNS Configuration Example

Transcription:

Università degli Studi Roma Tre Dipartimento di Informatica e Automazione Computer Networks Research Group netkit lab walkthrough Version 1.2 Author(s) Massimo Rimondini E-mail Web Description contact@netkit.org http://www.netkit.org/ a step-by-step example showing how to set up a complete netkit lab with a few technologies

copyright notice All the pages/slides in this presentation, including but not limited to, images, photos, animations, videos, sounds, music, and text (hereby referred to as material ) are protected by copyright. This material, with the exception of some multimedia elements licensed by other organizations, is property of the authors and/or organizations appearing in the first slide. This material, or its parts, can be reproduced and used for didactical purposes within universities and schools, provided that this happens for non-profit purposes. Information contained in this material cannot be used within network design projects or other products of any kind. Any other use is prohibited, unless explicitly authorized by the authors on the basis of an explicit agreement. The authors assume no responsibility about this material and provide this material as is, with no implicit or explicit warranty about the correctness and completeness of its, which may be subject to changes. This copyright notice must always be redistributed together with the material, or its portions.

walk through what? the goal of this lab is to: put together some technologies presented in other labs step-by-step show how to set up a netkit lab from scratch prerequisites it is advisable to take a look at the following netkit labs beforehand: two hosts static routing web server dns

the goal ns-org ns-root ns-net 3 4 5 10.0.0.0/24 1 eth1 2 eth1 C 192.168.0.0/25 A 111 r1 1 r2 129 192.168.0.128/25 222 B client server

authority for org the goal root name server insert this additional statement in the configuration of ns-org and ns-net: options { allow-recursion {0/0; }; }; 1 eth1 ns-org ns-root ns-net 3 4 5 2 eth1 C authority for net 10.0.0.0/24 192.168.0.0/25 A 111 r1 1 static routing r2 129 192.168.0.128/25 client uses ns-org as local name server; has client.org as DNS name hosts http://server.net/~guest/ 222 server B

vademecum 1. create an empty directory where to put the lab 2. set up physical topology 3. set up routing 4. set up additional technologies in this lab: dns web server

vademecum 1. create an empty directory where to put the lab 2. set up physical topology 3. set up routing 4. set up additional technologies in this lab: dns web server

vademecum 1. create an empty directory where to put the lab host machine user@localhost:~$ mkdir mylab user@localhost:~$ cd mylab user@localhost:~/mylab$ note: here we use terminal commands for any operations if you feel more comfortable with a graphical file manager/editor, feel free to use it

vademecum 1. create an empty directory where to put the lab 2. set up physical topology 3. set up routing 4. set up additional technologies in this lab: dns web server

2. physical topology first of all, we tell netkit which virtual machines (=network nodes) the network consists of

authority for org 2. physical topology root name server insert this additional statement in the configuration of ns-org and ns-net: options { allow-recursion {0/0; }; }; 1 eth1 ns-org ns-root ns-net 3 4 5 2 eth1 C authority for net 10.0.0.0/24 192.168.0.0/25 A 111 r1 1 static routing r2 129 192.168.0.128/25 client uses ns-org as local name server; has client.org as DNS name hosts http://server.net/~guest/ 222 server B

2. physical topology in netkit, each virtual machine corresponds to a directory in the lab current lab host machine user@localhost:~/mylab$ mkdir client server r1 r2 \ ns-org ns-root ns-net net user@localhost:~/mylab$

2. physical topology now, we tell netkit about how virtual machines (=network nodes) are interconnected this information goes into file lab.conf current lab

authority for org 2. physical topology root name server insert this additional statement in the configuration of ns-org and ns-net: options { allow-recursion {0/0; }; }; 1 eth1 ns-org ns-root ns-net 3 4 5 2 eth1 C authority for net 10.0.0.0/24 192.168.0.0/25 A 111 r1 1 static routing r2 129 192.168.0.128/25 client uses ns-org as local name server; has client.org as DNS name hosts http://server.net/~guest/ 222 server B

2. physical topology lab.conf current lab client[0]=a r1[0]=a r1[1]=c ns-org[0]=c ns-root[0]=c ns-net[0]=c r2[0]=b r2[1]=c server[0]=b

2. physical topology lab.conf current lab client[0]=a r1[0]=a r1[1]=c ns-org[0]=c ns-root[0]=c ns-net[0]=c r1 s interface is connected to collision domain A r1 s interface eth1 is connected to collision domain C r2[0]=b r2[1]=c server[0]=b

vademecum 1. create an empty directory where to put the lab 2. set up physical topology 3. set up routing 4. set up additional technologies in this lab: dns web server

3. routing the configuration of ip routing consists of two parts: assignment of ip addresses to network interfaces achieved using the ifconfig command configuration of static routing achieved using the route command all these things are commands that virtual machines must run at startup we put them inside.startup files tip: these files are very similar to each other, so copy&paste is your friend ;-) current lab

authority for org 3. routing root name server insert this additional statement in the configuration of ns-org and ns-net: options { allow-recursion {0/0; }; }; 1 eth1 ns-org ns-root ns-net 3 4 5 2 eth1 C authority for net 10.0.0.0/24 192.168.0.0/25 A 111 r1 1 static routing r2 129 192.168.0.128/25 client uses ns-org as local name server; has client.org as DNS name hosts http://server.net/~guest/ 222 server B

3. routing client.startup current lab ifconfig 192.168.0.111 netmask 255.255.255.128 up route add default gw 192.168.0.1 dev 192.168.0.0/25 A 111 r1 1 client

3. routing current lab r1.startup ifconfig 192.168.0.1 netmask 255.255.255.128 up ifconfig eth1 10.0.0.1 netmask 255.255.255.0 up route add -net 192.168.0.128/25 gw 10.0.0.2 dev eth1 each router must learn about non-adjacent networks (only) 1 eth1 2 eth1 10.0.0.0/24 C 192.168.0.0/25 A r1 1 129 192.168.0.128/25 r2 B

3. routing current lab r2.startup ifconfig 192.168.0.129 netmask 255.255.255.128 up ifconfig eth1 10.0.0.2 netmask 255.255.255.0 up route add -net 192.168.0.0/25 gw 10.0.0.1 dev eth1 each router must learn about non-adjacent networks (only) 10.0.0.0/24 1 eth1 2 eth1 C 192.168.0.0/25 A r1 1 129 192.168.0.128/25 r2 B

3. routing current lab ns-org.startup ifconfig 10.0.0.3 netmask 255.255.255.0 up route add -net 192.168.0.0/25 gw 10.0.0.1 dev route add -net 192.168.0.128/25 gw 10.0.0.2 dev ns-org ns-root ns-net 1 eth1 3 4 5 2 eth1 10.0.0.0/24 C r1 192.168.0.0/25 192.168.0.128/25 1 129 Research A Group Roma Tre netkit [ lab: walkthrough ] B r2

3. routing current lab ns-root.startup ifconfig 10.0.0.4 netmask 255.255.255.0 up route add -net 192.168.0.0/25 gw 10.0.0.1 dev route add -net 192.168.0.128/25 gw 10.0.0.2 dev ns-org ns-root ns-net 1 eth1 3 4 5 2 eth1 10.0.0.0/24 C r1 192.168.0.0/25 192.168.0.128/25 1 129 Research A Group Roma Tre netkit [ lab: walkthrough ] B r2

3. routing current lab ns-net.startup ifconfig 10.0.0.5 netmask 255.255.255.0 up route add -net 192.168.0.0/25 gw 10.0.0.1 dev route add -net 192.168.0.128/25 gw 10.0.0.2 dev ns-org ns-root ns-net 1 eth1 3 4 5 2 eth1 10.0.0.0/24 C r1 192.168.0.0/25 192.168.0.128/25 1 129 Research A Group Roma Tre netkit [ lab: walkthrough ] B r2

3. routing current lab server.startup ifconfig 192.168.0.222 netmask 255.255.255.128 up route add default gw 192.168.0.129 dev r2 129 192.168.0.128/25 222 B server

3. routing current lab at this point it is strongly advised to start the lab and check that the routing works host machine user@localhost:~/mylab$ lstart client client:~# ping 192.168.0.222

3. routing current lab at this point it is strongly advised to start the lab and check that the routing works if it doesn t......check physical topology (lab.conf)...check boot-time virtual machine messages (errors printed in blue are relevant)...check routing tables (route n)...

vademecum 1. create an empty directory where to put the lab 2. set up physical topology 3. set up routing 4. set up additional technologies in this lab: dns web server

4. dns current lab first of all, we need to instruct some virtual machines to start a name server software (bind) at boot time we need to add a line to.startup files

current lab 4. dns ns-org.startup ifconfig 10.0.0.3 netmask 255.255.255.0 up route add -net 192.168.0.0/25 gw 10.0.0.1 dev route add -net 192.168.0.128/25 gw 10.0.0.2 dev /etc/init.d/bind start ns-org ns-root ns-net 1 eth1 3 4 5 2 eth1 10.0.0.0/24 C r1 192.168.0.0/25 192.168.0.128/25 1 129 Research A Group Roma Tre netkit [ lab: walkthrough ] B r2

current lab 4. dns ns-root.startup ifconfig 10.0.0.4 netmask 255.255.255.0 up route add -net 192.168.0.0/25 gw 10.0.0.1 dev route add -net 192.168.0.128/25 gw 10.0.0.2 dev /etc/init.d/bind start ns-org ns-root ns-net 1 eth1 3 4 5 2 eth1 10.0.0.0/24 C r1 192.168.0.0/25 192.168.0.128/25 1 129 Research A Group Roma Tre netkit [ lab: walkthrough ] B r2

current lab 4. dns ns-net.startup ifconfig 10.0.0.5 netmask 255.255.255.0 up route add -net 192.168.0.0/25 gw 10.0.0.1 dev route add -net 192.168.0.128/25 gw 10.0.0.2 dev /etc/init.d/bind start ns-org ns-root ns-net 1 eth1 3 4 5 2 eth1 10.0.0.0/24 C r1 192.168.0.0/25 192.168.0.128/25 1 129 Research A Group Roma Tre netkit [ lab: walkthrough ] B r2

4. dns current lab now, we need to configure the dns service dns configuration consists of some files inside /etc/bind/ we create these files inside each virtual machine s subdirectory ns-org/etc/bind ns-root/etc/bind ns-net/etc/bind

4. dns current lab but, hey... dns configuration is rather tricky! tip: copy files from the dns netkit lab and adjust them as needed

4. dns current lab download the dns lab from the netkit web site copy files from the dns lab to our lab as follows: from (dns lab) dnsroot/etc/bind/db.root dnsroot/etc/bind/named.conf dnsorg/etc/bind/db.org dnsorg/etc/bind/db.root dnsorg/etc/bind/named.conf dnsnet/etc/bind/db.net dnsnet/etc/bind/db.root dnsnet/etc/bind/named.conf to (our lab) ns-root/etc/bind ns-org/etc/bind ns-net/etc/bind

4. dns current lab trim named.conf to the essential ns-root/etc/bind/named.conf zone "." { type master; file "/etc/bind/db.root"; };

4. dns current lab trim named.conf to the essential and add the requested allow-recursion statement ns-org/etc/bind/named.conf options { allow-recursion {0/0; }; }; zone "." { type hint; file "/etc/bind/db.root"; }; zone "org" { type master; file "/etc/bind/db.org"; }; insert this additional statement in the configuration of ns-org and ns-net: options { allow-recursion {0/0; }; };

4. dns current lab trim named.conf to the essential and add the requested allow-recursion statement ns-net/etc/bind/named.conf options { allow-recursion {0/0; }; }; zone "." { type hint; file "/etc/bind/db.root"; }; zone "net" { type master; file "/etc/bind/db.net"; }; insert this additional statement in the configuration of ns-org and ns-net: options { allow-recursion {0/0; }; };

ns-root root name server 4. dns current lab configure autoritative information on ns-root we just need to update: the address of the root name server the address of the delegated name servers ns-root/etc/bind/db.root $TTL 60000 @ IN SOA ROOT-SERVER. root.root-server. ( 2006031201 ; serial 28800 ; refresh 14400 ; retry 3600000 ; expire 0 ; negative cache ttl ) @ IN NS ROOT-SERVER. ROOT-SERVER. IN A 10.0.0.4 org. IN NS dnsorg.org. dnsorg.org. IN A 10.0.0.3 net. IN NS dnsnet.net. dnsnet.net. IN A 10.0.0.5

authority for org ns-org 4. dns current lab configure autoritative information on ns-org we need to: update the address of the authority for org add a record for the client machine discard all the rest (we have no further delegations in this lab) ns-org/etc/bind/db.org $TTL 60000 @ IN SOA dnsorg.org. root.dnsorg.org. ( 2006031201 ; serial 28800 ; refresh 14400 ; retry 3600000 ; expire ) @ IN NS dnsorg.org. dnsorg IN A 10.0.0.3 client IN A 192.168.0.111 0 ; negative cache ttl has client.org as DNS name

ns-net authority for net 4. dns current lab configure autoritative information on ns-net we need to: update the address of the authority for net add a record for the server machine discard all the rest (we have no further delegations in this lab) ns-net/etc/bind/db.net $TTL 60000 @ IN SOA dnsnet.net. root.dnsnet.net. ( 2006031201 ; serial 28800 ; refresh 14400 ; retry 3600000 ; expire ) @ IN NS dnsnet.net. dnsnet IN A 10.0.0.5 server IN A 192.168.0.222 0 ; negative cache ttl

4. dns current lab configure hints on all the (non-root) name servers we need to update the address of the root name server ns-org/etc/bind/db.root. IN NS ROOT-SERVER. ROOT-SERVER. IN A 10.0.0.4

4. dns current lab configure hints on all the (non-root) name servers we need to update the address of the root name server ns-net/etc/bind/db.root. IN NS ROOT-SERVER. ROOT-SERVER. IN A 10.0.0.4

uses ns-org as local name server; 4. dns current lab last, but not least configure a resolver for client! in Linux, this goes to /etc/resolv.conf, therefore we put it in client/etc/resolv.conf client/etc/resolv.conf nameserver 10.0.0.3

current lab 4. dns at this point it is a good idea to start the lab and check that the dns works host machine user@localhost:~/mylab$ lstart client client:~# dig server.net

current lab 4. dns at this point it is a good idea to start the lab and check that the dns works if it doesn t......check boot-time virtual machine messages (errors printed in blue are relevant) to see if bind has failed starting...check /var/log/syslog (that s where bind logs its errors)... query for intermediate information (e.g., from client perform an iterative query to get the address of the root name server)...

vademecum 1. create an empty directory where to put the lab 2. set up physical topology 3. set up routing 4. set up additional technologies in this lab: dns web server

current lab 4. web server first of all, we need to instruct server to start the web server (apache) at boot time since we must set up a user s web site, we also need to enable apache s userdir module this is achieved by adding lines to server.startup

current lab 4. web server the module must be enabled before apache is started server.startup ifconfig 192.168.0.222 netmask 255.255.255.128 up route add default gw 192.168.0.129 dev a2enmod userdir /etc/init.d/apache2 start

current lab 4. web server now, we create a simple home page for user guest (the only non-root user that is available by default in netkit) according to the default configuration of module userdir, this page must be placed in /home/guest/public_html/index.html therefore, we put it in server/home/guest/public_html/ index.html

current lab 4. web server hosts http://server.net/~guest/ server/home/guest/public_html/index.html <html> <body> Hello! </body> </html>

current lab 4. web server at this point we can start the lab and check that the web server works host machine user@localhost:~/mylab$ lstart client client:~# links http://server.net/~guest

done that s it! host machine user@localhost:~/mylab$ lcrash after stopping it, the lab can be packed in a tar.gz file for redistribution