- ປິດ VM
- ເລືອກເອົາ VM ແລະ Edit Settings
- ເລືອກ hard disk
- ຢູຝາກເບື້ອງຂວາເລືອກເອົາ provisioned size ຕາມທີ່ເຮົາຕ້ອງການ
- Click OK
- ເປີດ VM
- ເຂົ້າ command line Linux VM
- Log in as root
- lists ເບິ່ງຂໍ້ມູນຂອງ disk partitions ພິມ fdisk -l
- ແລ້ວຈະເຫັນມັນຂຶ້ນໂຊເນື້ອທີ່ໃຫມ່ທີ່ເຮົາແອດມາ /dev/sda : xxGB.
- ໃຊ້ຄຳສັ່ງ fdisk /dev/sda. (ຕົວຢ່າງຫາກແມ່ນ /dev/sda ຕາມທາງເທິງ )
- ພິມ p ເພື່ຶອປິ້ນ partition table
- ພິມ n ເພື່ອແອດ partition ໃຫມ່
- ພິມ p ເພື່ຶອເຮັດໃຫ້ເປັນ primary partition
- ຮອດຕອນນີ້ມັນຈະບອກໃຫ້ເລືອກເອົາ first cylinder ປະມານວ່າຕໍ່ຈາກນ້ຳເບີສຸດທ້າຍຂອງ last partition (ex: /dev/sda3 ສຸດຢູ່ທີ່ 1000). ແລ້ວເຮົາເລືອກເອົາ 1001 ສຳຫລັບ first cylinder, fdisk ລຸ້ນໃຫມ່ໆອາດລີສອອກມາໃຫ້ເລີຍບໍ່ຕ້ອງພິມເອງ
- ຖ້າຫາກເຮົາຕ້ອງເອົາທັງຫມົດເພື້ອນທີ່ ທີ່ເຮົາ allocated, ໃຫ້ເລືອກເອົາ default value ສຳຫລັບ last cylinder.
- ພິມ w ເພື່ອ save
- Restart VM
- Log back in as root
- ພິມ fdisk -l. ເຮົາຈະເຫັນມັນຂຶ້ນມາເປັນ sda4.
- ເຮົາຕ້ອງ initialize partition ໃຫມ່ນີ້ໃຫ້ເປັນ physical volume ເຮົາສາມາດຈັດການໃຫມ່ໄດ້ໃນພາຍຫລັງໂດຍໃຊ້ Logical Volume Manager (LVM).
- ຖ້າເຮົາຕ້ອງການແອດ physical volume ໄປໃສ່ volume group ປະຈຸບັນ ໂດຍໃຊ້ vgextend command. ທຳອິດໃຫ້ພິມ df -h ເພື່ອຫາຊື່ຂອງ volume group. ຕົວຢ່າງຊື່ vg_root. ໃຫ້ພິມ vgextend [volume group] /dev/sdaX. (ex: vgextend vg_root /dev/sda4)
- ເພື່ອຫາພື້ນທີ່ທັງຫມົດຂອງ free space ທີ່ສາມາດນຳໃຊ້ໄດ້ຂອງ physical volume ໃຫ້ພິມ vgdisplay [volume group]
- ຂະຫຍາຍ logical volume ໂດຍໃຊ້ພື້ນທີ່ທີ່ນຳໃຊ້ໄດ້ທີ່ຖືກໂຊຂຶ້ນໃນຄຳສັ່ງກ່ອນຫນ້ານີ້ໂດຍການພິມຄຳສັ່ງ lvextend -L+[freespace]G /dev/volgroup/volume. (ex: lvextend -L+200G /dev/vg_root/lv_root) (redhat ຫລື Centos ລຸ້ນໃຫມ່ໆ ອາດພິມເປັນ lvextend -l +100%FREE /dev/vg_root/lv_root)
- ຂັ້ນຕອນສຸດທ້າຍແມ່ນເຮົາສາມາດຂະຫຍາຍ ext3 file system ໃນ logical volume ໂດຍໃຊ້ command resize2fs /dev/volgroup/volume (ex: resize2fs /dev/vg_root/lv_root). ຫລືໃຊ້ຄຳສັ່ງ xfs_growfs /dev/vg_root/lv_root ກໍໄດ້
- ລອງ df ເບິ່ງເພື່ອ verify ວ່າເຮົາໄດ້ພື້ນທີ່ເພີ່ມຂຶ້ນ df -h
Monday, September 10, 2018
ການເພີ່ມພື້ນທີ່ໃຊ້ງານຂອງ Harddisk ໃນ VM ສຳຫລັບ Linux host.
Monday, June 18, 2018
ກວດເບິ່ງ IP ໃຊ້ Port ໃດຢູ່ ຂອງ Lan Switch Cisco
ກວດເບິ້ງ arp ກ່ອນ
LANSW_Phonethanh#sh mac address-table
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
All 0100.0ccc.cccc STATIC CPU
All 0100.0ccc.cccd STATIC CPU
All 0180.c200.000d STATIC CPU
All 0180.c200.000e STATIC CPU
All 0180.c200.000f STATIC CPU
All 0180.c200.0010 STATIC CPU
All ffff.ffff.ffff STATIC CPU
1 0000.85bb.afb4 DYNAMIC Gi1/0/2
1 0009.0f09.000c DYNAMIC Te1/1/3
1 000c.2944.8411 DYNAMIC Te1/1/3
1 0010.6033.5f86 DYNAMIC Gi1/0/27
1 0011.325a.3867 DYNAMIC Gi1/0/1
1 0014.a9c0.0940 DYNAMIC Gi1/0/47
1 0014.a9c0.0941 DYNAMIC Gi1/0/47
1 0027.225e.db22 DYNAMIC Gi1/0/47
LANSW_Phonethanh#sh mac address-table | i Gi1/0/47
1 0014.a9c0.0940 DYNAMIC Gi1/0/47
1 0014.a9c0.0941 DYNAMIC Gi1/0/47
1 0027.225e.db22 DYNAMIC Gi1/0/47
1 0027.2270.8f41 DYNAMIC Gi1/0/47
1 0027.22fa.f11a DYNAMIC Gi1/0/47
1 0027.22fa.f6ac DYNAMIC Gi1/0/47
1 484b.aa08.4be7 DYNAMIC Gi1/0/47
LANSW_Phonethanh#sh mac address-table
Mac Address Table
-------------------------------------------
Vlan Mac Address Type Ports
---- ----------- -------- -----
All 0100.0ccc.cccc STATIC CPU
All 0100.0ccc.cccd STATIC CPU
All 0180.c200.000d STATIC CPU
All 0180.c200.000e STATIC CPU
All 0180.c200.000f STATIC CPU
All 0180.c200.0010 STATIC CPU
All ffff.ffff.ffff STATIC CPU
1 0000.85bb.afb4 DYNAMIC Gi1/0/2
1 0009.0f09.000c DYNAMIC Te1/1/3
1 000c.2944.8411 DYNAMIC Te1/1/3
1 0010.6033.5f86 DYNAMIC Gi1/0/27
1 0011.325a.3867 DYNAMIC Gi1/0/1
1 0014.a9c0.0940 DYNAMIC Gi1/0/47
1 0014.a9c0.0941 DYNAMIC Gi1/0/47
1 0027.225e.db22 DYNAMIC Gi1/0/47
LANSW_Phonethanh#sh mac address-table | i Gi1/0/47
1 0014.a9c0.0940 DYNAMIC Gi1/0/47
1 0014.a9c0.0941 DYNAMIC Gi1/0/47
1 0027.225e.db22 DYNAMIC Gi1/0/47
1 0027.2270.8f41 DYNAMIC Gi1/0/47
1 0027.22fa.f11a DYNAMIC Gi1/0/47
1 0027.22fa.f6ac DYNAMIC Gi1/0/47
1 484b.aa08.4be7 DYNAMIC Gi1/0/47
Monday, March 26, 2018
Add static route ໃນ Cent OS
ປົກກະຕິໃນ Cent OS ເຮົາສາມາດ ແອດສະເຕຕິກ ຣູດ ໄດ້ໂດຍການໃຊ້ຄຳສັ່ງ
ip route add 10.5.1.0/28 via 172.23.1.1 dev em3
ແຕ່ວ່າມັນຊິບໍ່ຢູ່ໄດ້ຖາວອນຖ້າເຮົາ ເກີດມີການ restart network device static routing ທີ່ເຮັດຄ້າງໄວ້ກໍ່ຈະຫາຍໄປເຮົາສາມາດແອດມັນໃຫ້ຢູ່ໄດ້ແບບຖາວອນດ້ວຍການໄປເພີ່ມຟາຍໃນ
/etc/sysconfig/network-scripts/route-em3
ແລ້ວແອດແຖວລຸ່ມນີ້ເຂົ້າໄປ
10.5.1.0/28 via 172.23.1.1 dev em3
ລອງ restart ເຊີເວີ້ເບິ່ງກະໄດ້ ແຕ່ຄືຊິບໍ່ຈຳເປັນຕີ້ :p
Wednesday, March 21, 2018
ເພີ່ມ user ໃນ Cent OS
login ເຂົ້າໃນເຄື່ອງທີ່ຕ້ອງການແອດດ້ວຍສິດ root
# adduser username
ຕັ້ງລະຫັດຜ່ານ
# passwd username
ຈະຟ້ອງຂຶ້ນມາໃຫ້ໃສ່ລະຫັດ ໃສ່ໃຫ້ຄືກັນທັງສອງເທື່ອ
Changing password for user username.
New password:
Retype new password:
passwd: all authentication tokens updated successfully.
ແອດໃສ່ໃນກຸ່ມ wheel, ຄ່າເລີ່ມຕົ້ນໃນ CentOS, ສະມາຊິກທີ່ຢູ່ໃນ wheel group ຈະມີ sudo privileges.
usermod -aG wheel username
ທົດລອງດ້ວຍການລອງລ໋ອກອິນຜ່ານ ຍູສເຊີ້ ທີ່ສ້າງຂື້ນໃຫມ່
su - username
ຫລັງຈາກນັ້ນກໍ່ລອງຄຳສັ່ງປະເພດທີ່ຕ້ອງການສິດ root
[root@Prime01 ~]# su - smsc
[smsc@Prime01 ~]$ ls /root
ls: cannot open directory /root: Permission denied
[smsc@Prime01 ~]$ sudo ls /root
We trust you have received the usual lecture from the local System
Administrator. It usually boils down to these three things:
#1) Respect the privacy of others.
#2) Think before you type.
#3) With great power comes great responsibility.
[sudo] password for smsc:
anaconda-ks.cfg
[smsc@Prime01 ~]$ exit
logout
ຕັ້ງ username ໃຫ້ອຸປະກອນ Cisco
Switch> enable
Switch# configure terminal
Switch(config)# enable password example102
ຫລື
Switch(config)# enable secret level 1 password zaq1xsw23edcvfr4
Switch(config)# service password-encryption
Switch(config)# end
Switch# copy running-config startup-config
ປິດບໍໃຫ້ສາມາດກູ້ຄືນລະຫັດໄດ້
Switch(config)# system disable password recovery switch all
ພື້ນຖານການເປີດ/ປິດ telnet ແລະ ເປີດ SSH ໃຫ້ອຸປະກອນ Cisco
ເປີດ telnet
router#conf t
router(config)#line vty 0 4
router(config-line)#
router(config-line)#password
router(config-line)#login
router(config-line)#end
router#
ເປີດ SSH
Switch> enable
Switch# configure terminal
Switch(config)# hostname your_hostname
Switch(config)# ip domain-name your_domain
Switch(config)# crypto key generate rsa
Switch(config)# ip ssh version 1
Switch(config)# ip ssh timeout 90 authentication-retries 2
Switch(config)# aaa new-model
Switch(config)# aaa authentication login default local
Switch(config)# aaa authorization exec local
Switch(config)# aaa authorization network local
Switch(config)# username your_user_name privilege 15 password 7 hehehehehhe
Switch(config)# end
Switch# wr
ປີດ telnet
RT01# conf t
RT01(config)#line vty 0 4
RT01(config-line)#transport input ssh
RT01(config-line)#exit
RT01(config)#end
router#conf t
router(config)#line vty 0 4
router(config-line)#
router(config-line)#password
router(config-line)#login
router(config-line)#end
router#
ເປີດ SSH
Switch> enable
Switch# configure terminal
Switch(config)# hostname your_hostname
Switch(config)# ip domain-name your_domain
Switch(config)# crypto key generate rsa
Switch(config)# ip ssh version 1
Switch(config)# ip ssh timeout 90 authentication-retries 2
Switch(config)# aaa new-model
Switch(config)# aaa authentication login default local
Switch(config)# aaa authorization exec local
Switch(config)# aaa authorization network local
Switch(config)# username your_user_name privilege 15 password 7 hehehehehhe
Switch(config)# end
Switch# wr
ປີດ telnet
RT01# conf t
RT01(config)#line vty 0 4
RT01(config-line)#transport input ssh
RT01(config-line)#exit
RT01(config)#end
Tuesday, March 20, 2018
ຕັ້ງຄ່າ Management IP ໃຫ້ກັບ Router Cisco ASR 1001
ໃນບັນດາ Router ລຸ້ນໃຫມ່ຂອງ Cisco ໄດ້ມີການເພີ່ມຄວາມປອດໄພເພິ່ມເຕີມມາໃຫ້ management port ຄືແຍກອອກມາຈາກ traffic ຂອງ global config ເຮັດໃຫ້ຕອງໄດ້ອານຸຍາດ routing ແລະ interface policy ຕ່າງຫາກ
ASR 1001:
ASR 1001:
Router#config t
Router(config)#interface gigabitethernet0
Router(config-if)#ip address A.B.C.D A.B.C.D
ip route vrf Mgmt-intf 0.0.0.0 0.0.0.0 1.1.1.1 (destination IP)
ຫລັງຈາກນັ້ນແມ່ນເຊື່ອມຕໍ່ ສາຍເນັກເວີກເຂົ້າຫາ switch ຜ່ານ vlan ຫລື ໄອພີວົງດຽວກັນ.
Monday, March 12, 2018
ທຳຄວາມເຂົ້າໃຈກັບ ການໃຊ້ prefix list ໃນ Cisco router
ຄຳສັ່ງ prefix list ກໍຄືກັນກັບ access list ທີ່ໃຊ້ສຳຫລັບເລືອກປະກາດ route (prefixes) ຫລືການກັ່ນຕອງ route ຈຸດເດັ່ນຂອງ prefix list ທີ່ເຫນືອກ່ວາ access list ຄືມັນມີຄວາມຍືດຍຸ່ນໃນການກຳຫນົດຄ່າ ip ແລະ network ຕ່າງໆ ລວມເຖິງຂຽນຄຳສັ່ງໄດ້ສັ້ນກ່ວາ ແຕ່ເຮົາກໍຕ້ອງໄດ້ມາທຳຄວາມເຂົ້າໃຈໃນເລື່ອງ syntax ແລະ options ຕ່າງໆ ເພີ່ມເຂົ້າມາຕື່ມ
ການເອົາ prefix list ແລະ access list ໄປໃຊ້ວຽກຕ່າງໆມີຫລາກຫລາຍກັນໄປຕາມຫນ້າງານເຊັ່ນ
- redistribute route ລະຫວ່າງ routing protocol ຕ່າງໆ
- route advertisements : ໃຊ້ route-map ເພື່ອປະກາດ route ແລະ filter route ໄປຫາ bgp neighbors ຕ່າງໆ
ຂັ້ນຕອນພື້ນຖານໃນການ match route
- ສ້າງລາຍການ ip prefix-list
- ສ້າງເງື່ອນໄຂ route-map ໂດຍອ້າງອີງຈາກ prefix list
- ເອົາ route-map ທີ່ສ້າງຂື້ນໄປ apply ໃຊ້ເພື່ອ control routing ຫລື filter route ຕາມຕ້ອງການ
ຄຳສັ່ງລາຍລະອຽດ syntax ຂອງ prefix list
ຂຽນໃນໂຫມດ Global Configuration
ip prefix-list name [ seq number ] { permit | deny } prefix [ eq length | [ ge length ] [ le length ]]
name – ຊື່ຂອງ IP prefix list ເປັນ alphanumeric string ໄດ້ສູງສຸດ 63 characters.
seq number – (Optional) ລຳດັບ order ຂອງລາຍການໃນ prefix list name ດ້ານເທິງເປັນຄ່າໂຕເລກລະຫວ່າງ 1 ຫາ 4294967294.
permit – ອາຍຸຍາດ routes ຫລື ip packets ທີ່ກົງກັບ prefix ດ້ານລຸ່ມ
deny – ບໍ່ອານຸຍາດ routes ຫລື ip packets ທີ່ກົງກັບ prefix ດ້ານລຸ່ມ
deny – ບໍ່ອານຸຍາດ routes ຫລື ip packets ທີ່ກົງກັບ prefix ດ້ານລຸ່ມ
prefix – IP prefix ຮູບແບບຂອງ A.B.C.D/length
eq length – (Optional) ລະບຸຈຳນວນຂອງ prefix length ທີ່ຕ້ອງການ match ເປັນຄ່າຕົວເລກລະຫວ່າງ 1 ຫາ 32
ge length – (Optional) ລະບຸຈຳນວນຂອງ prefix length ທີ່ຕ້ອງການ match ເປັນຄ່າຕົວເລກລະຫວ່າງ 1 ຫາ 32
le length – (Optional) ລະບຸຈຳນວນຂອງ prefix length ທີ່ຕ້ອງການ match ເປັນຄ່າຕົວເລກລະຫວ່າງ 1 ຫາ 32
ge length – (Optional) ລະບຸຈຳນວນຂອງ prefix length ທີ່ຕ້ອງການ match ເປັນຄ່າຕົວເລກລະຫວ່າງ 1 ຫາ 32
le length – (Optional) ລະບຸຈຳນວນຂອງ prefix length ທີ່ຕ້ອງການ match ເປັນຄ່າຕົວເລກລະຫວ່າງ 1 ຫາ 32
ກໍລະນີທີ່ບໍ່ມີຫຍັງໃນ prefix-list match ເລີຍມັນຈະເປັນ implicit deny ຫລືອະທິບາຍງ່າຍໆຄືມັນຈະ deny ຫມົດນັ້ນເອງ
Related Commands ກ່ຽວກັບ prefix list
- clear ip prefix-list ສຳຫລັບ Clears counters ຂອງ prefix list
- prefix-list ໄວ້ສຳຫລັບ applies a prefix list ໃນ BGP peer.
- show ip prefix-list ເບິ່ງຂໍ້ມູນກ່ຽວກັບ ip prefix list ທີ່ປະກາດເອົາໄວ້ທີ່ Global Configuration
ປຽບທຽບການເຮັດ access list ແລະ prefix list ຕອນເອົາໄປໃຊ້
deny ip host 10.0.0.0 host 255.255.255.0
permit ip any any
!
route-map OSPF-to-BGP permit 10
match ip address OSPF_Redist
ip prefix-list OSPF_Redist seq 5 deny 10.0.0.0/24
ip prefix-list OSPF_Redist seq 10 permit 0.0.0.0/0 le 32
!
route-map OSPF-to-BGP permit 10
match ip address prefix-list OSPF_Redist
ຈາກຄຳສັ່ງ extended access-list ດ້ານເທິງ ພົບວ່າ
- deny ip host 10.0.0.0 host 255.255.255.0 ຂຽນໃນຮູບແບບ prefix-list ເປັນ deny 10.0.0.0/24
- permit ip any any ຂຽນໃນຮູບແບບ prefix-list ເປັນ permit 0.0.0.0/0 le 32
ຕົວະຢ່າງການໃຊ້ Extended ACLs ສຳຫລັບ BGP Filtering
The source portion of the extended ACL is used to match the network portion of the BGP route
and the destination portion of the ACL is used to match the subnet mask of the BGP route.
and the destination portion of the ACL is used to match the subnet mask of the BGP route.
ດ້ານລຸ່ມນີ້ຄືຄຳອະທິບາຍຕົວຢ່າງການໃຊ້ extended ACL
access-list 100 permit ip 10.0.0.0 0.0.0.0 255.255.0.0 0.0.0.0
Matches 10.0.0.0/16 – Only
Matches 10.0.0.0/16 – Only
access-list 100 permit ip 10.0.0.0 0.0.0.0 255.255.255.0 0.0.0.0
Matches 10.0.0.0/24 – Only
Matches 10.0.0.0/24 – Only
access-list 100 permit ip 10.1.1.0 0.0.0.0 255.255.255.0 0.0.0.0
Matches 10.1.1.0/24 – Only
Matches 10.1.1.0/24 – Only
access-list 100 permit ip 10.0.0.0 0.0.255.0 255.255.255.0 0.0.0.0
Matches 10.0.X.0/24 – Any number in the 3rd octet of the network with a /24 subnet mask.
Matches 10.0.X.0/24 – Any number in the 3rd octet of the network with a /24 subnet mask.
access-list 100 permit ip 10.0.0.0 0.255.255.0 255.255.255.0 0.0.0.0
Matches 10.X.X.0/24 – Any number in the 2nd & 3rd octet of the network with a /24 subnet mask.
Matches 10.X.X.0/24 – Any number in the 2nd & 3rd octet of the network with a /24 subnet mask.
access-list 100 permit ip 10.0.0.0 0.255.255.255 255.255.255.240 0.0.0.0
Matches 10.X.X.X/28 – Any number in the 2nd, 3rd & 4th octet of the network with a /28 subnet mask.
Matches 10.X.X.X/28 – Any number in the 2nd, 3rd & 4th octet of the network with a /28 subnet mask.
access-list 100 permit ip 10.0.0.0 0.255.255.255 255.255.255.0 0.0.0.255
Matches 10.X.X.X/24 to 10.X.X.X/32 – Any number in the 2nd, 3rd & 4th octet of the network with a /24 to /32 subnet mask.
Matches 10.X.X.X/24 to 10.X.X.X/32 – Any number in the 2nd, 3rd & 4th octet of the network with a /24 to /32 subnet mask.
access-list 100 permit ip 10.0.0.0 0.255.255.255 255.255.255.128 0.0.0.127
Matches 10.X.X.X/25 to 10.X.X.X/32 – Any number in the 2nd, 3rd & 4th octet of the network with a /25 to /32 subnet mask
Matches 10.X.X.X/25 to 10.X.X.X/32 – Any number in the 2nd, 3rd & 4th octet of the network with a /25 to /32 subnet mask
ເຮົາມາເບິ່ງ Class A, B, C ວ່າສະມາດຂຽນໃນຮູບແບບ prefix list ໄດ້ແບບໃດ?
ມາໄລ່ເບິ່ງລຳດັບ Octet ຂອງ ipv4 32 bit ໂດຍແບ່ງເປັນ 4 ຊຸດ ຊຸດລະ 8 bit ແລ້ວຄັ້ນດ້ວຍຈຸດຈະໄດ້ດັ່ງນີ້
Class Octet#1 Octet#2 Octet#3 Octet#4 Subnet Mask
Class A 0xxxxxxxx Host Host Host 255.0.0.0
Class B 10xxxxxxx Network Host Host 255.255.0.0
Class C 110xxxxx Network Network Host 255.255.255.0
Class A 0xxxxxxxx Host Host Host 255.0.0.0
Class B 10xxxxxxx Network Host Host 255.255.0.0
Class C 110xxxxx Network Network Host 255.255.255.0
ມີຄ່າເປັນເລກຖານສິບ ຫາກເບິ່ງເປັນເລກຖານສິບຈະໄດ້ IP address ທີ່ມີ octet ທຳອິດ
Class A – 1 ຫາ 126 (ຖານສອງ 00000001 – 01111111)
Class B – 128 ຫາ 191 (ຖານສອງ 10000001 – 10111111)
Class C – 192 ຫາ 223 (ຖານສອງ 11000001 – 11011111)
Class B – 128 ຫາ 191 (ຖານສອງ 10000001 – 10111111)
Class C – 192 ຫາ 223 (ຖານສອງ 11000001 – 11011111)
ຂຽນເປັນ classful subnet ໄດ້ດັ່ງນີ້
ip prefix-list CLASS_A permit 0.0.0.0/1 ge 8 le 8
ip prefix-list CLASS_B permit 128.0.0.0/2 ge 16 le 16
ip prefix-list CLASS_C permit 192.0.0.0/3 ge 24 le 24
default route ຂຽນໄດ້ເປັນ 0.0.0.0/0
any routes ( ທຸກໆ route) ຂຽນໄດ້ເປັນ 0.0.0.0/0 le 32 ຄືກວດ 0 bits ເຊິ່ງແປວ່າບໍ່ກວດຫຍັງເລີຍ subnet mark ເປັນໄດ້ຕັ້ງແຕ່ 32 bits ຫລືນ້ອຍກ່ວາໄລ່ໄປ /31 /30 /29 …
ອະທິບາຍການໃຊ້ le ແລະ ge ຂອງ prefix-list ເພີ່ມເຕີມ
A.B.C.D/LEN ge GE le LE – ເມື່ອໃຊ້ le ຫລື ge ກໍມີເງື່ອນໄຂທີ່ວ່າ LEN < GE <= LE
ຕົວຢ່າງ
1) ip prefix-list example-1 seq 10 permit 172.16.0.0/16 ge 24 le 26
– ຈາກຄຳສັ່ງດ້ານເທິງກວດ bit ຂອງ network /16 ວ່າ match ຫລືບໍ່ ?
– ຈາກນັ້ນໄປເບິ່ງ subnet mask ວ່າຢູ່ລະຫວ່າງ 24 ຫາ 26 ຫລືບໍ່ ?
– ຈາກນັ້ນໄປເບິ່ງ subnet mask ວ່າຢູ່ລະຫວ່າງ 24 ຫາ 26 ຫລືບໍ່ ?
ຄຳອະທິບາຍ
– ເປັນ class B network 172.16.0.0 (172.16.0.0/16) ທີ່ permit ສະເພາະ subnets with a /24, /25 ຫລື /26 mask (ge 24 le 26)
– ສ່ວນ network 172.16.0.0/16 ບໍ່ match ເພາະວ່າບໍ່ໄດ້ມີ mask ເປັນ /24, /25 ຫລື /26.
– ເປັນ class B network 172.16.0.0 (172.16.0.0/16) ທີ່ permit ສະເພາະ subnets with a /24, /25 ຫລື /26 mask (ge 24 le 26)
– ສ່ວນ network 172.16.0.0/16 ບໍ່ match ເພາະວ່າບໍ່ໄດ້ມີ mask ເປັນ /24, /25 ຫລື /26.
2) ip prefix-list example-1 seq 10 permit 10.10.10.0/24 ge 28
– ຫາກຄຳສັ່ງມີລະບຸສະເພາະ ge (ບໍ່ມີການລະບຸ le) ຫມາຍເຖິງຫລາຍກ່ວາຫລືເທົ່າກັບຈົນຮອດ /32
– ໃນກໍລະນີທີ່ທຸກ subnet within the 10.10.10.0/24 ທີ່ມີ subnet mask (/28 ถึง /32) ລະຫວ່າງ 255.255.255.240 ຫາ 255.255.255.255
– ສ່ວນ 10.10.10.0/24 ບໍ່ match ເພາະບໍ່ໄດ້ມີ mask ເປັນ /28
– ໃນກໍລະນີທີ່ທຸກ subnet within the 10.10.10.0/24 ທີ່ມີ subnet mask (/28 ถึง /32) ລະຫວ່າງ 255.255.255.240 ຫາ 255.255.255.255
– ສ່ວນ 10.10.10.0/24 ບໍ່ match ເພາະບໍ່ໄດ້ມີ mask ເປັນ /28
3) ip prefix-list example-1 seq 10 permit 10.10.10.0/24 le 28
– ຫາກຄຳສັ່ງມີລະບຸສະເພາະ le (ບໍ່ມີການລະບຸ ge) ຫມາຍວ່າຫນ້ອຍກ່ວາຫລືເທົ່າກັບ ຈົນຮອດ /len ຫລື /24 ໃນກໍລະນີຄຳສັ່ງດ້ານເທິງ
– ໃນກໍລະນີຄືທຸກ subnet within the 10.10.10.0/24 ທີ່ມີ subnet mask (/24 ถึง /28) ລະຫວ່າງ 255.255.255.0 ຫາ 255.255.255.240
– ສ່ວນ 10.10.10.0/24 match ນຳ
– ໃນກໍລະນີຄືທຸກ subnet within the 10.10.10.0/24 ທີ່ມີ subnet mask (/24 ถึง /28) ລະຫວ່າງ 255.255.255.0 ຫາ 255.255.255.240
– ສ່ວນ 10.10.10.0/24 match ນຳ
4) ກໍລະນີຕ້ອງການລວມ network 172.16.8.x/28 5 networks ຄວນຂຽນ prefix list ແບບໃດ ?
172.16.8.0/28
172.16.8.16/28
172.16.8.32/28
172.16.8.48/28
172.16.8.64/28
172.16.8.16/28
172.16.8.32/28
172.16.8.48/28
172.16.8.64/28
ແບ່ງ octet ທີ່ 4 ມາເບິ່ງ
0 — 0 0 0 0 0 0 0 0
16 – 0 0 0 1 0 0 0 0
32 – 0 0 1 0 0 0 0 0
48 – 0 0 1 1 0 0 0 0
64 – 0 1 0 0 0 0 0 0
16 – 0 0 0 1 0 0 0 0
32 – 0 0 1 0 0 0 0 0
48 – 0 0 1 1 0 0 0 0
64 – 0 1 0 0 0 0 0 0
ຈະໄດ້ 172.16.8.0/25 ge 28 le 28
ທີ່ເປັນ /25 ເພາະບິດທີ່ 25 ຍັງຄືກັນ (172.16.8 ອັນນີ້ຄື 24 ບິດທີ່ຄືກັນ)
ທີ່ເປັນ /25 ເພາະບິດທີ່ 25 ຍັງຄືກັນ (172.16.8 ອັນນີ້ຄື 24 ບິດທີ່ຄືກັນ)
ອ້າງອີງຈາກ
Subscribe to:
Comments (Atom)