:: กลับหน้าแรก :: แสดงเนื้อหาทั้งหมด ::
9.12 ตัวอย่าง router configuration และการ block port: config ของ router ทำโดยผู้ดูแลเท่านั้น และมักทำไม่บ่อย บางคน config ครั้งเดียวจบครับ
- เคยมีอาจารย์บางโรงเรียนที่เปิดบริการอินเทอร์เน็ต แล้วยอมให้นักเรียนเล็ก ๆ ของพวกเขาเล่นเกม online ได้
แต่ firewall ปิดการเล่นเกม online ไว้ ทำให้เล่นกันไม่ได้เลย ผมก็เลยหาจากเว็บว่า ragnarok ใช้ port อะไร จะได้เปิดให้นักเรียนได้เล่น
เรื่องห้าม ไม่ห้ามเล่น block หรือ ไม่ block ragnarok หรือเกมอื่น ๆ กำลังเป็นที่ถกเถียงกัน
เพียงแต่ port ที่ ragnarok เข้าใช้คือ 5000 และ 6900 ซึ่งอ่านได้จาก http://www.ragnarok.in.th/faq_n.html
# show ip interface brief ใช้แสดงสถานะ FastEthernet ซึ่งเป็นฝั่ง LAN และ Serial0/0 ซึ่งเป็นฝั่ง WAN
ตัวอย่างการ config router
c:\telnet router.yonok.ac.th
username : superman
password : supergirl
yonok-router>help
yonok-router>enable
Password:
yonok-router#?
yonok-router#config terminal
yonok-router(config)#
. . . . . . .
yonok-router(config)#interface Serial0/0
yonok-router(config)#ip access-group 101 out
yonok-router(config)#access-list 101 deny tcp host 202.29.78.9 any eq 5000
yonok-router(config)#access-list 101 deny tcp host 202.29.78.9 any eq 6900
yonok-router(config)#access-list 101 permit ip any any
. . . . . . .
type command by your self
type no in the front of the command if you want to delete
webguide: http://www.cisco.com/en/US/products/hw/switches/ps718/products_command_reference_chapter09186a00800ed9dc.html
. . . . . . .
. . . . . . .
yonok-router(config)#
yonok-router(config)#exit
yonok-router#write
yonok-router#reload
yonok-router#show run
Building configuration...
Current configuration : 1905 bytes
!
version 12.2
service timestamps debug uptime
service timestamps log uptime
service password-encryption
service udp-small-servers
service tcp-small-servers
!
hostname yonok-router
!
aaa new-model
!
aaa session-id common
enable secret 5 aaaaQT$u.xb5Wxpxk5aaaaaaa
enable password 7 aaaa3080aaa
!
username superman password 7 aaaa81F1C354aaa
ip subnet-zero
!
interface FastEthernet0/0
ip address 202.29.78.254 255.255.255.0
speed auto
full-duplex
no cdp enable
!
interface Serial0/0
ip address 202.28.202.74 255.255.255.252
ip access-group 102 in
ip access-group 101 out
no cdp enable
!
router igrp 1
redistribute connected
network 202.28.29.0
network 202.29.78.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 Serial0/0
ip route 0.0.0.0 0.0.0.0 202.28.29.41
no ip http server
ip pim bidir-enable
!
access-list 101 deny tcp host 202.29.78.13 any eq ftp
access-list 101 deny tcp host 202.29.78.13 any gt 6000
access-list 101 permit ip any any
access-list 102 deny tcp any 202.29.78.0 0.0.0.255 eq 135
access-list 102 deny udp any 202.29.78.0 0.0.0.255 eq 135
access-list 102 permit ip any any
access-list 103 deny tcp host 202.29.78.18 any eq ftp
access-list 103 deny tcp host 202.29.78.18 any gt 2000
access-list 103 permit ip any any
dialer-list 1 protocol ip permit
dialer-list 1 protocol ipx permit
no cdp run
snmp-server community public RO
banner login ^CC
**********************************************************************
* www.yonok.ac.th *
**********************************************************************
^C
!
line con 0
line aux 0
line vty 0 4
password 7 aaa385F5A0aaa
!
end
yonok-router#
แสดงสถานะการเชื่อมต่อกับอุปกรณ์นอกสถาบันว่า Serial กับ Protocol ปกติหรือไม่
ถ้า Protocol ไม่ up ก็จะ ping ไม่ได้ แต่ถ้า Serial ขึ้น แสดงว่าเชื่อมต่อกับ TOT ได้
yonok-router#show ip interface brief
yonok-router#show interface serial0/0
Serial0/0 is up, line protocol is up
Hardware is PowerQUICC Serial
Internet address is 202.28.202.74/30
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 33/255, rxload 37/255
Encapsulation HDLC, loopback not set
Keepalive set (10 sec)
Last input 00:00:01, output 00:00:00, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/12/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 1158 kilobits/sec
5 minute input rate 227000 bits/sec, 46 packets/sec
5 minute output rate 203000 bits/sec, 67 packets/sec
25507 packets input, 15405951 bytes, 0 no buffer
Received 136 broadcasts, 0 runts, 6 giants, 0 throttles
158 input errors, 40 CRC, 102 frame, 0 overrun, 0 ignored, 16 abort
41777 packets output, 13772824 bytes, 0 underruns
0 output errors, 0 collisions, 21 interface resets
0 output buffer failures, 0 output buffers swapped out
2 carrier transitions
DCD=up DSR=up DTR=up RTS=up CTS=up
yonok-router#
|