|
ตัวอย่างนี้ LAN ใช้ Public
IP (จึงไม่มีการทำ NAT)
LAN IP : 202.129.49.192/29
WAN IP : 202.129.50.240/30
กำหนด FastEthernet0
เป็น 202.129.49.193 255.255.255.248
กำหนด Serial0 เป็น
202.129.50.242 255.255.255.252
Speed : default
(1544 Kbit)
Encapsulation :Defalut (HDLC)
การคอนฟิกมีขั้นตอนทั้งหมดดังนี้ :
Router>ena
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
ตั้งชื่อของเราเตอร์ชื่อว่า "itwizard"
Router(config)#hostname itwizard
เปิด Port
telnet และตั้ง Password สำหรับความปลอดภัย
โดยใช้ Password เป็น "cisco"
itwizard(config)#enable password cisco
itwizard(config)#line vty 0 4
itwizard(config-line)#password cisco
itwizard(config-line)#login
itwizard(config-line)#logging synchronous
itwizard(config-line)#^Z
กำหนด
name-server เป็น 2 ตัว
itwizard#conf t
itwizard(config)#ip name-server 202.129.16.69 202.129.27.134
คอนฟิกค่าของ
Serial0
itwizard(config)#int s0
itwizard(config-if)#description itwizard
# กำหนด
description ให้กับ Serial0 เป็น
"itwizard"
itwizard(config-if)#ip address 202.129.50.242 255.255.255.252
itwizard(config-if)#no shut
itwizard(config-if)#exit
คอนฟิกค่าของ
FastEthernet0
itwizard(config)#int f0
itwizard(config-if)#ip address 202.129.49.193 255.255.255.248
itwizard(config-if)#no shut
itwizard(config-if)#exit
กำหนด default
route โดยชี้ไปยัง WAN IP ฝั่งตรงข้าม
itwizard(config)#ip route 0.0.0.0 0.0.0.0 202.129.50.241
itwizard(config)#exit
บันทึกข้อมูล
itwizard#wr mem
หมายเหตุ ในส่วนของ Serial0
นั้นเราไม่ได้หนดค่าของ bandwitdth
และค่าของ encapsulation ซึ่งจะทำให้ทั้งสองค่านี้เป็นค่า
default โดยอัตโนมัติ คือ speed
เป็น 1544 Kbit และ encapsulation
เป็น hdlc
ถ้าต้องการกำหนด Speed (เช่นเป็น 128 Kbit)
และกำหนด encapsulation เป็น ppp
ก็สามารถทำได้ดังนี้
itwizard(config-if)#bandwidth 128
itwizard(config-if)#encapsulation ppp
เมื่อใช้คำสั่ง sh run จะได้คอนฟิกทั้งหมดดังนี้ :
itwizard#sh run
Building configuration...
Current configuration : 767 bytes
!
version 12.2
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname itwizard
!
enable password cisco
!
ip subnet-zero
!
!
ip name-server 202.129.16.69
ip name-server 202.129.27.134
!
!
!
!
!
interface FastEthernet0
ip address 202.129.49.193 255.255.255.248
speed auto
!
interface Serial0
ip address 202.129.50.242 255.255.255.252
!
ip classless
ip route 0.0.0.0 0.0.0.0 202.129.50.241
no ip http server
!
!
!
!
line con 0
line aux 0
line vty 0 4
password cisco
logging synchronous
login
!
no scheduler allocate
end |