การทำงานของ ASA ในรูปแบบนี้จะใช้ในกรณีที่เราไม่มีอุปกรณ์ Router และ Switch ที่สามารถทำงานในระดับ Layer 3 ได้เลย แต่ต้องการให้ระบบนั้นมีการแบ่ง VLAN เพื่อลดการ Broadcast ของข้อมูลภายในระบบ และง่ายต่อการดูแลจัดการกับ IP Address
การ Configure มีดังนี้
Step 1. ระบุ Interface ที่ต้องการใช้งาน
- hostname(config)# interface physical_interface
- physical_interface หมายถึงหมายเลขพอร์ตเป็นชนิด [ช่อง /] พอร์ตดังต่อไปนี้
- 2learningcisco(config)# interface GigabitEthernet0/0
Step 2. ระบุความเร็วบน Interface
- hostname(config-if)# speed {auto | 10 | 100 | 1000 | nonegotiate}
- 2learningcisco(config)# speed 100
Step 3. ระบุชนิดบน Interface
- hostname(config-if)# duplex {auto | full | half}
- 2learningcisco(config)# duplex full
Step 4. เปิดใช้งาน Interface
- hostname(config-if)# no shutdown
- 2learningcisco(config)# no shutdown
Step 5. ระบุ SubInterface ที่ต้องการใช้งาน
- hostname(config)# interface physical_interface.subinterface
- 2learningcisco(config)# interface GigabitEthernet0/0.10
Step 6. ระบุ VLAN ลงใน SubInterface ที่ต้องการใช้งาน
- hostname(config)# vlan vlan_id
- 2learningcisco(config)# vlan 10
Step 7. เปิดใช้งาน SubInterface
- hostname(config-if)# no shutdown
- 2learningcisco(config)# no shutdown
Step 8. เพิ่ม Policy ระหว่าง Traffic
- hostname(config-if)# same-security-traffic permit inter-interface
- hostname(config-if)# same-security-traffic permit intra-interface
- 2learningcisco(config)# same-security-traffic permit inter-interface
- 2learningcisco(config)# same-security-traffic permit intra-interface
Step 9. ทำการ NAT ระหว่าง SubInterface
- hostname(config-if)# static (physical_interface.subinterface,physical_interface.subinterface) ip_physical_interface.subinterface ip_physical_interface.subinterface netmask ip_subnetmask
- 2learningcisco(config)# static (Wire,Wireless) 10.10.10.0 10.10.10.0 netmask 255.255.255.0
ตัวอย่าง Configure สำหรับการใช้งานจริง
interface GigabitEthernet0/0
speed 100
duplex full
no nameif
no security-level
no ip address
!
interface GigabitEthernet0/0.10
description Wire
vlan 10
nameif Wire
security-level 100
ip address 10.10.10.1 255.255.255.0
!
interface GigabitEthernet0/0.20
description Wireless
vlan 20
nameif Wireless
security-level 100
ip address 10.20.20.1 255.255.255.0
!
interface GigabitEthernet0/0.30
description DMZ
vlan 30
nameif DMZ
security-level 50
ip address 10.30.30.1 255.255.255.0
!
same-security-traffic permit inter-interface
same-security-traffic permit intra-interface
!
static (Wire,Wireless) 10.10.10.0 10.10.10.0 netmask 255.255.255.0
static (Wire,DMZ) 10.10.10.0 10.10.10.0 netmask 255.255.255.0
static (Wireless,Wire) 10.20.20.0 10.20.20.0 netmask 255.255.255.0
static (Wireless,DMZ) 10.20.20.0 10.20.20.0 netmask 255.255.255.0
static (DMZ,Wire) 10.30.30.0 10.30.30.0 netmask 255.255.255.0
static (DMZ,Wireless) 10.30.30.0 10.30.30.0 netmask 255.255.255.0
!