CCNA learning: IP Address

IPv4 Address: 32 bits
IPv6 Address: 128 bits
Dotted demical: 192.168.0.1
1 octet = 1 byte = 8 bits
Catagory:
Class A: Network 8 bits(start with 0) Host 24 bits       --> 0 - 127.x.x.x 
Class B: Network 16 bits(start with 10) Host 16 bits    --> 128 - 191.x.x.x
Class C: Network 24 bits(start with 110) Host 8 bits    --> 192 - 223.x.x.x
Class D: start with 1110                                                 --> 224 - 239.x.x.x
Special IP address
127.0.0.1:             loopback address
255.255.255.255: broadcast address
0.0.0.0:                 any network
Host part is 1:     all host in this sub network, sub network broadcast
Such as 136.78.255.255 representate all the hosts in 136.78 sub network
Host part is 0:     sub network
Private IP Address( Intranet Use only)
Class A: 10.0.0.0 - 10.255.255.255
Class B: 172.16.0.0 - 172.31.255.255
Class C: 192.168.0.0 - 192.168.255.255
Calculate Host Address
Class A: 24 host address --> 2^24 -2 = 16777214
              8 network address --> 2^8 -2 = 254
Class B: 16 host address --> 2^16 -2(x.x.0.0/x.x.255.255) = 65534
              16 network address --> 2^16 -2 = 65534
Class C: 8 host address --> 2^8 -2 = 254
              24 network address --> 2 ^24 -2 = 16777214
Subnet Mask
32 bits
Class A: 255.0.0.0         --> /8
Class B: 255.255.0.0     --> /16
Class C: 255.255.255.0 --> /24
1:网络位
0:主机位
Subneting
without subneting, the broadcast signal will reach every host.
with subnet, the broadcast signal will be blocked by router
Use host part to make sub network
Example:
Class C
IP ADDRESS: 192.168.10.0  Subnet Mask: 255.255.255.192(/26)
Subnet number: 2^2 -2 =2
Host number: 2^6 -2 = 62
Subnet: 192.168.10.64 / 192.168.10.128 (256 - 192 = 64)
Subnet broadcast: 192.168.10.127 / 192.168.10.191
Subnet IP:
192.168.10.65 - 192.168.10.126
192.168.10.129 - 192.168.10.190
Class B
IP Address: 172.16.0.0 Subnet Mask: 255.255.192.0(/18)
Subnet number: 2^2-2 = 2
Host number: 2^14 -2 = 16382
Subnet: (256 - 192=64) 172.16.64.0/172.16.128.0
Subnet broadcast: 172.16.127.255/172.16.191.255
Subnet IP:
172.16.64.1 - 172.16.127.254
172.16.128.1 - 172.16.191.254
Class B
IP Address: 172.16.0.0 Subnet Mask: 255.255.255.224(/27)
Subnet number: 2^11-2=2046
Host number: 2^5 -2 = 30
Subnet:(256-224=32) 172.16.0.32......172.16.255.192
Subnet broadcast: 172.16.0.63.......172.16.255.223
Subnet IP:
172.16.0.33 - 172.16.0.62
.....
172.16.255.193 - 172.16.255.222
VLSM: Variable-length subnet masks
According to the number of host, the subnet mask be provided
Save IP address. Need the router support (RIPv2, OSPF, EIGRP BGP)
Example:
192.168.1.64 - 192.168.1.79
Subnet Mask: /28
Example:
199.188.19.0/27
Host number: 2^5-2=30
Example:
Corporation: 172.16.0.0/16
Division A: 172.16.12.0/22
Division A has A B C D four parts
Range of address: 172.16.12.0 - 172.16.15.255
D parts: request 2 vlan, each vlan for 200 customers
A,B,C parts: connect to 3 ethernet, each need 24 port switcher
Part D:
200 --> 2^8 -2 = 254 --> Subnet Mask: /24
172.16.12.0/24
172.16.13.0/24
Left: 172.16.14.0/24 172.16.15.0/24
Part A, B, C
24 --> 2^5 -2 = 30 --> Subnet Mask: /27
Part A: 172.16.14.0/27
Part B: 172.16.14.32/27
Part C: 172.16.14.64/27
Left: 172.16.14.96/27 172.16.14.128/27 172.16.14.160/27 172.16.14.192/27 172.16.14.224/27 172.16.15.0/24
Router
2 --> 2^2 -2 =2 --> Subnet Mask: /30
Router A and Router D: 172.16.14.224 /30
Router B and Router D: 172.16.14.228 /30
Router C and Router D: 172.16.14.232 /30
CIDR(Classless Inter Domain Route)
Define Subnet Mask same network as a block
199.0.0.0/8 --> Superneting
save network items, decrease the router table
Example:
Route D connect four subnet:
1. 192.16.12.0/24
2. 192.16.13.0/24
3. 192.16.14.0/24
4. 192.16.15.0/24
Routing table for D:
192.16.12.0/24
192.16.13.0/24
192.16.14.0/24
192.16.15.0/24
Route E connect to Route D
Routing table for E:

192.16.12.0/22

Comments

Popular posts from this blog

Nginx Proxy & Load Balance & LNMP

Snort+barnyard2+Snorby CentOS 6.5_64 Installation

ORACLE Error