Top Ad unit 728 × 90

Latest Posts

recent

การคอนฟิก Basic Router และการใช้งาน VPC ใน GNS3

การคอนฟิก Basic Router และการใช้งาน VPC ใน GNS3





การคอนฟิก เบสิก เราน์เตอร์ cisco เป็นพื้นฐานในการใช้งานอุปกรณ์ router ที่จะใช้ใน lab gns3 และจะมีการนำ VPC มาเชื่อมต่อเพื่อความสะดวกในการทดสอบ ผู้อ่านสามารถใช้งาน Virtual Box มาทำการทดสอบร่วมด้วยได้จากบทความก่อนหน้านี้


Network Diagram


ค่าของ IP Address ที่จะทำการใช้งาน

Router R1
Interface Fa0/0, IP 192.168.1.1/24
               S0/0,   IP 192.168.2.1/24

Router R2
Interface Fa0/0, IP 192.168.3.1/24
               S0/0,   IP 192.168.2.2/24

PC1, IP 192.168.1.10/24, Gateway 192.168.1.1
PC2, IP 192.168.3.10/24, Gateway 192.168.3.1

จาก network diagram มี network ip อยู่ทั้งหมด 3 networks และมี router อยู่ 2 ตัวคือ R1 และ R2 โดยแต่ล่ะตัวมีการนำ PC มาต่อเพื่อทำการทดสอบการคอนฟิก ในที่นี้จะเห็นว่าระหว่าง R1 และ R1 เชื่อมต่อกันทาง WAN interface คือ Serial port หมายเลข 0/0 โดยให้ router R1 เป็นตัวสร้างสัญญาณนาฬิกา (Clock rate) ในบทความนี้จะใช้ค่า clock rate อยู่ที่ 64000

ที่ Router R1 เปิด terminal ขึ้นมาจะได้ดังภาพ


1. เปลี่ยนชื่อ hostname โดยใช้คำสั่ง
Router#conf ter
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname R1
R1(config)#


2. Disable ค่า DNS lookup ในกรณีที่พิมพ์ชุดคำสั่งผิดพลาด router จะไม่ทำการ broadcast ไปที่ dns server ค่า default คือ 255.255.255.255
R1(config)#no ip domain-lookup





3. ตั้งค่า secrete password เอาไว้ใช้สำหรับเปลี่ยนโหมดจาก user execute ไปเป็น priviledge mode
R1(config)#enable secret adminPassword



4. ตั้งค่า Banner ข้อความต้อนรับเวลาเปิด terminal
R1(config)#banner motd &
Enter TEXT message.  End with the character '&'.
********************************
!!!AUTHORIZED ACCESS ONLY!!!
********************************
&








5. ตั้งค่า Console password ใช้สำหรับ console เข้า router ผ่านทาง console port ในที่นี้ password คือ YourP@$$w0rd
R1(config)#
R1(config)#line console 0
R1(config-line)#password YourP@$$w0rd
R1(config-line)#login
R1(config-line)#exit
R1(config)#







6. ตั้งค่า Line vty password ใช้สำหรับ console เข้า router ผ่านทาง telnet ในที่นี้ password คือ YourP@$$w0rd
R1(config)#
R1(config)#line vty 0 4
R1(config-line)#password YourP@$$w0rd
R1(config-line)#login
R1(config-line)#exit
R1(config)#







7. คอนฟิก IP address ให้กับ FastEthernet port คำสั่ง no shutdown คือการ enable port ให้ใช้งาน ค่า default คือ shutdown
R1(config)#
R1(config)#interface fastether 0/0
R1(config-if)#ip address 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#
*Mar  1 00:07:32.875: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar  1 00:07:33.875: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#








8. คอนฟิก IP address ให้กับ Serial port หาก port serial เป็นชนิด DCE ให้ทำการตั้งค่า clock rate ด้วย หากเป็น DTE ไม่ต้องทำการตั้งค่า clock rate
R1(config)#interface serial 0/0
R1(config-if)#ip address 192.168.2.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#
*Mar  1 00:08:22.623: %LINK-3-UPDOWN: Interface Serial0/0, changed state to up
*Mar  1 00:08:23.627: %LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0, changed state to up
R1(config-if)#







9. บันทึกค่าคอนฟิก
R1#copy running-config startup-config
Destination filename [startup-config]?
Building configuration...








10. การใช้งาน VPC โดยการตั้งค่า IP address และ default gateway
PC1> ip 192.168.1.10/24 192.168.1.1
Checking for duplicate address...
PC1 : 192.168.1.10 255.255.255.0 gateway 192.168.1.1






11. ทดสอบการเชื่อมต่อด้วยคำสั่ง Ping ไปที่ default gateway









หวังเป็นอย่างยิ่งว่าบทความนี้จะเป็นประโยชน์แก่ผู้ที่สนใจที่จะใช้งาน Router ในโปรแกรม GNS3 ได้ โดยผู้เขียนจะนำพื้นฐานการติดตั้งนี้ไปใช้ในบทความอื่นๆ อีกต่อไป ไม่ว่าจะเป็นใช้งานโปรแกรม third party อื่นๆ ที่จำเป็นในการทำ Lab อีกต่อๆไป
การคอนฟิก Basic Router และการใช้งาน VPC ใน GNS3 Reviewed by กรรมกร ไอที on 10:12 AM Rating: 5
All Rights Reserved by กรรมกร ไอที © 2014 - 2017
Powered By Blogger

Contact Form

Name

Email *

Message *

Powered by Blogger.