Sunteți pe pagina 1din 2

Router#conf t

Enter configuration commands, one per line. End with CNTL/Z.


Router(config)#int range fa1/0 - 15
Router(config-if-range)#switchport mode trunk
Router(config-if-range)#


I have seen that alot of people have problem setting switching lab in gns 3.

In this tutorial, I will show how to setup lab in gns 3 to practice switching. I will
demonstrate this scenario:

PC1 --------------- S2 ----------- S1 ------------- S3 ----------- PC2
192.168.1.10 192.168.1.2 192.168.1.1 192.168.1.3 192.168.1.20

To emulate PCs, I will use VPCS available at
http://www.freecode.com.cn/doku.php?id=wiki:vpcs. Extract VPCS to an easy location
like c:\vpcs.
Go to command prompt and run vpcs.exe. If u get an error message, copy cygwin.dll
from vpcs directory to gns 3 directory replacing the one already present or renaming the
old one. At vpcs prompt, show will show all the PCS and their IPs etc. Note the LPORT
and RPORT numbers for PC1. We need to give PC1 an IP address and default gateway
by typing ip 192.168.1.10 192.168.1.2 24. Leave the command prompt open for now.

We now need to work in gns 3.

First make sure you have ios version 12.4 for 3640 router (At least I am using that). I will
use gns3 0.4 beta.
1. Drag 3600 Router to center. Right click - Configure - slots and select NM-16ESW.
Start and then after a while Stop the router. Start again and console into it change its
name to S1 and give its vlan 1 IP 192.168.1.1 like this:
en
conf t
hostname S1
interface vlan 1
ip address 192.168.1.1 255.255.255.255.0
no shut
exit
exit
write mem

Now drag another 3640 router. do same as above but name it S2 and give it IP
192.168.1.2
Similarly drag 3rd 3640 router, follow the same steps as above name it S3 and give it IP
192.168.1.3

Please note that we have not yet connected these routers.

2. Now connect these routers with fastEthernet links and Stop and Start them one by one
After restart, you will be able to ping vlan 1's IP of one router from another one.

3. It's time to connect our PCs. Drag a cloud to the center, name it 192.168.1.10. Right
click it - configure. Go to NIO UDP. In the Local port type in the RPORT and in Remote
port, type in the LPORT you noted earlier in VPCS i.e. reverse them. Type 127.0.0.1 in
the Remote host field. Click Ok.
Now connect S2 to PC1 with fastEthernet link. Stop and Start S2.
Go to VPCS, you left open earlier, and type ping 192.168.1.2. Now you will be able to
ping all the routers from VPCS and vice versa.

3. Now we ned PC2. In VPCS type 2 and give it an IP 192.168.1.20 like this
VPCS 1>2
VPCS 2>ip 192.168.1.20 192.168.1.3 24
VPCS 1>sh
Note down LPORT & RPORT for PC2
Now repeat step 3, naming the cloud 192.168.1.20 this time and configuring it with ports
you noted for PC2 and Remote host again 127.0.0.1
You must be able to ping PC1 from PC 2 and vice versa.
Please note this Stop/Start of routers as I have mentioned are important at each step.

Some images http://mihd.net/n8xcf3p.

In next tutorial, I will talk about configuring Vlans, VTP and STP.

S-ar putea să vă placă și