My solution of ComputerNetworking: A Top-down Approach Labs and Problems.
The Lectures of CNet please check:
講義のノートはこちらに取ります:
Lab | Solution | 問題文の日本語翻訳 |
---|---|---|
WiresharkLAB 0 | - | - |
Socket Prog1 | A1 | TCP/UDP Socket |
LAB 1: WebServer | L1 | ウェブサーバ |
LAB 2: UDPPinger | L2 | UDP Pinger |
LAB 3: SMTP | L3 | メールサーバ |
Actually, this lab is from CS144.
DEMO: Wireshark
Wireshark is an application that lets you actually observe the datagrams being sent and received on your machine over the Internet.
We filtered for packets with a particular IP address (given by Keith):
Image: screenshot of Wireshark filter box, with ip.dst == 171.64.65.14
filter applied. This filters for IP packets with destination IP address 171.64.65.14.
We then pinged that IP address from a terminal window
$ ping 171.64.65.14
APPENDIX:Wireshark
A Network Packet Analyzer
You could filter the particular IP dst to examine its packet info.
- Implementation: Conform Protocol Standard
- Proprietary APP: Choose Port
127.0.0.1
is local hostname.
Unreliable; Datagram
Coneection-oriented; Reliable
Based on TCP Protocol
Modular: Socket, Sys
Function:
-
socket.socket(socket.AF_INET, socket.SOCK_STREAM)
: Initialization -
socket.bind((serverAdress, serverPort))
: Bind socket (Usually Used For Server) -
socket.recv(buffer size)
: Receive obj -
socket.recvfrom(buffersize, (serverAddress, serverPort))
: Receive obj from server