IE论文——精选推荐
- 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
- 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
- 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。
A virtual network laboratory for learning IP networking
Lluís Fàbrega
Jordi Massaguer
Teodor Jové
David Mérida
Institut d’Informàtica i Aplicacions (IIiA)
Universitat de Girona (UdG)
Lluís Santaló Av., 17071 Girona, SPAIN
+34 972418475
{ fabrega | jmassa | teo | dmerida }@eia.udg.es
ABSTRACT
In this paper, a network laboratory for distance learning of basic concepts in IP networking is presented. Through a web interface,students can choose various configurations of a real private network (number of routers and subnetworks, use of IPv4/IPv6,etc.), and learn about them using Linux network commands. The utilization of the virtual laboratory and how it is implemented are described.
Categories and Subject Descriptors
K.3.1 [Computers and Education ]: Computer uses in education–distance learning.
General Terms
Design, Experimentation.
Keywords
Remote laboratory, networking.
1. INTRODUCTION
The possibilities offered by the use of Internet in teaching activities are increasingly important. However, the physical presence of students in laboratories is required when the subject has a practical component, and this makes distance learning more difficult. Virtual laboratories can be used to overcome this situation.
We have built a virtual network laboratory for distance learning of IP networking concepts such as IP addressing, routing tables,address resolution between IP and Ethernet, and the combined use of IPv4 and IPv6. Students access the virtual laboratory through a web interface and can change the network configuration by choosing one of the available preset configurations. Then, using Linux network commands, they can learn about these configurations and how to test the network.
The virtual network laboratory is a private IP over an Ethernet network. It consists of several PCs (with one or more Ethernet cards) connected through a configurable Ethernet switch. One of
these PCs, which is connected to the Internet, runs the web server and performs the different network configurations upon receiving a student’s request.
The paper is organized as follows. In section 2 we describe the user interface of the virtual laboratory and some examples of lab classes to show how it can be used. Section 3 deals with the implementation of the virtual laboratory, the composition of the physical network and the remote configuration method used for the switch and for IPv4 and IPv6 in the PCs. Conclusions and future work conclude the paper.
2. LEARNING IN THE VIRTUAL LAB
The virtual network uses IP over an Ethernet and consists of four nodes. These nodes can be grouped to build IP subnetworks in different topologies, so they act as a host or router depending on the topology. The student can choose between four available topologies (see Figure 1).
Our objective was to build a tool whereby remote students could learn the basic concepts of IP networking and related Linux network commands. We want them to learn the following:
-IP addresses within an IP subnetwork share a common prefix that defines the subnetwork address.
-The composition of the routing tables in hosts and routers,which defines the next node to send a packet depending on the IP subnetwork where the destination host belongs.
Permission to make digital or hard copies of all or part of this work for personal or classroom use is granted without fee provided that copies are not made or distributed for profit or commercial advantage and that copies bear this notice and the full citation on the first page. To copy otherwise, or republish, to post on servers or to redistribute to lists,requires prior specific permission and/or a fee.ITiCSE’02, June 24-26, 2002, Aarhus, Denmark
Copyright 2002 ACM 1-58113-499-1/02/0006…$5.00.
Figure 1. The configured network topologies.
host router
D subnet A B
C
D
subnet subnet C A B 1
2
B subnet subnet subnet
C A D
3
4
D
subnet subnet subnet B C A
-Address resolution between Ethernet and IP.
-The main differences between the addressing scheme in IPv4 and IPv6.
-The issues derived from the combined utilization of IPv6and IPv4, and the need for tunneling that allows hosts to send IPv6 packets through IPv4 networks.
-The Linux commands for network administration such as ifconfig for interface addressing, route for the routing tables,traceroute for the routing path between two nodes, ping for checking connectivity, arp for the address resolution table,and others.
In a lab class the student first chooses one of the available network configurations and then studies it by using Linux network commands. Section 2.1 describes the user interface and section 2.3 shows some examples of lab classes.
2.1 The user interface
Students access the virtual laboratory through a web interface after an authentication phase. Then they choose one of the following options, “topologies”, “protocols”, “tunneling”,“commands” or “exit”:
-The “topologies” option allows the student to choose one of several network topologies that differ in the number of IP subnetworks (1, 2 or 3) and therefore in the number of routers (see Figure 1).
-Using “protocols”, the student can choose to configure each network node either with only IPv4 or with both IPv4 and IPv6. Predefined addresses are assigned to each node.-Using “tunneling”, the student can choose one of several network configurations where some nodes use IPv4 and others IPv6, which have configured the required tunnels to work properly (see Figure 2).
-With “commands”, the student can choose any of the nodes of the network and then study how it is configured by using Linux network commands. The student is not allowed to change any configuration parameter, but can test it.
2.2 Some examples of lab classes
The basic scheme of a lab class is first to choose one of the network configurations using the appropriate options (“topology”,“protocols”, and “tunneling”), and second, to study it using Linux network commands (“commands” option).
A first example is the study of IP addressing and routing tables using the 4th topology in Figure 1 (three subnetworks and one router) with IPv4 in all the nodes. This results in the configuration of IP addresses and the routing table in each node. Then, using the ifconfig command, students can see the IP addressing used, by using route , the contents of the routing table, and by using traceroute , the routing path between two nodes.
A second example is the study of the address resolution between IP and Ethernet using the third topology in Figure 1 (three subnetworks and two routers) with IPv4 in all nodes. The use of arp in each node allows the student to see the contents of the ARP (Address Resolution Protocol) table listing IP and Ethernet addresses. Other commands like ping , traceroute , or route , would be also interesting for studying the configuration.
The third example is the study of the combined use of IPv4 and IPv6 nodes. Here the chosen topology is the third one in Figure 1,IPv4 in the B and C nodes and IPv4/IPv6 in the A and D nodes.First, no tunnel configuration is selected. Then, students can see that there is no virtual interface created in the A and D nodes by using the ifconfig command, that the routing table is wrong by using route , and that there is no connectivity between the A and D nodes by using ping . After that, the tunnel configuration number 2(see Figure 2) is chosen and the network configuration is tested again to check the right behavior.
3. IMPLEMENTATION 3.1 Equipment
The network of the virtual laboratory consists of four PCs running the Linux operating system (kernel 2.2.12-20, RedHat 6.1distribution) and an Ethernet switch (Cisco Catalyst 2920XL with 24 ports). Each PC has one or more Ethernet cards connected to the switch as shown in Figure 3. It is a private network that is accessed from the Internet through the node A, which has two Ethernet cards, one connected to the private network and the other to the Internet. Node A does not forward packets from or to the private network and the Internet.
The Ethernet switch is used to build the subnetworks of each topology. Through its configuration, each switch port is assigned
Figure 2. The configured tunnels.
1
2
3Figure 3. The physical network and the groups of ports
for the third topology.
A
B
C
D
Ethernet switch
to a specific group of ports. The different groups are isolated, i.e. the switch does not provide connectivity between two nodes that belong to different groups of ports. In this way, “virtual” Ethernet subnetworks are built, as if the nodes of each subnetwork were physically connected to different Ethernet switches. The groups of ports for creating the third topology (see Figure 1) are shown in Figure 3.
3.2The remote configuration
The remote configuration of the PCs and the Ethernet switch is made through a web server (Apache release 1.3.9 [1]) running in node A. Using a CGI (Common Gateway Interface), the web server executes different UNIX scripts files. In turn these scripts execute a Telnet client that connects to the Telnet server running in the target device (PC or switch), and then executes the necessary commands to configure it. The script files use the expect scripts language [2] that allows CGIs to interact with the Telnet client, so an interpreter of this language needs to be installed in node A. This is the usual method for the configuration. The next sections focus on the configuration of the switch and the nodes.
3.3The switch configuration and topologies The four different network topologies (see Figure 1) are built by configuring the (virtual) subnetworks in the switch. The number of subnetworks varies from one to three, as does the number of hosts that belong to a subnetwork. Note that only one of the two interfaces of node A can belong to the different network topologies, while the other interface is always connected to the Internet.
The switch configuration is made via Telnet by using some specific commands [4] for assigning ports to (virtual) subnetworks. As explained in section 3.2, this is carried out by expect scripts files, which use these commands for each configuration. An example file is shown in Figure 4. First a Telnet session is initiated and then the commands for assigning ports to subnetworks are executed.
3.4IPv4 and IPv6 in the nodes
The user can choose a topology and the IP protocol version for each node, i.e. only IPv4 or both IPv4 and IPv6 (there are no only IPv6 nodes). IPv4 is the default option. According to the selected option and topology, a predefined IP address (IPv4 and/or IPv6) is assigned to each network interface of the node depending on the subnetwork it belongs to. The corresponding routing table of the node is then configured. Moreover, nodes with interfaces in different subnetworks act as IP routers, so packet forwarding must be enabled in them.
Linux systems configure network aspects at the boot time by executing several UNIX scripts files and using the information written in several configuration files [3]. All nodes are dual, i.e. both IP versions are installed on them. In order to configure IPv6, we have added some specific UNIX script files and configuration files [5], which are the equivalents to the installed files for IPv4. The configuration files for IPv4 are the following: ifcfg-eth0, for information about the Ethernet interface 0, such as the assigned IPv4 address (and the corresponding files for each interface); the file static-routes, for adding static routes to the routing table; the file network, for enabling or disabling networking and forwarding; the file hosts, with the table that relates DNS names and IP addresses. Network configuration is made at the boot time by executing the script network.
The configuration files for IPv6 are the following: network-ip6, for enabling or disabling networking and forwarding, and also for defining the files names where there is the information about the interfaces, the routing and the tunnels; the file network-ip6.conf (or the file name defined in network-ip6), for the interfaces (equivalent to ifcfg-ethx files in IPv4) and for the static routes of the routing table (equivalent to the static-route file in IPv4); the file tunnels.conf (or the file name defined in network-ip6) for setting up virtual interfaces that define the IPv6/IPv4 tunnels (see next section); the file hosts, with the table relating Domain Name Services (DNS) names and IPv6 addresses (the same file as in IPv4). Network configuration is performed at the boot time by executing the script network-ip6.init.
For each one of the different PCs’ configurations we have created the corresponding specific files. For example, for the file ifcfg-eth0, we have created the files 1.ifcfg-eth0, 2.ifcfg-eth0 and 3.ifcfg-eth0, corresponding to network topologies 1, 2 and 3 respectively, and using IPv4. Remote configuration is performed by replacing these files (e.g., ifcfg-eth0 by 1.ifcfg-eth0), and then enforcing the system to a network reconfiguration (e.g., executing the script network). As explained in section 3.2, this is done through expect scripts via Telnet.
3.5IPv4 and IPv6 interconnection
In order to provide connectivity between IPv6 nodes through a path that involves IPv4 nodes, it is necessary to set up tunnels between them, i.e. IPv6 packets are encapsulated in IPv4 packets and IPv6 addresses are mapped to IPv4 addresses at the sending point [6]. This operation is undone at the receiving point. Tunnels are created between two nodes by configuring a network virtual interface at both ends. The interface encapsulates and sends the packets to a real interface (i.e. eth0), and it is used in the IPv6 routing tables for a specific route. In Figure 2 three examples of tunnels are shown:
-In the first one, there are three IPv6 subnetworks and two IPv6 routers. The second subnetwork uses IPv6 over IPv4.
A tunnel is created between the
B and
C routers for the
routing path that connects the first and the third subnetworks.
-In the second example there is a single IPv6 subnetwork with IPv6 over IPv4. A tunnel is created between the A and
D hosts.
-In the third example there are three IPv6 subnetworks and two IPv6 routers. The first subnetwork uses IPv6 over IPv4.
A tunnel is created between A and
B for the routing path
that connects the first subnetwork with the other ones.
3.6Remote commands execution
Our platform allows the students to execute commands in a remote way at any of the nodes, such as ifconfig, route,and traceroute. These commands are executed in a Telnet session as a non-root user using expect scripts. As mentioned in section 2.1, students can test any configuration parameter but they are not allowed to change them.
4.CONCLUSIONS AND FUTURE WORK We have built a virtual network laboratory for learning basic concepts of IP networking and have shown how students can use it. Using a web interface, students can choose one of the available configurations and study them by using (and learning) the main Linux network commands.
There are several areas for future work. One is to allow students not only to choose and study predefined configurations, but also to build it on demand. In this way students would create their own topologies, assign IP addresses, and configure the routing tables (graphically and/or through Linux commands).Another interesting possibility is using the Simple Network Management Protocol (SNMP) for configuration of the network laboratory. We are also planning to add an enhanced user management (e.g. session scheduling, the ability of saving the configuration for recovery in a future session), and a network monitor for capturing Ethernet packets in order to study TCP/IP protocols, such as e-mail, web, DNS and others.
5.ACKNOWLEDGMENTS
This study was partially supported by the CICYT (Spanish Education Ministry) contract TEL-98-0408-C02-01 and the Acciones Integradas program ref. HI1998-0032.
6.REFERENCES
[1]The Apache Software Foundation. HTTP Apache Server,
[2]Don Libes. Exploring Expect: A Tcl-Based Toolkit for
Automating Interactive Programs. O’Reilly and Associates
(1995)
[3]Richard Petersen. Linux - Manual de Referencia.
Osborne/MacGraw-Hill (1997)
[4]Cisco Systems, Inc. Cisco IOS Desktop Switching Software
Configuration Guide – Catalyst 2900 Series XL Cisco IOS
Release 11.2(8)SA6 (1999)
[5]Peter Bieringer. Linux: IPv6.
http://www.bieringer.de/linux/IPv6/index.html
[6]Christian Huitema. IPv6 – The new Internet Protocol.
Prentice Hall (1998)。