# Wireless Communications Study Notes
###### tags: [黃曜霆]`Wireless Communications`
## Content List
:::success
- Personal Information
- Assignment 1 : Basic Wireshark
- **1.1:** [Introduction about Wireshark Installation](https://hackmd.io/FIXvFW5jTkaETh8MG6uLWQ?view#11-Introduction-about-Wireshark-Installation)
- **1.2:** [Capture packets: access the NTUST homepage and answer the following questions](https://hackmd.io/FIXvFW5jTkaETh8MG6uLWQ?view#12-Capture-packets-access-the-NTUST-homepage-and-answer-the-following-questions%E3%80%82)。
- **1.3:** [Use the filter dns to find a DNS packet and answer the following questions。](https://hackmd.io/FIXvFW5jTkaETh8MG6uLWQ?view#13-Use-the-filter-dns-to-find-a-DNS-packet-and-answer-the-following-questions%E3%80%82)
- **1.4:** [Access an HTTP page and answer the following questions。](https://hackmd.io/FIXvFW5jTkaETh8MG6uLWQ?view#14-Access-an-HTTP-page-and-answer-the-following-questions%E3%80%82)
- **1.5/1.6:** [Presentation Video with subtitles (5mins)/Pcap](https://hackmd.io/FIXvFW5jTkaETh8MG6uLWQ?view#15-16-Presentation-Video-ampamp-PCAP)
- Assignment 2 : 5G End-To-End Log Analysis
- **1:** [Answer the following question from UElog](https://hackmd.io/FIXvFW5jTkaETh8MG6uLWQ?view#1-Answer-the-following-question-from-UElog)
- **2:** [Answer the following question from 5GClog](https://hackmd.io/FIXvFW5jTkaETh8MG6uLWQ?view#2-Answer-the-following-question-from-5GClog)
:::
## :notebook_with_decorative_cover: Personal Information
:::info
- Name: 黃曜霆
- Research Direction: **Satellite and UAVs Communication**
- Briefly summarize your background and why you want to take this course:
- In order to build my overall knowledge of communication systems, I want to understand the entire front-end to back-end system, including signal processing such as OFDM modulation, FDD system, etc., as well as the entire communication system.
:::
## :notebook_with_decorative_cover: Study Notes
### A1: Basic Wireshark
:::warning
- **A1: Basic Wireshark (12pt)**
- **Deadline : 12:00, Oct. 7**
- **Goal:**
- Students will be able to use Wireshark to perform basic packet capture and analysis, and understand the structure of network packets.
- **Requirment and Rule:**
- Rule:
1. Please provide proof for each answer using a screenshot or log.
2. Please include the link to your PCAP file (you can upload it to your Google Drive).
3. You will receive full points if you provide the correct answer for each question.
4. Paste your study note link and video link on your personal hackmd home page's `Deliverable`.
- Requirment:
- Make a wireshark and [KS wireshark](https://drive.google.com/drive/folders/1FiEmKeXc4M7qfkHbAzDjbaQ0Yn-SRcCO?usp=sharing) installation guide
- ==Note: KS wireshark only can install in the **Windows** OS==
- (1 pt) Capture packets: access the NTUST homepage (https://www.ntust.edu.tw/home.php) and answer the following questions:
- What is the IP address and port of the NTUST homepage (https://www.ntust.edu.tw/home.php)?
- What is the IP address and port of your PC when initially accessing the page?
- What is the process of the TCP three-way handshake?
- (1 pt) Use the filter `dns` to find a DNS packet and answer the following questions:
- What is the IP address and port of the DNS server?
- What is the domain name in this query?
- Which protocol(s) does this DNS packet use? (List the protocols from Layer 2 — Link Layer — up to Layer 5 — Application Layer in the TCP/IP five-layer model.)
- (1 pt) Access an HTTP page (e.g., http://www.gzxyzn.com/Article/bjrk2/1644.html) and answer the following questions:
- Which HTTP page did you access?
- What is the IP address and port of the server hosting this page?
- What is the request method?
- What is the response status code, and what does it mean?
- **Deliverable:**
- [ ] (4 pts) [Study Note](https://hackmd.io/@2xIzdkQiS9K3Pfrv6tVEtA/ryfyPD3oge):
- [ ] (1 pt) Make a wireshark installation guide
- [ ] (1 pt) Capture packets: access the [NTUST homepage](https://www.ntust.edu.tw/home.php) and answer the following questions:
- [ ] (1 pt) Use the filter `dns` to find a DNS packet and answer the following questions:
- [ ] (1 pt) Access an HTTP page (e.g., http://www.gzxyzn.com/Article/bjrk2/1644.html) and answer the following questions:
- [ ] (4 pts) Presentation Video (5 mins)
- [ ] (1 pt) [Vote the Top3](https://docs.google.com/forms/d/e/1FAIpQLSehUNvidISkA4JD97emaqW53Lze0zSrHqtWIIeSEYrNP1S96A/viewform?usp=header)
- Top3:
* Top1(3pts):
* Top2(2pts):
* Top3(1pt):
- **Reference:**
- [Wireshark-Basics.pdf](https://drive.google.com/file/d/15hqyIT_i-IEboLMnthlA8ZcC5HRLAgtp/view?usp=sharing)
- [How to install two different Wireshark versions in same PC](https://drive.google.com/file/d/1xA_2otvBCCxwzFfWDvkX0h_W4tpcdOrB/view?usp=drive_link)
- [KS-wireshark for 5G RRC_NAS callflow analysis](https://drive.google.com/drive/folders/1FiEmKeXc4M7qfkHbAzDjbaQ0Yn-SRcCO?usp=drive_link)
:::
### My Assignment 1
:::info
#### 1.1 Introduction about Wireshark Installation
[Wireshark Installation Guide](https://hackmd.io/@M11402212/Wireshark_Installation)
#### 1.2 Capture packets: access the NTUST homepage and answer the following questions。
- First, you can obtain your current IP address using the Windows command,like **Figure1**. Before visiting the website, you can use a filter to capture only TCP packets with the IP source set to your own IP address,just like **Figure2**.
This way, you can more quickly find the packets you are looking for. As you can see in **Figure3**, the Client Hello message (SNI = www.ntust.edu.tw) appears in the Info block. By opening the details in the Info section, you can also find the corresponding port number,like **Figure4**. Once you identify this information, you have almost completed **Q1** and **Q2**.
**Q1**: What is the IP address and port of the NTUST homepage (https://www.ntust.edu.tw/home.php)?
Ans: IP address is 140.118.242.124, port num is 443.
**Q2**: What is the IP address and port of your PC when initially accessing the page?
Ans: IP address is 192.168.1.120, port num is 62785
- **Figure1:**

- **Figure2:**

- **Figure3:**

- **Figure4:**

**Q3**: What is the process of the TCP three-way handshake?
Ans:
The process of the TCP three-way handshake is as follows:
1. The Source (client) specifies a port number and sends a [SYN] packet to the Destination (server) to request a connection.
2. The Destination replies with a [SYN, ACK] packet, indicating that it is ready and has acknowledged the request.
3. The Source then sends an [ACK] packet back to the Destination, confirming that the connection is established.
If the service on the specified port is not running, the Destination will instead respond with a [RST] packet in step 2, indicating that the connection is refused or reset.
#### 1.3 Use the filter dns to find a DNS packet and answer the following questions。
**Q1**: What is the IP address and port of the DNS server?
Ans: As you use the filter dns,you can find the dns server IP and used port ,like **Figure5**, the IP address is 8.8.8.8 ,port num is 53.
- **Figure5:**

**Q2**: What is the domain name in this query?
Ans: You can see the domain name in the Info block,just find the domain name system,and it will say dns name in the queries,as **Figure6**,the name is c.pki.goog.
- **Figure6:**

**Q3**:Which protocol(s) does this DNS packet use?
(List the protocols from Layer 2 — Link Layer — up to Layer 5 — Application Layer in the TCP/IP five-layer model.)
Ans: There are four layers,
**Link layer:** Ethernet II
**Internet Layer:** IPv4
**Transport Layer:** UDP (User Datagram Protocol, Src Port: 51027, Dst Port: 53)
**Application Layer:** Domain Name System (query)
So,you can see four layers above,as **Figure7**.
- **Figure7:**

#### 1.4 Access an HTTP page and answer the following questions。
**Q1**: Which HTTP page did you access?
Url:http://posterking.com.tw/?urlid=list&sn=10&type=0
**Q2**: What is the IP address and port of the server hosting this page?
Ans: IP address is 125.228.43.50 ,port num is 80,as **Figure 8**.
- **Figure8:**

**Q3**: What is the request method?
Ans: The request method is “Get”,in http this request method is quite common,you can also use follow tcp stream to see more information,as **Figure9**.
**Q4**: What is the response status code, and what does it mean?
Ans: You can see the code 200,it means that the server successfully processed the request and sent back the content (HTML/gzip compressed data as you’ll see later),also in **Figure9**.
- **Figure9:**

#### 1.5/ 1.6 Presentation Video (with subtitles) && PCAP
[Presentation Video](https://drive.google.com/drive/folders/1OFmHNOqCWaWcV3D7S2J8KHUOOtmj1KJM?usp=sharing)
:::
### A2: 5G End-To-End Log Analysis (14pt)
:::warning
- **A2: 5G End-To-End Log Analysis (14pt) -> Provided by Prof. MA**
- **Deadline : 12:00, Dec. 9**
- **Goal:**
- Students will be able to analyze sample pcap traces to understand the 5G End-to-End (E2E) Call Flow, gaining familiarity with the complete procedure from UE through RAN, core network, and user data transmission.
- **Requirment and Rule:**
- Rule:
1. Please provide proof for each answer using a screenshot or log.
2. You will receive full points if you provide the correct answer for each question.
3. Paste your study note link on your personal hackmd home page's `Deliverable`.
4. Please download the [PCAP file: 5G E2E CallFlows for HW in NTUST](https://drive.google.com/file/d/1C610NTzzaABf3sbSMwe1fln1Gx0JCwn8/view?usp=sharing) and use KS-wireshark for answering 5G E2E Call Flows Analysis
- Requirment:
- Mult-choice question for 5G E2E SCAS lessons (2 pts)
- 5G E2E Call Flows Analysis (8 pts)
1. Answer the following question from UElog
2. Answer the following question from 5GClog
- **Deliverable:**
- [ ] (2 pts) [Mult-choice question for 5G E2E SCAS lessons](https://docs.google.com/forms/d/e/1FAIpQLSeLIHPZQeS_cBTS9nax9Ld_CgVwuAX98K_IaW05p2CCTR11MQ/viewform)
- [ ] (8 pts) [5G E2E Call Flows Analysis](https://hackmd.io/@2xIzdkQiS9K3Pfrv6tVEtA/SJjBTLKlbl)
- [ ] (6 pts) Answer the following question from UElog
- [ ] (2 pts) Answer the following question from 5GClog
- [ ] (1 pt) [Vote the Top3](https://docs.google.com/forms/d/e/1FAIpQLScI3ZA223rjn1YO3NcL3WWniKKI6-fPhERh4aw2GbfOUZVMDg/viewform?usp=publish-editor) (DL: 23:59, Dec. 12)
- Top3:
* Top1(3pts):
* Top2(2pts):
* Top3(1pt):
- **Reference:**
- [PCAP file: 5G E2E CallFlows for HW in NTUST](https://drive.google.com/file/d/1C610NTzzaABf3sbSMwe1fln1Gx0JCwn8/view?usp=sharing)
- [SSC Modes – Session and Service Continuity in 5G](https://www.techplayon.com/ssc-modes-session-and-service-continuity-in-5g/)
:::
### My Assignment 2
### 1. Answer the following question from UElog
:::info
**1.1 What is the cell PLMN in logs?**
Ans:
By the capture, the code is **001 01**, we will know the UE is from whick telecom operators .
補充:
MCC (Mobile Country Code): MCC 長度為三碼,用來表示國家。
MNC (Mobile Network Code): MNC 長度為二或三碼,用來表示不同的電信業者。
From UE_log:


From 5GCsim_log:

The MNC difference in Taiwan telecom :
So it uses 遠傳電信-行動寬頻服務 :+1:

**1.2 What is the cell FR1 band in logs?**
Ans:
Use " **nr-rrc** " in filter,and follow SIB1:
SystemInformationBlockType1 -> servingCellConfigCommon -> downlinkConfigCommon -> frequencyInfoDL -> freqBandIndicatorNR

The frequency band in 5G NR:

The n79 band:

**1.3 How to check the gNB cellBarred or notBarre?**
Ans:
Use " **nr-rrc** " in filter,and follow MIB:
BCCH-BCH-Message -> mib -> pdcch-configSIB1,we can see the cellBarred part tell us that it's notBarred(1) .

**1.4 What is the MSIN of UE/Subscriber in log?**
Ans:
Before I see the UE_log, I use 5GCsim_log to see MSIN where it appears in the InitialUEMessage state, I find the MSIN code:1234567890 in 5GS mobile identity info, and also find the same MSIN code in UE log after.
From UE_log:

From 5GCsim_log:

**1.5 What is the registration type and FOR?**
Ans:
Like the last two row in the capture.
Registration Type: Initial registration (value is 1)
FOR (Follow-on Request): Pending (value is 1)
From UE_log:

From 5GCsim_log:

**1.6 What is the DNN?**
Ans:
It shows that the DNN is "internet" serving.
(After PDU Session establishment accept shows:)

**1.7 What is the SSC mode in 5G?**
Ans:
Because we can see the IP preservation when we do the communication session,
so we can speculate that it is maybe a mode 1.
And also, we find it in UE_log:

From 5GCsim_log:


**1.8 What is the PDU address?**
Ans:
Ping Request Source IP (UE IP) 172.16.0.1 .
From UE_log:(After PDU Session establishment accept shows:)


We can see PDU layer to see how it works:

**1.9 What is the 5QI for this session?**
Ans:
It's value 9,different value means different spec.


From UE_log:

From 5GCsim_log:

**1.10 What is the destination address of ICM?**
Ans:
Ping Request Destination IP (Server IP) is 22.22.22.22 .
From UE_log:

From 5GCsim_log:

**1.11 What is the period of MIB or SIB1?**
Ans:


**1.12 What is the Network Slicing (S-NSSAI) in UE?**
Ans:
The UE is requesting the SST code is 01,it means that the slice/service type is eMBB.

:::
### 2. Answer the following question from 5GClog
:::info
**2.1 What is the cell AllowedNSSAI in logs?**
Ans:
In the 5GC log (NGAP), the AllowedNSSAI sent from the Core Network to the Cell (gNB) contains SST: 01, SD: 030609.
(check the bits quantity)



**2.2 What is the RRCEstablishmentCause?**
Ans:
It's mo-Signalling,like Mobile Originating and Signalling.

**2.3 What is the PDU address?**
Ans:
Ping Request Source IP (UE 的 IP) 172.16.0.1 .

**2.4 What is the MSIN of UE/Subscriber in 5GC log?**
Ans:
I use 5GCsim_log to see MSIN ,it's on the InitialUEMessage state, I find the MSIN code:1234567890 in 5GS mobile identity info.

:::
:::info
Add the hyperlink of your study note when available. During your studying, try to address the key tasks/knowledge identified by [IEEE WCET Handbook](https://www.comsoc.org/media/6771/download).
:::