NETWORKING SIMPLE AND SHORTS NOTES #JUST READ IT
* Networking
- basics
- units
- B: bytes
- b: bits
- IEEE standard: 802
- 802.3: ethernet
- 802.3u: fast ethernet
- 802.11: WiFi
- 802.15: BlueTooth
- definition
- collection/group of devices (mobiles/machines/kitchen application)
- to exchange/share the information
- topology
- physical arrangement of machines
- types
- bus
- ring
- connected ring
- star
- mesh
- types
- wired
- medium: wire/cable
- cables
- co-axial
- category cable (cat cable) (Twisted pairs)
- types
- UTP: Unshielded Twisted Pairs
- STP: Shielded Twisted Pairs
- versions
- cat 3: 10Mbps
- cat 4: 15Mbps
- cat 5: 100Mbps
- cat 5e: 125Mbps
- cat 6: 1000Mbps ~ 1Gbps
- optical fiber
- types
- LAN: Local Area Network
- MAN: Metropolitan Area Network
- WAN: Wide Area Network
- CAN: Campus Area Network
- wireless
- medium: air (EM Waves)
- types
- PAN: Personal Area Network (BlueTooth/ZigBee)
- WLAN: Wireless LAN
- GSM: Global System For Mobile Communication
- CDMA: Code Division Multiple Access
- addressing scheme
- MAC address
- also called as physical address
- used to identify a NIC uniquely in LAN
- hardwired into NIC
- format: MM:MM:MM:NN:NN:NN
- size: 6 bytes ~ 48 bits
- first 3 bytes are used to identify the manufacture
- last 3 bytes are used to identity the NIC
- to get the MAC address
- windows: ipconfig /all
- linux/Mac: ifconfig
- IP address
- also called as logical address
- used to identify the machine uniquely
- format: N.N.N.N
- decimal: 4.5.6.7
- binary: 00000100.00000101.00000110.00000111
- size: 4 bytes ~ 32 bits
- types
- private: used within a LAN
- public: used in internet
- subnet
- sub-network (logical network within a network)
- can be done by borrowing a bit from host part
- class-full
- class A
- 0.0.0.0 - 127.255.255.255
- private: 10.x.x.x
- format: N.H.H.H
- networks: 2^8
- hosts: 2^24
- subnet mask: 255.0.0.0
- can NOT use:
- 127.x.x.x
- reserved for loopback address
- e.g. 127.0.0.1 (loopback address for localhost / same machine)
- class B
- 128.0.0.0 - 191.255.255.255
- private: 172.16.x.x - 172.32.x.x
- format: N.N.H.H
- networks: 2^16
- hosts: 2^16
- subnet mask: 255.255.0.0
- class C
- 192.0.0.0 - 223.255.255.255
- private: 192.168.x.x
- format: N.N.N.H
- networks: 2^24
- hosts: 2^8
- subnet mask: 255.255.255.0
- class D
- 224.0.0.0 - 239.255.255.255
- reserved for multicast address
- class E
- 240.0.0.0 - 255.255.255.255
- reserved for research tasks
- standards
- application layer
- dns (53)
- domain name service
- used to get the ip address from domain name
- http (80): hyper text transfer protocol
- https (443): secure hyper text transfer protocol
- ftp (20/21): file transfer protocol
- sftp: secure file transfer protocol
- ftps: file transfer protocol using SSH
- ssh (22): secure shell
- smtp: simple mail transfer protocol
- pop3: post office protocol
- arp: address resolution protocol -> used to find physical address from logical address
- presentation layer
- image: png/jpg/jpeg/bmp/gif
- audio: wav/mp3
- video: mp4/flv/div/mkv/avi
- text: json/xml/plain
- archived: zip/tar/gzip
- session
- sip: session initiation protocol
- transport
- tcp:
- transmission control protocol
- connection oriented protocol
- flow control, error checking
- slower than UDP
- e.g. online banking
- udp:
- user datagram protocol
- connection less protocol
- no flow control, no error checking
- faster than TCP
- e.g. video streaming, online multiple games, dns
-
* hub vs switch vs router
- hub
- works in physical layer
- slower network
- used to create a LAN
- always sends the frame as broadcast
- switch
- works in data link layer
- can identify the MAC address in the frame
- used to create a LAN
- most of the times it will be a unicast
Few times it will be multicast
One time it will be broadcast
- router
- works in network layer
- used to create a WAN
* casting
- unicast: sending to only one machine at a time
- broadcast: sending to all the machines at a time
- multicast: sending to multiple machines at a time
* ISO OSI model
- Application
- Presentation
- Session
- Transport
- Network
- Data Link
- Physical
00000000.00000000.00000000.00000000
11111111.11111111.11111111.11111111
10.75.20.20 -> 00001010.01001011.00010100.00010100
255.0.0.0 -> 11111111.00000000.00000000.00000000
-------------------------------------------------------
10.0.0.0 -> 00001010.00000000.00000000.00000000
192.168.1.40
255.255.255.0
--------------
192.168.1.0
192.168.1.0 - 192.168.1.255
192.168.5.40
255.255.255.0
--------------
192.168.5.0
192.168.5.0 - 192.168.5.255
- class C and 95 hosts
- default subnet
- 255.255.255.0
- 11111111.11111111.11111111.00000000
- subnet mask
- 11111111.11111111.11111111.10000000
- 255.255.255.128
- networks: 2^24
- hosts: 2^8 = 256
-- network----------------- --subnet-- -- host --
[11111111.11111111.11111111]. [00000000] -> 2^8 -> 256
[11111111.11111111.11111111]. [1] [0000000] -> 2^7 -> 128
[11111111.11111111.11111111]. [11] [000000] -> 2^6 -> 64
[11111111.11111111.11111111]. [111] [00000] -> 2^5 -> 32
[11111111.11111111.11111111]. [1111] [0000] -> 2^4 -> 16
[11111111.11111111.11111111]. [11111] [000] -> 2^3 -> 8
[11111111.11111111.11111111]. [111111] [00] -> 2^2 -> 4
[11111111.11111111.11111111]. [1111111] [0] -> 2^1 -> 2
[11111111.11111111.11111111]. [11111111] [] -> 2^0 -> 1
00000000 => 0
10000000 => 128
11000000 => 192
11100000 => 224
11110000 => 240
11111000 => 248
11111100 => 252
11111110 => 254
11111111 => 255
172.40.45.78
- 255.255.0.0
- 255.255.128.0
- 255.255.192.0
- 255.255.224.0
- 255.255.240.0
.
.
- 255.255.255.0
[11111111.11111111]. [00000000.00000000] -> 2^16
[11111111.11111111]. [1] [0000000.00000000] -> 2^15
[11111111.11111111]. [11] [000000.00000000] -> 2^14
.
.
[11111111.11111111]. [11111111] [.00000000] -> 2^8
sub net -> 2^n
hosts ->2^n-2
- basics
- units
- B: bytes
- b: bits
- IEEE standard: 802
- 802.3: ethernet
- 802.3u: fast ethernet
- 802.11: WiFi
- 802.15: BlueTooth
- definition
- collection/group of devices (mobiles/machines/kitchen application)
- to exchange/share the information
- topology
- physical arrangement of machines
- types
- bus
- ring
- connected ring
- star
- mesh
- types
- wired
- medium: wire/cable
- cables
- co-axial
- category cable (cat cable) (Twisted pairs)
- types
- UTP: Unshielded Twisted Pairs
- STP: Shielded Twisted Pairs
- versions
- cat 3: 10Mbps
- cat 4: 15Mbps
- cat 5: 100Mbps
- cat 5e: 125Mbps
- cat 6: 1000Mbps ~ 1Gbps
- optical fiber
- types
- LAN: Local Area Network
- MAN: Metropolitan Area Network
- WAN: Wide Area Network
- CAN: Campus Area Network
- wireless
- medium: air (EM Waves)
- types
- PAN: Personal Area Network (BlueTooth/ZigBee)
- WLAN: Wireless LAN
- GSM: Global System For Mobile Communication
- CDMA: Code Division Multiple Access
- addressing scheme
- MAC address
- also called as physical address
- used to identify a NIC uniquely in LAN
- hardwired into NIC
- format: MM:MM:MM:NN:NN:NN
- size: 6 bytes ~ 48 bits
- first 3 bytes are used to identify the manufacture
- last 3 bytes are used to identity the NIC
- to get the MAC address
- windows: ipconfig /all
- linux/Mac: ifconfig
- IP address
- also called as logical address
- used to identify the machine uniquely
- format: N.N.N.N
- decimal: 4.5.6.7
- binary: 00000100.00000101.00000110.00000111
- size: 4 bytes ~ 32 bits
- types
- private: used within a LAN
- public: used in internet
- subnet
- sub-network (logical network within a network)
- can be done by borrowing a bit from host part
- class-full
- class A
- 0.0.0.0 - 127.255.255.255
- private: 10.x.x.x
- format: N.H.H.H
- networks: 2^8
- hosts: 2^24
- subnet mask: 255.0.0.0
- can NOT use:
- 127.x.x.x
- reserved for loopback address
- e.g. 127.0.0.1 (loopback address for localhost / same machine)
- class B
- 128.0.0.0 - 191.255.255.255
- private: 172.16.x.x - 172.32.x.x
- format: N.N.H.H
- networks: 2^16
- hosts: 2^16
- subnet mask: 255.255.0.0
- class C
- 192.0.0.0 - 223.255.255.255
- private: 192.168.x.x
- format: N.N.N.H
- networks: 2^24
- hosts: 2^8
- subnet mask: 255.255.255.0
- class D
- 224.0.0.0 - 239.255.255.255
- reserved for multicast address
- class E
- 240.0.0.0 - 255.255.255.255
- reserved for research tasks
- standards
- application layer
- dns (53)
- domain name service
- used to get the ip address from domain name
- http (80): hyper text transfer protocol
- https (443): secure hyper text transfer protocol
- ftp (20/21): file transfer protocol
- sftp: secure file transfer protocol
- ftps: file transfer protocol using SSH
- ssh (22): secure shell
- smtp: simple mail transfer protocol
- pop3: post office protocol
- arp: address resolution protocol -> used to find physical address from logical address
- presentation layer
- image: png/jpg/jpeg/bmp/gif
- audio: wav/mp3
- video: mp4/flv/div/mkv/avi
- text: json/xml/plain
- archived: zip/tar/gzip
- session
- sip: session initiation protocol
- transport
- tcp:
- transmission control protocol
- connection oriented protocol
- flow control, error checking
- slower than UDP
- e.g. online banking
- udp:
- user datagram protocol
- connection less protocol
- no flow control, no error checking
- faster than TCP
- e.g. video streaming, online multiple games, dns
-
* hub vs switch vs router
- hub
- works in physical layer
- slower network
- used to create a LAN
- always sends the frame as broadcast
- switch
- works in data link layer
- can identify the MAC address in the frame
- used to create a LAN
- most of the times it will be a unicast
Few times it will be multicast
One time it will be broadcast
- router
- works in network layer
- used to create a WAN
* casting
- unicast: sending to only one machine at a time
- broadcast: sending to all the machines at a time
- multicast: sending to multiple machines at a time
* ISO OSI model
- Application
- Presentation
- Session
- Transport
- Network
- Data Link
- Physical
00000000.00000000.00000000.00000000
11111111.11111111.11111111.11111111
10.75.20.20 -> 00001010.01001011.00010100.00010100
255.0.0.0 -> 11111111.00000000.00000000.00000000
-------------------------------------------------------
10.0.0.0 -> 00001010.00000000.00000000.00000000
192.168.1.40
255.255.255.0
--------------
192.168.1.0
192.168.1.0 - 192.168.1.255
192.168.5.40
255.255.255.0
--------------
192.168.5.0
192.168.5.0 - 192.168.5.255
- class C and 95 hosts
- default subnet
- 255.255.255.0
- 11111111.11111111.11111111.00000000
- subnet mask
- 11111111.11111111.11111111.10000000
- 255.255.255.128
- networks: 2^24
- hosts: 2^8 = 256
-- network----------------- --subnet-- -- host --
[11111111.11111111.11111111]. [00000000] -> 2^8 -> 256
[11111111.11111111.11111111]. [1] [0000000] -> 2^7 -> 128
[11111111.11111111.11111111]. [11] [000000] -> 2^6 -> 64
[11111111.11111111.11111111]. [111] [00000] -> 2^5 -> 32
[11111111.11111111.11111111]. [1111] [0000] -> 2^4 -> 16
[11111111.11111111.11111111]. [11111] [000] -> 2^3 -> 8
[11111111.11111111.11111111]. [111111] [00] -> 2^2 -> 4
[11111111.11111111.11111111]. [1111111] [0] -> 2^1 -> 2
[11111111.11111111.11111111]. [11111111] [] -> 2^0 -> 1
00000000 => 0
10000000 => 128
11000000 => 192
11100000 => 224
11110000 => 240
11111000 => 248
11111100 => 252
11111110 => 254
11111111 => 255
172.40.45.78
- 255.255.0.0
- 255.255.128.0
- 255.255.192.0
- 255.255.224.0
- 255.255.240.0
.
.
- 255.255.255.0
[11111111.11111111]. [00000000.00000000] -> 2^16
[11111111.11111111]. [1] [0000000.00000000] -> 2^15
[11111111.11111111]. [11] [000000.00000000] -> 2^14
.
.
[11111111.11111111]. [11111111] [.00000000] -> 2^8
sub net -> 2^n
hosts ->2^n-2
Spread spectrum
it means in network each signal has allocated a bandwidth example for Radio frequency it is in MHz
that is 89.* to 108.* for 4G network it is GHz so that each is transmitted deliberately with in bandwidth what it is allocated
Comments
Post a Comment