วันพุธที่ 22 เมษายน พ.ศ. 2558

กำหนด IP address ประจำ interface port เพื่อให้ Network

บทความเรื่อง Networking ด้วย Cisco
โดย http://www.prasansoft.com
ในส่วนบทความนี้เราจะกำหนด IP address
ประจำ interface port เพื่อให้ Network ทำงานได้ 



Diagram Network เราจะทำการเชื่อมต่อ Router1 และ Router2




เราจะใช้ command ในการทดลองนี้ดังนี้
สถานะ promt ของ Routerคำสั่งที่ใช้ในในการทดลองนี้ความหมายของคำสั่ง
Router>enableเข้าไปยัง Router
Router#configure terminalเข้าสู่โหมด privilege
Route
r(config)#
interface fastethernet0/0ทำงานกับ interface fastethernet port0/0
Router
(config-if)#
ip address 192.168.1.1
255.255.255.0
กำหนด Ip address ให้กับ port interface fastethernet 0/0 มีค่าเท่ากับ 192.168.1.1 subnet mask 255.255.255.0
Router
(config-if)#
no shutกระตุ้นหรือการเปิดการทำงานของ interface
Router
(config-if)#
interface serial 0/1กำหนด IP address ประจำ port
interface serial port0/1 ของ WAN
Router
(config-if)#
ip address 10.82.1.1
255.255.255.0
ค่า Wan Ip address ที่กำหนดให้WAN
Router
(config-if)#
no shutกระตุ้นหรือการเปิดการทำงานของ interface



คำสั่งที่เราต้องการเปิดให้ Router ทำงานต้องจัดคำสั่งเป็น Step นะครับ
การ Configure ที่ router 1

Router1>enable
Router1#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router1(config)#interface fastethernet0/0
Router1(config-if)#ip address 192.168.1.1 255.255.255.0Router1(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up


Router1(config-if)#exit
Router1(config)#exit

Router1(config)#interface serial 0/1Router1(config-if)#
Router1(config-if)#ip address 10.82.1.1 255.255.255.0
Router1(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/1, changed state to down
การ Configure ที่ router 2

Router2>
Router2>enable
Router2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router2(config)#
Router2(config)#interface fastethernet0/0
Router2(config-if)#ip address 192.168.2.1 255.255.255.0
Router2(config-if)#no shut
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
Router2(config-if)#


Router2(config-if)#exit
Router2(config)#exit
Router2#
Router2#enable
Router2#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router2(config)#interface serial0/0
Router2(config-if)#ip address 10.82.1.2 255.255.255.0
Router2(config-if)#no shut
%LINK-5-CHANGED: Interface Serial0/0, changed state to down
Router2(config-if)#

ตรวจสอบสถานะการ COnfiguration Fastehternet0/0 ของ Router1 และ

ตรวจสอบสถานะการ COnfiguration Fastehternet0/0 ของ Router2

ด้วยการใช้คำสั่ง Show Ip interface brief



ทำการทดลอง การเชื่อมต่อด้วย Diagram ในที่นี้ สามารถทดสอบได้

ด้วยการ Ping จาก PC ไปที่ Router เป็นลักษณะของการติดต่อ Gateway นั่นเอง




ทดสอบด้วย การ Ping Command ของ 192.168.1.2 ซึ่งเชื่อมต่อที่ router 1




ทดสอบด้วย การ Ping Command ของ 192.168.2.2 ซึ่งเชื่อมต่อที่ router 2




การกำหนด Ip address ให้กับ interface ซึ่งเป็นค่า Gateway นั่นเอง

โดย http://www.prasansoft.com/Main-Cisco-network.php

ไม่มีความคิดเห็น:

แสดงความคิดเห็น