Test schematic daim duab:
System version: Ubuntu 16.04
Tcpreplay installation: apt-mus nruab tcpreplay
(Qhov no version ntawm NIC lub npe tsis yog hu ua eth0 thiab eth1, cov kev hloov pauv hauv qab no)
eth0 sib raug rau ens33 NIC: IP: 172.20.60.166 MAC: ec:a8:6b:82:32:c1
eth1 sib raug rau ens32 NIC: IP: 172.20.60.165 MAC: 00:13:3b:0f:6a:fb
Kuaj thawj kauj ruam: Preprocess lub Cache, cov lus txib yog:
tcpprep -ib tus neeg siv -i rzxSJ.pcap -o rzx.cach
Cov lus txib no faib cov ntaub ntawv PCAP rau hauv cov neeg siv khoom thiab cov neeg rau zaub mov, nrog cov neeg siv khoom los ntawm lub neej ntawd. Thaum xa, pob ntawv raug xa los ntawm ob tus neeg siv khoom thiab server.
Kauj ruam 2: Rov sau tus IP chaw nyob thiab MAC chaw nyob, cov lus txib yog:
Tcprewrite - e 172.20.60.166:172.20.60.165 -- enet - 10-channel dmac = 00:13:3 b: 0 f: 6 a: fb, ec, a8: 6 b: 82-32: c1 - enet - smac = ec: a8:6 b: 82-32: c1, 00:13:3 b: 0 f: 6 a: fb - c RZX. Cach -i rzxSJ. Pcap - o 111. Pcap
Cov lus txib no overwrites IP thiab MAC chaw nyob. Koj tuaj yeem siv lub cuab yeej xws li wireshark qhib 111.pcap thiab xyuas seb qhov kev hloov kho puas ua tiav.
Kuaj kauj ruam 3: Replay pob ntawv nrog cov lus txib hauv qab no:
tcpreplay -i ens33 -I ens32 -l 100 -t -c rzx.cach 111.pcap
ens33 chaw nres nkoj sib raug rau eth0. ens32 chaw nres nkoj sib raug rau eth1
Cov saum toj no yog Shenzhen HDV Phoelectron Technology Ltd. coj cov neeg siv khoom hais txog "tcpreplay tam sim no txoj kev sim" cov lus qhia, thiab peb lub tuam txhab yog cov chaw tsim khoom tshwj xeeb ntawm optical network manufacturers, cov khoom lag luam koom nrogONUseries (OLT ONU/ACONU/CATVONU/GPONONU/XPONONU), Optical module series (optical fiber module / Ethernet optical fiber module / SFP optical module),OLTseries (OLTkhoom siv /OLT hloov/optical mivOLT), thiab lwm yam., muaj ntau yam specifications ntawm kev sib txuas lus cov khoom rau cov kev xav tau ntawm txawv scenarios rau network txhawb, txais tos mus tham.