| Jan | FEB | Mar |
| 22 | ||
| 2022 | 2023 | 2024 |
COLLECTED BY
Collection: Save Page Now Outlinks
Google Ads
Third party cookies may be stored when visiting this site. Please see the cookie information.
PenguinTutor YouTube Channel
●Home
●Learn Linux
●Learn Electronics
●Raspberry Pi
●Programming
●Projects
●LPI certification
●News & Reviews
●Linux Tutorials
●CyberSecurity (PenguinFortress)
| 7 | Application |
| 6 | Presentation |
| 5 | Session |
| 4 | Transport |
| 3 | Network |
| 2 | Data link |
| 1 | Physical |
| OSI model | TCP/IP stack | |
|---|---|---|
| 7 | Application | Application |
| 6 | Presentation | |
| 5 | Session | TCP or UDP |
| 4 | Transport | |
| 3 | Network | IP |
| 2 | Data link | Network interface |
| 1 | Physical | Physical |
| Class A | 0.hhh.hhh.hhh | to | 127.hhh.hhh.hhh |
| Class B | 128.nnn.hhh.hhh | to | 191.nnn.hhh.hhh |
| Class C | 192.nnn.nnn.hhh | to | 223.nnn.nnn.hhh |
| Class D | 224.xxx.xxx.xxx | to | 239.xxx.xxx.xxx |
| Class E | 240.xxx.xxx.xxx | to | 255.xxx.xxx.xxx |
| 127.0.0.1 | Refers to localhost |
| All host bits binary 0s | Refer to the network |
| All host bits binary 1s | Broadcast address - send to all addresses |
| Class A | 10.0.0.0 | to | 10.255.255.255 |
| Class B | 172.16.0.0 | to | 172.31.255.255 |
| Class C | 192.168.0.0 | to | 192.168.255.255 |
| 172 | . | 16 | . | 3 | . | 4 |
| 10101100 | 00010000 | 00000011 | 00000100 |
11111111 11111111 11111111 00000000We convert this to decimal to make it easier to read and it gives us a subnet mask of
255 . 255 . 255 . 0Using simple binary arithmetic the computer can use the subnet mask to convert the IP address into it’s network and host portion. It would use a binary AND to get the network portion. To get the host portion the subnet mask is inverted (NOT function) and then AND’d against the IP address. Just to confuse matters further some equipment (e.g. Cisco routers) use a different notation to represent the subnet mask. The would count in the number of '1' bits and give that as the subnet mask number. So in this example the subnet mask would be represented as /24. This is referred to as the CIDR notation. The example above showed the subnet mask on a octet boundary however it is more common to see a subnet mask within an octet. For example the subnet mask 255.255.255.248 might be used to split a class C network address into 30 subtends each with 6 hosts. The expanded mask would be: 11111111 11111111 11111111 11111000 Taking only the last eight bits the host portion is 11111 This potentially can have 32 subtends excluding reserved addresses (all ones and all zeros) gives 30 valid addresses. The network portion is 000 This potentially can have 8 hosts excluding reserved addresses (all ones and all zeros) gives 6 valid addresses. The subtends are given a number which is when all the host portion are zero. All the rest of the addresses are valid until the part where all the host bits are ones which is the broadcast address for that subnet. Looking at only the last octet the following table shows how some of the address will be made up.
| Subnet Number | First Address | 2nd address | ... | Last address | Broadcast |
|---|---|---|---|---|---|
| 8 | 9 | 10 | ... | 14 | 15 |
| 16 | 17 | 18 | ... | 22 | 23 |
| 24 | 25 | 26 | ... | 30 | 31 |
20 & 21 FTP 23 Telnet 25 SMTP (Simple Mail Transfer Protocol) 53 DNS 80 World Wide Web 110 POP3 (Post Office Protocol) 144 News 6000 X-WindowsPorts above 1000 can be used for any other purposes. Also see: TCP and UDP Port Numbers (/etc/services) Quick Reference



PenguinTutor Facebook page
@PenguinTutor on Twitter
Website created by Stewart Watkiss - WatkissOnline.co.uk