Khác biệt giữa bản sửa đổi của “Cố Viêm Võ”

Nội dung được xóa Nội dung được thêm vào
Không có tóm lược sửa đổi
Thay cả nội dung bằng “{| border="1" | || Units Of 100 || Units Of 10 || Units Of 1 |- || || || | The decimal “15” || 0 || 1 || 5 |- || || || | The dec…”
Dòng 1:
{| border="1"
This is a very good question. If you like to memorize the table instead of working the problem out to get the answer then just look at the /21 (table). If you want to understand the concept how to solve the problem mathematically then convert the 3rd octet/byte to binary and see how many bits you are borrowing to make 21 bits. Doing this will give you the insight how IP address works.
| || Units Of 100 || Units Of 10 || Units Of 1
|- || || ||
From there you can calculate the hosts per subnet and add them up.
| The decimal “15” || 0 || 1 || 5
|- || || ||
/21 means 8 class c's equivalency. 8x256=2048 hosts or ip addreses.
| The decimal “289” || 2 || 8 || 9
|}
There are 32 bits total for IPv4.
This 32 bits splitted/divided into 4 octets/bytes and each octet equals 8 bits.
Each octe/byte can be written in decimal format so we can read. It can be set from zero to 255.
So, we can use the following formula to calculate the number of subnets and hosts:
128 64 32 16 8 4 2 1 --decimal and can sum up to 255
0 0 0 0 0 1 1 1
Take 24 bits-toal of 3 octets and subtract 3 bits. This will give you the /21.
To calculate out how many subnets within this /21, you should use 2^n=2^3=8 subnets.
To find out the number of IP addresses from these subnets: 8 subnets x 256 =2048 addresses.
 
Just to remind all that this Saturday we will discuss about ACL and wild card mask.
Zero's-mean "Do Care"
One's mean "Don't Care"
Look at Decimal:
1 means two<p>
3 means four<p>
7 means eight<p>
15 means sixteen<p>
31 means 32<p>
63 means 64<p>
127 means 128<p>
example:
router ospf 1 (how to enable ospf in global configuration mode)
network 192.168.0.0 0.0.255.255 area 0
This meant that the first two octets must match. The last two bytes are don't care.
example 2:
router eigrp 100
network 172.16.254.1 0.0.0.0
This meant only one address/host is matched.
example 3:
router ospf 2
network 172.27.3.0 0.0.0.255 area 100
This meant the first three octets must match. The last byte is don't care.
example 4:
router ospf 1
network 192.168.0.0 0.0.3.255 area 100
This meant that the first 3 octets must match. The 3rd octet is only matched from 0 to 3. Everything else beside 0-3 is don't care. The last octet is don't care.
For ACL:
example:
Access-list 100 permit TCP host 172.16.1.1 host 192.168.3.2 eq 23
This meant Extended access-list because it filters based on source, destination, protocol, and port number.
You can use access-list 100 permit TCP 172.16.1.1 0.0.0.0 192.168.3.2 0.0.0.0 eq 23. For this sample evrything must match. Instead of using the word host you can specify it with 0.0.0.0.
example 2:
Access-list 102 permit udp 204.59.4.0 0.0.3.255 202.4.7.0 0.0.0.255 eq 53