csnotes/cst311/lec/lec14.md
2018-10-18 14:29:10 -07:00

43 lines
1.0 KiB
Markdown

# lec14
IP Address: 32 bit identifier for a host, router interface
The interface is that part of a router that connect between a host router and the physical link.
## Global Addresses
3 Types of Formats for the addresses
Type A:
|1-bit | 7-bits | 24-bits |
|-------|-----------|-----------|
|0 | network | host |
Typb B:
## Subnets
If we split the ip address into two (parts) 16-bit portions:
* subnet - high bits
* host part - low order bits
### Subnet mask
usually we'll have `x.x.x.x/mask` where the mask is also some 1-byte value.
We can determine the class of a subnet from `mask` value, hereby referred to by subnet mask.
First we split the 32-bit mask into two portions of 1's and 0's respecctively.
Example: `255.240.0.0` = `11111111 11110000 00000000 0000000`
In our example the split happens at offset 12, meaning our x value from before in this case is just 12.
## Addressing: CIDR
Classless InterDomain Routing
This says that any address say: `a.b.c.d./x` will tell us that x is the bit offset in the subnet portion of an address.