ใช้งานได้จริง ตามพี่เขาเลย
Author Archives: administrator
Cisco clear config – interface default
xxx-xxx(config)#default interface gigabitEthernetx/x
Cisco Examples Switch Configuration
Configure Port to VLAN Interface Settings on a Switch through the CLI
The image below displays an SG350X switch that is configured with the following VLANs:
Cisco VLAN Range
C
onfiguring a Range of VLAN Subinterfaces
Single Range Configuration Example
The following example configures the Fast Ethernet subinterfaces within the range 5/1.1 and 5/1.4 and applies the following VLAN IDs to those subinterfaces:
Fast Ethernet5/1.1 = VLAN ID 301 (vlan-id)
Fast Ethernet5/1.2 = VLAN ID 302 (vlan-id=301 + 2 – 1=302)
Fast Ethernet5/1.3 = VLAN ID 303 (vlan-id=301 + 3 – 1=303)
Fast Ethernet5/1.4 = VLAN ID 304 (vlan-id=301 + 4 – 1=304)
Router(config)# interface range fastethernet5/1.1 - fastethernet5/1.4
Router(config-if)# encapsulation dot1Q 301
Router(config-if)# no shutdown
Router(config-if)#
Configuring the Allowed VLANs for Trunking Ports
configure the allowed VLAN for a trunk port, perform this task:
This example shows how to add VLANs 15 to 20 to the list of allowed VLANs on the Ethernet 3/1 Ethernet trunk port:
Verifying Interface Configuration
To display access and trunk interface configuration information, perform one of these tasks:
Configuring the Native VLAN for 802.1Q Trunking Ports
If you do not configure this parameter, the trunk port uses the default VLAN as the native VLAN ID.
To configure native VLAN for a 802.1Q trunk port, perform this task:
This example shows how to set the native VLAN for Ethernet 3/1 Ethernet trunk port to VLAN 5:
Cisco Configuring Trunk Ports
onfigure a trunk port, perform this task:
This example shows how to set Ethernet 3/1 as an Ethernet trunk port:
Configuring a LAN Interface as an Ethernet Access Port vlan
Microsoft Word ทำซ้ำส่วนหัวของตารางบนหน้าถัดไป
เมื่อคุณทำงานกับตารางที่ยาวมากจะมีการเรียกใช้ในหลายหน้า คุณสามารถตั้งค่าตารางเพื่อให้แถวส่วนหัวของตารางปรากฏในแต่ละหน้าโดยอัตโนมัติ
คุณสามารถเลือกได้สองวิธีในการตั้งค่าตารางของคุณเพื่อให้แถวหัวกระดาษหรือแถวส่วนหัวทำซ้ำ
คุณสามารถทำสิ่งต่อไปนี้ได้:
- เลือกแถวส่วนหัวหรือแถวที่คุณต้องการทำซ้ำในแต่ละหน้า สิ่งที่เลือกต้องมีแถวแรกของตาราง
- ภายใต้ เครื่องมือตาราง บนแท็บ เค้าโครง ในกลุ่ม ข้อมูล ให้คลิก ทำซ้ำแถวส่วนหัว
หรือคุณสามารถใช้วิธีนี้: Continue reading
วิธีการทำ Redirect HTTP to HTTPS โดย .htaccess หรือ php
การเรียกใช้งานเว็บไซต์ทั่วไป จะเรียกผ่าน Protocal HTTP แต่เมื่อมีการติดตั้ง SSL สำหรับเว็บไซต์แล้ว ควรจะต้องทำการตั้งค่าการใช้งานให้บังคับใช้ SSL ซึ่งก็คือ บังคับให้ใช้งาน HTTPS นั่นเอง ดังนั้น หากลูกค้าไม่ได้ทำการ Redirect การเรียกใช้ Website ทั่วไป ก็จะชี้ไปที่ HTTP ที่เป็นค่าเริ่มต้น ไม่ใช่ HTTPS เพราะฉะนั้นทางทีมงาน SSL.in.th จึงแนะนำให้ทำ Redirect สำหรับ Website ของลูกค้าด้วยเช่นกัน เพื่อความปลอดภัย และเรียกใช้ SSL Certificate ทุกครั้งที่ถูกเรียกใช้งานโดยเราแนะนำอยู่ 2 วิธีต่อไปนี้ คือ ใช้ .htaccess และ php
PHP Code redirect
function redirectTohttps() { if($_SERVER['HTTPS']!=”on”) { $redirect= “https://”.$_SERVER['HTTP_HOST'].$_SERVER['REQUEST_URI']; header(“Location:$redirect”); } } ?>
.htaccess file code (หากไม่มีไฟล์ให้สร้างไฟล์ .htaccess ขึ้นมา)
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
หรือ บังคับ Redirect ให้มี www เท่านั้น
<IfModule mod_rewrite.c>
RewriteEngine On
# ensure redirect to https://www
RewriteCond %{HTTP_HOST} !^www\.
RewriteRule ^(.*)$ https://www.%{HTTP_HOST}/$1 [R=301,L]
RewriteCond %{HTTPS} off
RewriteRule (.*) https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
</IfModule>