top of page

LAB : DEFAULT ROUTE (STATIC) CONFIGURATION

โจทย์ :

1. ทำการตั้งค่า Default Route บน Router Branch 1, HQ 1 และ HQ 2 เพื่อให้อุปกรณ์ในระบบ Network สามารถสื่อสารกันได้ทั้งหมด โดยใช้ Default Route แบบ Static

1.1 ทำการตั้งค่า Default Route บน Router Branch 1

1.2 ทำการตั้งค่า Default Route และ Static Route บน Router HQ_1

1.3 ทำการตั้งค่า Default Route บน Router HQ_2


2. ตรวจสอบการเชื่อมต่อของอุปกรณ์ Client และ Server ต่างๆ


Network Diagram:


สิ่งที่ต้องตรวจสอบก่อน

- ตรวจสอบการเชื่อมต่อว่าเป็นไปตาม Network Diagram หรือไม่

- Router จะต้องมี IP ที่ Interface ,Switch และ มี IP Management ต่างๆ เรียบร้อยแล้ว

- Access Point จะต้องมี IP Management การตั้งค่าพร้อมให้เครื่อง Client เชื่อมต่อเรียบร้อยแล้ว

SSID: Basic Network

Network Mode: Wireless-N Only

Standard Channel: Channel 11 (ความถี่ 2.462HHz)

Security Mode: WPA2 Personal

Encrption AES

Passphrase : password1234

LAN IP: 192.168.1.6/24

DHCP Server: Disabled

- เครื่อง Server, Printer และ Client ต้องมีการตั้งค่า IP Address ตาม Network Diagram เรียบร้อยแล้ว


 

Task and Configuration

 

ตรวจสอบ IP Address ที่ Router และ Switch โดยการใช้ command “show ip interface brief” ที่ Router Branch 1, HQ 1, HQ 2 และ Switch SW1, SW2


Router Branch_1

Branch_1>enable
Branch_1#show ip int brief
Interface IP-Address OK? Method Status Protocol 
FastEthernet0/0 10.10.10.2 YES manual up up 
FastEthernet0/1 192.168.1.1 YES manual up up 

จะเห็นได้ว่า สถานะของ Interface FastEthernet0/0 และ 0/1 จะ up และ Protocol ก็ up เช่นกัน


Router HQ_1

HQ_1>enable
HQ_1#show ip interface brief 
Interface IP-Address OK? Method Status Protocol 
FastEthernet0/0 10.10.10.6 YES manual up up 
FastEthernet0/1 10.10.10.1 YES manual up up 

จะเห็นได้ว่า สถานะของ Interface FastEthernet0/0 และ 0/1 จะ up และ Protocol ก็ up เช่นกัน


Router HQ_2

HQ_2>enable 
HQ_2#show ip interface brief 
Interface IP-Address OK? Method Status  Protocol 
FastEthernet0/0 172.29.16.1 YES manual up up 
 FastEthernet0/1 10.10.10.5 YES manual up up

จะเห็นได้ว่า สถานะของ Interface FastEthernet0/0 และ 0/1 จะ up และ Protocol ก็ up เช่นกัน


Switch จะต้องมี IP ที่ใช้ในการ Management และตั้งค่า Gateway เรียบร้อยแล้ว

ตรวจสอบโดยการใช้ command “show ip interface brief” ที่ Switch SW1, SW2


SW1

SW1#show ip interface brief 
Interface IP-Address OK? Method Status Protocol 
 -------------ตัดบางส่วน------------------------
Vlan1 192.168.1.5 YES manual up up

จะเห็นได้ว่า สถานะของ Interface Vlan 1 จะ up และ Protocol ก็ up เช่นกัน


SW2

SW2#show ip interface brief 
Interface IP-Address OK? Method Status Protocol 
 -------------ตัดบางส่วน------------------------
Vlan1 172.29.16.5 YES manual up up

จะเห็นได้ว่า สถานะของ Interface Vlan 1 จะ up และ Protocol ก็ up เช่นกัน




1. ทำการตั้งค่า Default Route บน Router Branch 1, HQ 1 และ HQ 2 เพื่อให้อุปกรณ์ในระบบ Network สามารถสื่อสารกันได้ทั้งหมด โดยใช้ Default Route แบบ Static


1.1 ทำการตั้งค่า Default Route บน Router Branch 1

ตรวจสอบ Routing Table ก่อนการตั้งค่า Default Route

Branch_1#show ip route
 -------------ตัดบางส่วน------------------------
Gateway of last resort is not set
 10.0.0.0/30 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/1

