# Create Port

## Prerequisite

* มีการสร้าง VPC Network แล้ว ([ขั้นตอนการสร้าง VPC Network](/ncs-documents/networking/vpc-network/create-a-network.md))

## Instructions

### 1.  สร้าง Port

คลิกที่ปุ่ม + "Create" และเลือก Port

<figure><img src="/files/xaJ6sFEJmli5vy3qcaAJ" alt=""><figcaption><p>VPC Network Page</p></figcaption></figure>

### 2. กรอกข้อมูลเพื่อสร้าง Port

<figure><img src="/files/ES4F4xWXxjYP4Ha0qXSo" alt=""><figcaption><p>Create Port</p></figcaption></figure>

**Name** : ชื่อ VPC Network (สามารถแก้ไขได้)

\*ตั้งได้เฉพาะตัวอักษรภาษาอังกฤษ(A-Z, a-z), ตัวเลข(0-9), hyphen(-) หรือ underscore(\_)

**Network** : VPC Network ที่จะให้สร้าง Port

**IP Address** : IP ของ Port (Toggle เปิดเพื่อ Auto Assign, Toggle ปิดเพื่อ Manual Assign)

**MAC Address** : MAC ของ Port (Toggle เปิดเพื่อ Auto Assign, Toggle ปิดเพื่อ Manual Assign)

**Security Group** : Security Group ของ Port (Toggle เปิดเพื่อ Enable, Toggle ปิดเพื่อ Disable)

### 3. สร้าง Port เสร็จ

port ใหม่จะอยู่ภายใต้ VPC network สามารถ expand ออกมาเพื่อดูได้

<figure><img src="/files/TYa9ShWeLoBTE7dMfVyL" alt=""><figcaption><p>Verify Port</p></figcaption></figure>

### 4. การนำ port ไปใช้งานกับ VM (Instance)

เมื่อสร้าง port เสร็จแล้ว port นั้นจะนำไปใช้งานร่วมกับ VM หรือ Instance ได้ โดยเราสามารถดำเนินการได้ดังนี้

4.1. เลือก VM ที่ต้องการใช้งาน port ที่สร้างมาตามรูปด้านล่าง

<figure><img src="/files/IUYIUbRXU872BDFaVXp9" alt=""><figcaption><p>Network of Instance</p></figcaption></figure>

4.2. เลือก ATTCH PORT

<figure><img src="/files/yK0NN4sHZmGlnk3UI1gl" alt=""><figcaption><p>attach port</p></figcaption></figure>

4.3. เลือก port ที่เราสร้างเพื่อใช้งานกับ VM ดังนี้

* เลือก Instance Network เป็น VPC Network เดียวกันกับที่เราทำการสร้าง Port

<figure><img src="/files/SWPSGyf5GeDoVOqg6Ckx" alt=""><figcaption><p>Instance Network</p></figcaption></figure>

* เลือก Port และ IP address ที่สร้างมา แล้วทำการกด ATTACH

<figure><img src="/files/CyrKMMXvZJYeZVGdJ0SM" alt=""><figcaption><p>seleted port</p></figcaption></figure>

* ดำเนินกาเสร็จแล้วจะพบว่ามี Port เพิ่มขึ้นมาให้ใช้งานตามรูด้านล่าง

<figure><img src="/files/0m0Eg5R4vM2HoU6aq9Wk" alt=""><figcaption><p>Verify Port attached to Instance</p></figcaption></figure>


---

# Agent Instructions: Querying This Documentation

If you need additional information that is not directly available in this page, you can query the documentation dynamically by asking a question.

Perform an HTTP GET request on the current page URL with the `ask` query parameter:

```
GET https://docs-epc.gitbook.io/ncs-documents/networking/vpc-network/create-port.md?ask=<question>
```

The question should be specific, self-contained, and written in natural language.
The response will contain a direct answer to the question and relevant excerpts and sources from the documentation.

Use this mechanism when the answer is not explicitly present in the current page, you need clarification or additional context, or you want to retrieve related documentation sections.
