Archive for พฤศจิกายน, 2007

Nov-29-07

ตัวอย่างการคอนฟิก 2811 router

posted by อดิศร ขาวสังข์

Router#sh run
Building configuration…

Current configuration : 1431 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$cMsF$Hi7eYcFQDOPw8buY7IjnE0
!
no aaa new-model
!
resource policy
!
ip subnet-zero
!
!
ip cef
!
!
no ip domain lookup
!
!
!
!
interface FastEthernet0/0
 ip address 202.29.70.1 255.255.255.192
 duplex auto
 speed auto
!
interface FastEthernet0/1
 ip address 192.168.2.1 255.255.255.0
 ip access-group 101 in
 ip nat inside
 duplex auto
 speed auto
!
interface Serial0/2/0
 bandwidth 2048
 ip address 202.28.221.74 255.255.255.252
 ip nat outside
 no fair-queue
!
interface Serial0/2/1
 no ip address
 shutdown
 clock rate 2000000
!
ip classless
ip route 0.0.0.0 0.0.0.0 202.28.221.73
ip route 10.0.0.0 255.0.0.0 192.168.2.2
ip route 192.168.0.0 255.255.255.0 192.168.2.2
!
no ip http server
ip nat inside source list 10 interface Serial0/2/0 overload
!
access-list 10 permit 10.0.0.0 0.255.255.255
access-list 10 permit 192.168.0.0 0.0.0.255
access-list 101 deny   udp any any range 135 netbios-ss
access-list 101 deny   tcp any any range 135 139
access-list 101 deny   tcp any any eq 445
access-list 101 deny   ip any 192.168.1.0 0.0.0.255
access-list 101 permit ip any any
snmp-server community xxxx
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
 password xxxxx
 login
!
scheduler allocate 20000 1000
!
end

Router#

Nov-29-07

ตัวอย่างการคอนฟิก L3 Switch Catalyst3560_new

posted by อดิศร ขาวสังข์

switch#sh run
Building configuration…

Current configuration : 4138 bytes
!
version 12.2
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname switch
!
enable secret 5 $1$4k7P$zX3BVvoxAACUV1br.uFcW.
!
no aaa new-model
vtp mode transparent
ip subnet-zero
ip routing
no ip domain-lookup
ip dhcp excluded-address 10.10.0.1 10.10.0.20
ip dhcp excluded-address 10.13.0.1 10.13.0.20
ip dhcp excluded-address 10.15.0.1 10.15.0.20
ip dhcp excluded-address 10.17.0.1 10.17.0.20
ip dhcp excluded-address 10.19.0.1 10.19.0.20
ip dhcp excluded-address 192.168.0.1 192.168.0.10
!
ip dhcp pool vlan10
   network 10.10.0.0 255.255.255.0
   default-router 10.10.0.1
   dns-server 61.19.253.134 61.19.253.136
   lease 7
!
ip dhcp pool vlan13
   network 10.13.0.0 255.255.255.0
   default-router 10.13.0.1
   dns-server 61.19.253.134 61.19.253.136
   lease 7
!
ip dhcp pool vlan15
   network 10.15.0.0 255.255.255.0
   default-router 10.15.0.1
   dns-server 61.19.253.134 61.19.253.136
   lease 7
!
ip dhcp pool vlan17
   network 10.17.0.0 255.255.255.0
   default-router 10.17.0.1
   dns-server 61.19.253.134 61.19.253.136
   lease 7
!
ip dhcp pool vlan19
   network 10.19.0.0 255.255.255.0
   default-router 10.19.0.1
   dns-server 61.19.253.134 61.19.253.136
   lease 7
!
ip dhcp pool vlan2
   network 192.168.0.0 255.255.255.0
   default-router 192.168.0.1
   dns-server 61.19.253.134 61.19.253.135
   lease 7
!
!
!
!
no file verify auto
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
vlan 2
 name Hinet_2/2M
!
vlan 9
!
vlan 10
 name local
!
vlan 11-12
!
vlan 13
 name site1
!
vlan 14
 name Site2
!
vlan 15
 name site2
!
vlan 16
 name Site4
!
vlan 17
 name site3
!
vlan 19
 name site4
!
vlan 24,30,100,200
!
interface FastEthernet0/1
 no switchport
 ip address 192.168.2.2 255.255.255.0
!
interface FastEthernet0/2
 switchport access vlan 2
 switchport mode access
