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 -* *--f1/1 -- RPC ^ *- 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 f1/1 connect RPC, physical PC 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 192.168.100.240 192.168.100.19 2001:11::1 / / / / 192.168.11.1 PC1 ----- f0/0 -* *--f1/1 ------- RPC / | / *- 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 \ -s 1:1:linux_eth:eth1 \ $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
Test command
1 dhcp 2 ip auto 3 ip 192.168.11.2 192.168.11.1 24 ip 2001:11::2 4 ip 192.168.12.2 192.168.12.1 24 5 ip 192.168.3.5 24 6 ip 192.168.3.6 24 7 ip 192.168.4.7 24 8 ip 192.168.4.8 192.168.4.1 24 9 ip 192.168.4.9 192.168.4.1 24 # testing 4 echo -- ping 192.168.1.2 icmp/udp/tcp from 192.168.12.2 ---- p 192.168.1.2 -1 -c 5 -i 1 p 192.168.1.2 -2 -c 5 -i 2 -l 128 p 192.168.1.2 -3 -c 2 p 192.168.1.2 -3 -f s -c 2 echo -- ping nonexist host --- p 192.168.1.3 -1 -c 2 p 192.168.1.3 -2 -c 2 p 192.168.1.3 -3 -c 2 p 0.0.0.0 -1 -c 2 p 255.255.255.255 -1 -c 2 9 echo -- ping 192.168.l.2 icmp/udp/tcp from 192.168.4.9 ---- p 192.168.1.2 -1 -c 2 -i 1 p 192.168.1.2 -2 -c 2 -i 2 -l 128 p 192.168.1.2 -3 -c 2 -p 80 p 192.168.1.2 -3 -f s -c 2 p 192.168.4.8 -1 -c 2 -i 1 p 0.0.0.0 -1 -c 2 p 255.255.255.255 -1 -c 2 tr 192.168.1.2 tr 192.168.1.3 6 5 echo -- ping from 192.168.3.5 ---- p 192.168.1.2 -1 -c 2 -i 1 p 192.168.3.6 -i 10 -c 2 echo -- test IPV6 -- echo -- ping from fe80::2050:79ff:fe66:6804, vlan 1 ---- 5 p fe80::2050:79ff:fe66:6805 -1 -c 3 -i 10 p fe80::2050:79ff:fe66:6805 -2 -c 3 -i 10 p fe80::2050:79ff:fe66:6805 -3 -c 3 -i 10 p fe80::2050:79ff:fe66:6805 -3 -c 3 -i 10 -f s 7 echo -- ping from fe80::2050:79ff:fe66:6806 vlan 2---- p fe80::2050:79ff:fe66:6808 -1 -c 3 -i 10 p fe80::2050:79ff:fe66:6808 -2 -c 3 -i 10 p fe80::2050:79ff:fe66:6808 -3 -c 3 -i 10 p fe80::2050:79ff:fe66:6808 -3 -c 3 -i 10 -f s 4 echo -- ping from 2001:12::2050:79ff:fe66:6803 ip auto---- p 2001:1::2050:79ff:fe66:6801 -1 -c 3 -i 1 p 2001:1::2050:79ff:fe66:6801 -2 -c 3 -i 1 p 2001:1::2050:79ff:fe66:6801 -3 -c 3 -i 1 t 2001:1::2050:79ff:fe66:6801 5 t 2001:1::2050:79ff:fe66:6804 5 3 echo -- ping from 2001:11::2 ---- p 2001:1::2050:79ff:fe66:6801 -1 -c 3 -i 1 p 2001:1::2050:79ff:fe66:6801 -2 -c 3 -i 1 p 2001:1::2050:79ff:fe66:6801 -3 -c 3 -i 1 p 2001:1::2050:79ff:fe66:6801 -3 -c 3 -i 1 -f s t 2001:1::2050:79ff:fe66:6801 5 t 2001:1::2050:79ff:fe66:6804 5
wiki/tutorial.1290185413.txt.gz · Last modified: 2010/11/19 16:50 by mirnshi