User Tools

Site Tools


wiki:tutorial

This is an old revision of the document!


VPCS is not Swissknife, it only has a few commands to help us to study Cisco switch/router, that's all.
I use the next case to test the functions of VPCS.

The topology:

 20000    30000                  T2000               30002         20002
 PC1 ---- f0/0 -*                   ^                    *- f0/0 - PC3
                |                   |                    |
                |                   ^                    |
     T2001<-<   R1 --- f1/0:f0/0 -- R0 --- f0/1:f1/0 --- R2  >-> T2002
                |     21000 21001   |     21002 21003    |
 PC2 ---- f0/1 -*                   |                    *- f0/1 - PC4
 20001    30001       *----*-----*------*-------*    PC9   30003   20003
                   30004 30005 30006  30007   41003 20008
                      |    |     |      |       |     |
                   20004 20005 20006  20007   41000 41008
                     PC5   PC6   PC7    PC8     |     |
                                                *-----*
                                                   |
                                                   R3 >-> T2003 

Routers

 R1: console 2001
     f0/0 connect PC1
     f0/1 connect PC2
     f1/0 connect R0
 
 R2: console 2002
     f0/0 connect PC3
     f0/1 connect PC4
     f1/0 connect R0
 
 R0: console 2000
     f0/0 connect R1
     f0/1 connect R2
     f2/0 connect PC5
     f2/1 connect PC6
     f2/2 connect PC7
     f2/3 connect PC8
     f2/4 connect R3
 
 R3: console 2003
     f0/0 connect R0
     f0/1 connect PC9

IP address

  dhcp      192.168.1.1                                2001:11::1
   /         /                                         192.168.11.1    
  PC1 ----- f0/0 -*                                          \
                  |                                     *- f0/0 - PC3          
                  |     172.16.1.2       172.16.2.2     |         /
                  |           \             /           |      192.168.11.2
                  R1 -- f1/0:f0/0 -- R0 -- f0/1:f1/0 -- R2     2001:11::2 
                  |     /            |          /       |             
  ip auto         |  172.16.1.1      |     172.16.2.1   |             ip auto
   /              |                  |                  |        192.168.12.2
  PC2 ----- f0/1 -*  f2/0  1     2   |  3    4          |                 \
            /         *----*-----*------*----*           *- f0/1 -------- PC4
    2001:2::1 eui-64  |    |    |     |      |  R3  PC9       \    
         192.168.2.1  |    |    |     |      |   |   |      2001:12::1 eui-64    
                      |    |    |     |      *-------*           192.168.12.1
                      PC5  PC6  PC7   PC8  f0/0     f0/1 
                         
  
  PC1    get IPv4 address via dhcp
  PC2    get IPv6 address via stateless auto configuration (RA)
         no IPv4 address
  PC3    192.168.11.2, default gateway 192.168.11.1
         2001:11::2/64, using RS to find the router
  PC4    get IPv6 address via stateless auto configuration (RA)
         192.168.12.2, default gateway 192.168.12.1
  PC5-6  192.168.3.5-6
         2001:3::5-9     
  PC7-9  192.168.4.7-9, vlan3(192.168.4.1)
         2001:4::7-9
 
  ipv4 CIDR=24, ipv6 CIDR=64

Running Dynamips script:

 mkdir -p r61
 cd r61
 $Dynamips -i R1 -T 2001 -P 7200 -t npe-400  -X --sparse-mem -r 192 -c 0x2102 \
   --idle-pc=0x60646da8 -p 0:C7200-IO-2FE -p 1:PA-2FE-TX \
   -s 0:0:udp:30000:127.0.0.1:20000 \
   -s 0:1:udp:30001:127.0.0.1:20001 \
   -s 1:0:udp:21000:127.0.0.1:21001 \
   $Image1 &
 cd -
 
 mkdir -p r62
 cd r62
 $Dynamips -i R2 -T 2002 -P 7200 -t npe-400 -X --sparse-mem -r 192 -c 0x2102 \
   --idle-pc=0x60646da8 -p 0:C7200-IO-2FE -p 1:PA-2FE-TX \
   -s 0:0:udp:30002:127.0.0.1:20002 \
   -s 0:1:udp:30003:127.0.0.1:20003 \
   -s 1:0:udp:21003:127.0.0.1:21002 \
   $Image1 &
 cd -
 
 mkdir -p r60
 cd r60
 $Dynamips -i R0 -T 2000 -P 3600 -t 3660 -X --sparse-mem -r 192 -c 0x2102 \
   --idle-pc=0x607789b8 -p 0:NM-1FE-TX -p 1:NM-1FE-TX -p 2:NM-16ESW \
   -s 0:0:udp:21001:127.0.0.1:21000 \
   -s 1:0:udp:21002:127.0.0.1:21003 \
   -s 2:0:udp:30004:127.0.0.1:20004 \
   -s 2:1:udp:30005:127.0.0.1:20005 \
   -s 2:2:udp:30006:127.0.0.1:20006 \
   -s 2:3:udp:30007:127.0.0.1:20007 \
   -s 2:4:udp:41000:127.0.0.1:41003 \
   $Image2 &
 cd ..
 
 mkdir -p r63
 cd r63
 $Dynamips -i R3 -T 2003 -P 3600 -t 3660 -X --sparse-mem -r 192 -c 0x2102 \
   --idle-pc=0x607789b8 -p 0:NM-16ESW \
   -s 0:0:udp:41003:127.0.0.1:41000 \
   -s 0:1:udp:30008:127.0.0.1:20008 \
   $Image2 &
 cd ..
    
 exit
wiki/tutorial.1289739385.txt.gz · Last modified: 2010/11/14 12:56 by mirnshi