จะพบว่ามีเฉพาะ Route ที่เป็น Connected (เป็น Network ID บน Interface ของตัว Router เอง) และมีข้อความว่า “Gateway of last resort is not set” ซึ่ง Gateway ที่เป็นทางออกสุดท้ายหาก Packet ไม่ตรงกับ Routing บรรทัดอื่นๆ ยังไม่ได้ถูก set หรือ ไม่ได้ถูกตั้งค่า นั่นก็คือ ไม่ได้ตั้งค่า Default Route ไว้นั่นเอง


ทำการตั้งค่า Default Route บน Router Branch_1

Branch_1#conf t
Branch_1(config)#ip route 0.0.0.0 0.0.0.0 10.10.10.1

ทำการตรวจสอบการตั้งค่า Default Route

Branch_1(config)#end
Branch_1#
Branch_1#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
 D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
 N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
 E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
 i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
 * - candidate default, U - per-user static route, o - ODR
 P - periodic downloaded static route

Gateway of last resort is 10.10.10.1 to network 0.0.0.0
 10.0.0.0/30 is subnetted, 1 subnets
C 10.10.10.0 is directly connected, FastEthernet0/0
C 192.168.1.0/24 is directly connected, FastEthernet0/1
S* 0.0.0.0/0 [1/0] via 10.10.10.1
Branch_1#

จากผลลัพธ์ที่แสดง “S* 0.0.0.0/0 [1/0] via 10.10.10.1” เป็น Default Route ที่ถูกสร้างด้วยวิธี Static และมีข้อความ “Gateway of last resort is 10.10.10.1 to network 0.0.0.0” หมายความว่า Gateway ที่เป็นทางออกสุดท้ายหาก Packet ไม่ตรงกับ Routing บรรทัดอื่นๆ คือส่งไปที่ IP Next Hop 10.10.10.1


1.2 ทำการตั้งค่า Default Route และ Static Route บน Router HQ_1

ทำการตั้งค่า Default Route แบบ Static บน Router HQ_1

HQ_1#conf t
HQ_1(config)#ip route 0.0.0.0 0.0.0.0 10.10.10.5

ทำการตั้งค่า Static Route บน Router HQ_1

HQ_1(config)#ip route 192.168.1.0 255.255.255.0 10.10.10.2

ตรวจสอบ Routing Table ของ Router HQ_1

HQ_1(config)#end
HQ_1#
HQ_1#show ip route
 -------------ตัดบางส่วน------------------------
Gateway of last resort is 10.10.10.5 to network 0.0.0.0
 10.0.0.0/30 is subnetted, 2 subnets
C 10.10.10.0 is directly connected, FastEthernet0/1
C 10.10.10.4 is directly connected, FastEthernet0/0
S 192.168.1.0/24 [1/0] via 10.10.10.2
S* 0.0.0.0/0 [1/0] via 10.10.10.5

จากผลลัพธ์ที่แสดงก็จะพบว่ามีทั้ง Static Route(S) และ Default Route(S*) ที่ทำการตั้งค่าไว้ประกฎอยู่ใน Routing Table


1.3 ทำการตั้งค่า Default Route บน Router HQ_2

ทำการตั้งค่า Default Route บน Router HQ_2

HQ_2#conf t
HQ_2(config)#ip route 0.0.0.0 0.0.0.0 10.10.10.6

ตรวจสอบ Routing Table ของ Router HQ_2

HQ_2(config)#end
HQ_2#
HQ_2#show ip route
 -------------ตัดบางส่วน------------------------
Gateway of last resort is 10.10.10.6 to network 0.0.0.0
 10.0.0.0/30 is subnetted, 1 subnets
C 10.10.10.4 is directly connected, FastEthernet0/1
 172.29.0.0/24 is subnetted, 1 subnets
C 172.29.16.0 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [1/0] via 10.10.10.6


จากผลลัพธ์ที่แสดงก็จะพบว่ามี Default Route(S*) ที่ทำการตั้งค่าไว้ประกฎอยู่ใน Routing Table


2. ตรวจสอบการเชื่อมต่อของอุปกรณ์ Client และ Server ต่างๆ

ที่ Notebook 1 ทำสอบเข้า WEB www.basic.com

พบว่ามีการตอบกลับมาจาก www.basic.com ซึ่งแสดงว่าสามารถเชื่อมต่อได้ปกติ



ที่ Notebook 2 ทำการเชื่อมต่อไปที่ Printer ซึ่งทดสอบโดยการใช้คำสั่ง ping

จากผลลัพธ์ที่แสดง พบว่าสามารถ ping ได้ปกติ




ดู 316 ครั้ง0 ความคิดเห็น
bottom of page