!
interface FastEthernet0/3
 switchport access vlan 2
 switchport mode access
!
interface FastEthernet0/4
 switchport access vlan 2
 switchport mode access
 spanning-tree portfast
!
interface FastEthernet0/5
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/6
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/7
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/8
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/9
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/10
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/11
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/12
 switchport access vlan 13
 switchport mode access
!
interface FastEthernet0/13
 description Paphai_College
 switchport access vlan 13
 switchport mode access
!
interface FastEthernet0/14
!
interface FastEthernet0/15
 description Nursecollege
 switchport access vlan 15
 switchport mode access
!
interface FastEthernet0/16
!
interface FastEthernet0/17
 description Kokkauie_College
 switchport access vlan 17
 switchport mode access
!
interface FastEthernet0/18
!
interface FastEthernet0/19
 description Takbai_kanarcheep_College
 switchport access vlan 19
 switchport mode access
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 ip address 202.29.70.4 255.255.255.192
!
interface Vlan2
 ip address 192.168.0.2 255.255.255.0
!
interface Vlan10
 ip address 10.10.0.1 255.255.255.0
!
interface Vlan13
 ip address 10.13.0.1 255.255.255.0
!
interface Vlan15
 ip address 10.15.0.1 255.255.255.0
!
interface Vlan17
 ip address 10.17.0.1 255.255.255.0
!
interface Vlan19
 ip address 10.19.0.1 255.255.255.0
!
ip default-gateway 192.168.0.1
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.2.1
ip route 0.0.0.0 0.0.0.0 192.168.0.1 250
no ip http server
!
snmp-server community xxxxx
!
control-plane
!
!
line con 0
line vty 0 4
 password xxxxx
 login
line vty 5 15
 no login
!
end

switch#

Nov-29-07

ตัวอย่างการคอนฟิก L3 Switch Catalyst3560

posted by อดิศร ขาวสังข์

switch#sh run
Building configuration…

Current configuration : 3785 bytes
!
version 12.2
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname switch
!
enable secret 5 $1$yKGl$QjEyHSwsv5NOgxZB0jCM/1
!
no aaa new-model
ip subnet-zero
ip routing
no ip domain-lookup
ip dhcp excluded-address 10.10.0.1 10.10.0.20
ip dhcp excluded-address 10.13.0.1 10.13.0.20
ip dhcp excluded-address 10.15.0.1 10.15.0.20
ip dhcp excluded-address 10.17.0.1 10.17.0.20
ip dhcp excluded-address 10.19.0.1 10.19.0.20
!
ip dhcp pool vlan10
   network 10.10.0.0 255.255.255.0
   default-router 10.10.0.1
   dns-server 61.19.253.134 61.19.253.136
   lease 7
!
ip dhcp pool vlan13
   network 10.13.0.0 255.255.255.0
   default-router 10.13.0.1
   dns-server 61.19.253.134 61.19.253.136
   lease 7
!
ip dhcp pool vlan15
   network 10.15.0.0 255.255.255.0
   default-router 10.15.0.1
   dns-server 61.19.253.134 61.19.253.136
   lease 7
!
ip dhcp pool vlan17
   network 10.17.0.0 255.255.255.0
   default-router 10.17.0.1
   dns-server 61.19.253.134 61.19.253.136
   lease 7
!
ip dhcp pool vlan19
   network 10.19.0.0 255.255.255.0
   dns-server 61.19.253.134 61.19.253.136
   default-router 10.19.0.1
   lease 7
!
!
!
!
no file verify auto
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
interface FastEthernet0/1
 no switchport
 ip address 192.168.2.2 255.255.255.0
!
interface FastEthernet0/2
 switchport access vlan 2
 switchport mode access
!
interface FastEthernet0/3
 switchport trunk allowed vlan 10
 switchport mode access
!
interface FastEthernet0/4
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/5
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/6
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/7
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/8
 switchport access vlan 10
 switchport mode access
 spanning-tree portfast
!
interface FastEthernet0/9
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/10
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/11
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/12
 switchport access vlan 10
 switchport mode access
!
interface FastEthernet0/13
 description Site1
 switchport access vlan 13
 switchport mode access
!
interface FastEthernet0/14
!
interface FastEthernet0/15
 description Nursecolleg
 switchport access vlan 15
 switchport mode access
