Alakhawayn University in Ifrane

advertisement
1
Al Akhawayn University in Ifrane
CSC3353 Computer Networks
Networks Laboratory
Prepared by O. Iraqi & T. Rachidi
Lab2
Objectives
1. Understand what a router is, its various modules, services, and interfaces.
2. Be able to build a WAN and configure routers (Protocol encapsulation on WAN
3.
4.
5.
6.
7.
interfaces + IP static routing) via both console port and Telnet.
Learn how to design and configure subnets.
Learn how to download/upload router configuration file from/to the router via FTP.
Become familiar with link layer protocols such as HDLC and PPP.
Learn how to manage a WAN using SNMP.
Learn how to configure backups using redundant connections.
Reading
1. IP addressing and Subnetting for new users:
http://www.cisco.com/warp/public/701/3.html
2. Subnetting: http://www.ralphb.net/IPSubnet/subnet.html
3. V.35 interface technical reference: http://www.advice1.com/v35.htm
4. PPP (Point-to-Point Protocol):
http://www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/ppp.htm
5. HDLC (High Level Data Link Control):
http://www.erg.abdn.ac.uk/users/gorry/course/dl-pages/hdlc.html
6. SNMP protocol: http://www2.rad.com/networks/1995/snmp/snmp.htm
http://www.cisco.com/univercd/cc/td/doc/cisintwk/ito_doc/snmp.htm
Hardware
Two (2) PCs, one (1) 3Com 4226T switch, two (2) Huawei Quidway R2620 routers, four (4)
RJ-45 cables, two (2) V.35 cables, two RS-232/R-J45 cables.
Software
MIB browser (SNMP client) for Windows.
Prerequisite
Linux Red Hat installed on a machine, and Windows 2000 server installed on another one.
Main Steps
1. Configure Network parameters on both Linux machine and Windows machine.
2
2. Configure IP addresses and subnet masks on both Ethernet interface and WAN interface
of each router.
3. Setup a WAN as shown in figure 1 and configure IP routing tables of each router.
4. Enable FTP server on each router and download/upload the configuration file from/to
it.
5. Change the default WAN interface encapsulation of each router.
6. Enable the SNMP server on each router and monitor SNMP traps using a MIB browser.
7. Configure a backup line using a redundant connection between routers.
1. Network Parameters Configuration on Linux and Windows machines
1.1
On Windows machine the network parameters should be configured as follows:
IP address: 10.10.10.1
Mask: 255.255.255.0
Gateway: 10.10.10.254
1.2
On Linux machine the network parameters should be configured as follows:
IP address: 10.10.20.1
Subnet mask: 255.255.255.0
Gateway: 10.10.20.254
2. Interface Configuration of Routers
2.1
Connect the two routers to the Windows machine via serial port COM1 and serial
port COM2 respectively using RS-232/RJ-45 cables.
2.2
Launch
two
sessions
of
the
HyperTerminal:
(start>accessories>communications>HyperTerminal):
Set the name for the first session to router1, and choose COM1 as port. Set the
name for the second session to router2 and COM2 as port. Set port parameters of
each session to the following:
Bits per second: 9600 bits/s
Data bits: 8 bits
Parity: none
Stop bits: 1
Flow control: none
2.3
When each router is powered, it will run the BOOTROM program first. The
screen of each terminal/session will show some system information. When a
terminal finishes displaying system information, press
will show:
<Enter>
and the terminal
3
Quidway>
2.4
Now, you will set the IP address and the mask on the LAN (Ethernet) interface
of each router. In the command line of each terminal, follow these steps:
Quidway>enable
The system will ask you for a password, just press <Enter>
Quidway#config
Quidway(config)#interface ethernet 0
Quidway-config-interface ethernet 0#ip address [IP_Address] 255.255.255.0
[IP_Address] should be replaced by 10.10.10.254 in the first terminal for router 1
and by 10.10.20.254 in the second terminal for router 2.
Quidway(config-interface ethernet 0)#exit
2.5
Now, you will set the IP address and the subnet mask on the WAN interface of
each router. In the command line of each terminal, follow these steps:
Quidway(config)#interface serial 0
Quidway(config-interface serial 0)#ip address [IP_Address] 255.255.255.252
[IP_Address] should be replaced by 192.100.100.100.5 in the first terminal for
router 1 and by 192.100.100.6 in the second terminal for router 2.
2.6
What is the subnet ID to which 192.100.100.5 and 192.100.100.6 belong? Fill in
answer sheet.
2.7
Propose (but don’t configure) another subnet ID and two IP addresses that
belong to it provided that the subnet mask remains 255.255.255.252 and the
network ID remains 192.100.100.0. Fill in answer sheet.
2.8
Find the command that shows the configuration of each interface (ethernet 0 and
serial 0). Fill in the answer sheet with this command and its output.
3. WAN Setup and Static Routing Configuration
3.1
Setup two (2) VLANs connected through two (2) routers as show in figure 1. The
routers are connected point-to-point through their WAN interfaces using a V.35
cable. Each router is connected to the switch through its LAN (Ethernet)
interface. Router 1 and Windows machine belong to VLAN 1. Router 2 and
Linux machine belong to VLAN 2.
4
WAN 0
(192.100.100.6)
Router 2
WAN 0
(192.100.100.5)
LAN 0 (10.10.20.254)
Linux
Machine
Router 1
LAN 0 (10.10.10.254)
Windows
(10.10.10.1) Machine
(10.10.20.1)
VLAN 2
VLAN 1
Switch
V.35 cable
RJ-45 cable
Figure1. Network architecture
3.2
Open a Telnet session from Windows machine to router 1 and another Telnet
session from Linux machine to router 2.
3.3
In the command line of the first Telnet session (between Windows machine and
router 1) follow these steps:
Quidway>enable
Leave the password blank, just press <Enter>
Quidway#config
Quidway(config)#ip route 10.10.20.0 255.255.255.0 192.100.100.6
Explain this command. Fill in answer sheet.
3.4
Issue a command to view all routes in the routing table. Fill in answer sheet with
the command issued.
3.5
In the command line of the second Telnet session (between Linux machine and
router 2) follow these steps:
Quidway>enable
Leave the password blank, just press <Enter>
Quidway#config
Quidway(config)#ip route 10.10.10.0 255.255.255.0 192.100.100.5
Explain this command. Fill in answer sheet.
5
3.6
Find the command that shows the routing table of a router. Fill in the answer
sheet with this command and its output.
3.7
Issue a ping between Windows machine and Linux machine. The ping should be
successful.
3.8
Write the running configuration to flush memory (You have to find this
command). Fill in answer sheet with this command.
4. Router Configuration File Download and Upload
You will start by enabling the FTP server on each router, and then you will create a user
toto authenticated with password toto for accessing the FTP server on each router.
4.1
In the command line of the first Telnet session (between Windows machine and
router 1) follow these steps:
Quidway>enable
Leave the password blank, just press <Enter>
Quidway#config
Quidway(config)#ftp-server enable
Quidway(config)#user toto password 0 toto service-type ftp
4.2
From Windows machine open an FTP session to router 1. Login as toto. The
configuration file is called config. Download it. Print out the content of this file
and attach it with the answer sheet.
4.3
If you modify the router configuration using Telnet for example, you can recover
the previous configuration by uploading the saved configuration file to the router.
Notice that you should reboot the router after uploading the configuration file.
5. Using HDLC as the WAN Interface Encapsulation
The default WAN interface encapsulation is PPP. Now, you will change it to HDLC for
each router.
5.1
In the command line of each Telnet session issue the following commands:
Quidway(config)#interface serial 0
5.2
Find and issue the command that changes the interface encapsulation to HDLC.
Fill in answer sheet.
5.3
Issue the command to show the configuration of the WAN interface of each
router. Make sure that the WAN interface encapsulation has actually changed to
HDLC
5.4
Issue a ping from/to Linux and Windows machines. Ping should be successful.
6
6. WAN Management using SNMP
To manage the WAN that you have setup in section 3 (Figure 1), you need to enable an
SNMP agent (server) on each router and to install a MIB (Management Information
Base) browser (client) on a machine (You will choose the Windows machine since the
MIB browser that will be used is for Windows). The MIB browser can query the SNMP
agent and this later can also send traps to the MIB browser.
6.1
Enable the SNMP agent on each router by typing the following command:
Quidway(config)#snmp-server enable
6.2
For each router create two communities (public and private) and set read-only
access right to the public community and read-write access write to the private
community as the following:
Quidway(config)#snmp-server community ro public
Quidway(config)#snmp-server community rw private
6.3
Configure the IP address of the host on which the MIB browser will be running
so as the SNMP agent would know where to send SNMP traps. In this case, this
host is Windows machine:
Quidway(config)#snmp-server host 10.10.10.1
6.4
Launch the MIB browser on Windows machine and create two sessions. The
agent address for the first session should be one of the router 1 IP addresses
(10.10.10.254 for example). The agent address for the second agent should be one
of router 2 IP addresses (10.10.20.254 for example).
6.5
Use the MIB browser to query the two routers and to visualize traps received
from them. Fill in answer sheets with snapshots of SNMP query results and
SNMP traps.
7. Backup line configuration
In this last section, you will configure a backup line between the routers so as if the initial
connection fails, routers will be still able to communicate.
7.1
Connect the routers via their WAN 1 interfaces (in addition to the initial
connection via WAN 0 interfaces) using a V.35 cable as shown in figure 2.
7
Router 2
LAN 0
WAN 0
HDLC
WAN 1
PPP
WAN 1
(stand-by)
WAN 0
Router 1
LAN 0
Linux
Machine
Windows
Machine
VLAN 2
VLAN 1
Switch
V.35 cable
RJ-45 cable
7.2
Figure2. Backup line setup
For each router configure the WAN 1 interface as the backup interface for WAN
0 interface using the following commands:
Quidway(config)#interface serial 0
Quidway(config-interface serial 0)#backup interface serial 1
7.3
For each router configure the enable delay and the disable delay in seconds of the
backup interface. When the serial 0 interface fails, a timer is triggered for duration
equal to the enable delay. If the timer goes off, the backup interface (serial 1)
takes over. When the serial 0 interface is up again, a timer is triggered for duration
equal to the disable delay. If the timer goes off, the initial interface takes over.
You configure these delays as the following:
Quidway(config-interface serial 0)#backup delay <enable-delay ><disabledelay>
Example: Quidway(config-interface
7.4
serial 0)#backup delay 5 5
You need to configure also an additional route between VLAN 1 (10.10.10.0) and
VLAN 2 (10.10.20.0) via the backup line. Configure an IP address for the WAN 1
interface of each router. Fill in the answer sheet with these IP addresses.
7.5
Add a new route in the routing table of each router like in section 3. Fill in the
answer sheet with the commands issued.
7.6
Issue a ping from/to Linux and Windows machines. Unplug the cable between the
WAN 0 interfaces. Describe what happens. Fill in the answer sheet.
Download