top of page

LAB : Static Route Configuration

จาก Network Diagram ทำการตั้งค่าบน Router ตามหัวข้อดังต่อไปนี้


Network Diagram


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

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

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

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

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


 
 

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

 

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

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

3. 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

4. เครื่อง 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

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 เช่นกัน

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 เช่นกัน

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 และ SW3

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


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

 Branch_1>enable 
 Branch_1#conf t 

ตั้งค่า Static Route

 Branch_1(config)#ip route 10.10.10.4 255.255.255.252 10.10.10.1

หมายความว่า ถ้า Router Branch_1 ต้องการส่ง Packet ไปหา subnet 10.10.10.4/30 จะต้องส่ง Packet ออกไปทาง Next Hop IP 10.10.10.1

 Branch_1(config)#ip route 172.29.16.0 255.255.255.0 10.10.10.1

หมายความว่า ถ้า Router Branch_1 ต้องการส่ง Packet ไปหา subnet 172.29.16.0/24 จะต้องส่ง Packet ออกไปทาง Next Hop IP 10.10.10.1

Branch_1(config)#end
Branch_1# 

ตรวจสอบ Routing Table ที่ Router “R1”

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 not set
 
 10.0.0.0/30 is subnetted, 2 subnets
C 10.10.10.0 is directly connected, FastEthernet0/0
S 10.10.10.4 [1/0] via 10.10.10.1
 172.29.0.0/24 is subnetted, 1 subnets
S 172.29.16.0 [1/0] via 10.10.10.1
C 192.168.1.0/24 is directly connected, FastEthernet0/1
R1# 

จากผลการใช้คำสั่ง “show ip route” ยกตัวอย่างเช่น

S 172.29.16.0 [1/0] via 10.10.10.1

หมายความว่า Route บรรทัดนี้ถูกสร้างด้วยวิธี Static ถ้า Router Branch_1 ต้องการส่ง Packet ไปหา subnet 172.29.16.0/24 จะต้องส่ง Packet ออกไปทาง Next Hop IP 10.10.10.1


 

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


 HQ_1>enable 
 HQ_1#conf t 

ตั้งค่า Static Route

 HQ_1(config)#ip route 192.168.1.0 255.255.255.0 10.10.10.2

หมายความว่า ถ้า Router HQ_1 ต้องการส่ง Packet ไปหา subnet 192.168.1.0/24 จะต้องส่ง Packet ออกไปทาง Next Hop IP 10.10.10.2

 HQ_1(config)#ip route 172.29.16.0 255.255.255.0 10.10.10.5 

หมายความว่า ถ้า Router HQ_1 ต้องการส่ง Packet ไปหา subnet 172.29.16.0/24 จะต้องส่ง Packet ออกไปทาง Next Hop IP 10.10.10.5

HQ_1(config)#end
HQ_1# 

ตรวจสอบ Routing Table ที่ Router “HQ_1”


HQ_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 not set
 
 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
 172.29.0.0/24 is subnetted, 1 subnets
S 172.29.16.0 [1/0] via 10.10.10.5
S 192.168.1.0/24 [1/0] via 10.10.10.2
HQ_1#

 

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

 HQ_2>enable 
 HQ_2#conf t 

ตั้งค่า Static Route

 HQ_2(config)#ip route 10.10.10.0 255.255.255.252 10.10.10.6
 HQ_2(config)#ip route 192.168.1.0 255.255.255.0 10.10.10.6
 HQ_2(config)#end 
 HQ_2#

ตรวจสอบ Routing Table ที่ Router “HQ_2”

HQ_2#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 not set
 
 10.0.0.0/30 is subnetted, 2 subnets
S 10.10.10.0 [1/0] via 10.10.10.6
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 192.168.1.0/24 [1/0] via 10.10.10.6
HQ_2#

 

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

ทดสอบ ping จาก Notebook ไปหา Server และ Printer จากตัวอย่างจะเป็นการทดสอบ ping จาก Notebook 1 ไปหา WEB Server, DNS และ Printer ตามลำดับ

จาก Notebook 1 ทดสอบ ping ไปที่ WEB Server

จากผลการแสดงก็พบว่าสามารถ ping ได้ปกติ

จาก Notebook 1 ทดสอบ ping ไปที่ DNS

จากผลการแสดงก็พบว่าสามารถ ping ได้ปกติ

จาก Notebook 1 ทดสอบ ping ไปที่ Printer

จากผลการแสดงก็พบว่าสามารถ ping ได้ปกติ

 

Final Configure


 

Branch_1


 Branch_1#show running-config 
 !
 hostname Branch_1
 !
 interface FastEthernet0/0
  ip address 10.10.10.2 255.255.255.252
  duplex auto
  speed auto
 !
 interface FastEthernet0/1
  ip address 192.168.1.1 255.255.255.0
  duplex auto
  speed auto
 !
 ip route 10.10.10.4 255.255.255.252 10.10.10.1 
 ip route 172.29.16.0 255.255.255.0 10.10.10.1 
 !
 End
  

HQ_1


  HQ_1#show running-config 
 !
 hostname HQ_1
 !
 interface FastEthernet0/0
  ip address 10.10.10.6 255.255.255.252
  duplex auto
  speed auto
 !
 interface FastEthernet0/1
  ip address 10.10.10.1 255.255.255.252
  duplex auto
  speed auto
 !
 ip route 192.168.1.0 255.255.255.0 10.10.10.2 
 ip route 172.29.16.0 255.255.255.0 10.10.10.5 
 !
 End
  

HQ_2


  HQ_2#show running-config 
 !
 hostname HQ_2
 !
 interface FastEthernet0/0
  ip address 172.29.16.1 255.255.255.0
  duplex auto
  speed auto
 !
 interface FastEthernet0/1
  ip address 10.10.10.5 255.255.255.252
  duplex auto
  speed auto
 !
 ip route 10.10.10.0 255.255.255.252 10.10.10.6 
 ip route 192.168.1.0 255.255.255.0 10.10.10.6 
 !
 end
 
ดู 510 ครั้ง0 ความคิดเห็น
bottom of page