!
interface FastEthernet0/16
!
interface FastEthernet0/17
 description Site2
 switchport access vlan 17
 switchport mode access
!
interface FastEthernet0/18
!
interface FastEthernet0/19
 description Takbai_kanarcheep_College
 switchport access vlan 19
 switchport mode access
 spanning-tree portfast
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface Vlan1
 ip address 202.29.70.4 255.255.255.192
!
interface Vlan2
 ip address 192.168.0.2 255.255.255.0
!
interface Vlan10
 ip address 10.10.0.1 255.255.255.0
!
interface Vlan13
 ip address 10.13.0.1 255.255.255.0
!
interface Vlan15
 ip address 10.15.0.1 255.255.255.0
!
interface Vlan17
 ip address 10.17.0.1 255.255.255.0
!
interface Vlan19
 ip address 10.19.0.1 255.255.255.0
!
ip default-gateway 202.29.70.1
ip classless
ip route 0.0.0.0 0.0.0.0 192.168.0.1
ip route 0.0.0.0 0.0.0.0 192.168.2.1 250
ip route 202.29.70.0 255.255.255.192 192.168.2.1
no ip http server
!
snmp-server community pnu_cat RO
!
control-plane
!
!
line con 0
line vty 0 4
 password cat123
 login
line vty 5 15
 no login
!
end

switch_Naratiwat#

Nov-17-07

การติดตั้ง Openwebmail บน Ubuntu 7.10

posted by อดิศร ขาวสังข์
  1. อ่านคำแนะนำการติดตั้งจาก Readme ของ Openwebmail ที่
    http://www.openwebmail.org/openwebmail/doc/readme.txt
  2. ดาวน์โหลดโปรแกรมที่จำเป็น (required) ในการติดตั้งต่อไปนี้ จาก
    http://www.openwebmail.org/openwebmail/download/packages/

    • CGI.pm-3.05.tar.gz            (required)
    • MIME-Base64-3.01.tar.gz       (required)
    • libnet-1.19.tar.gz            (required)
    • Digest-1.08.tar.gz            (required)
    • Digest-MD5-2.33.tar.gz        (required)
    • Text-Iconv-1.2.tar.gz         (required)
    • libiconv-1.9.1.tar.gz         (required if system doesn’t support iconv)
  3. ติดตั้งโปรแกรมในข้อ 2 ตามคำแนะนำในข้อ 1 หรือคำแนะนำที่มีมากับโปรแกรมเมื่อแตกไฟล์ออกแล้ว
  4. ดาวน์โหลดโปรแกรม OpenWebmail ล่าสุดได้จาก
    http://www.openwebmail.org/openwebmail/download/current/
  5. ติดตั้งโปรแกรม OpenWebmail ตามคำแนะนำใน readme ในข้อ 1 โดยใช้รูปแบบของ RedHat 7.x (or most Linux) ซึ่งจะเขียนว่า
    If you are using RedHat 7.x (or most Linux) with Apache
  6. คอนฟิก Openwebmail ในไฟล์ cgi-bin/openwebmail/etc/openwebmail.conf
  7. ตอนรันคำสั่ง openwebmail-tool.pl –init ถ้ามีปัญหา suidperl ให้ติดตั้งโปรแกรมด้วยคำสั่ง
    apt-get install libperl5.8 perl-suid
  8. ให้เปลียนตำแหน่ง cgi-bin จาก /usr/lib/cgi-bin/ เป็น /var/www/cgi-bin กล่าวคือ ในไฟล์คอนฟิกของ Apache ให้เปลี่ยนค่า
    ScriptAlias /cgi-bin/ /usr/lib/cgi-bin/ เป็น
    ScriptAlias /cgi-bin/ /var/www/cgi-bin/
Nov-17-07

การติดตั้ง cacti บน ubuntu 7.10

posted by อดิศร ขาวสังข์

มีขั้นตอนดังนี้

  1. Install Apache Web Server with PHP support in Ubuntu Server 
  2. Install Mysql Server with php Support
  3. (Install RRD Tool) 
    •  sudo apt-get install rrdtool
  4. Installing Cacti
    • sudo apt-get install cacti
  5. คอนฟิกผ่านเว็บที่ http://hostname/cacti
  6. เรียกใช้งานที่ http://hostname/cacti โดย user = admin , Password = admin
  7. เปลี่ยนรหัสผ่านตามคำแนะนำ