02 Networking Concepts
TCP/IP Model¶
- TCP / IP Models contains the following 5 layers.
- Physical Layer
- Link Layer
- Internet Layer
- Transport Layer
- Application Layer
- Combines 3 layers (Application, Presentation and Session) into a single layer.
IP Address¶
- Find ip address using the command
ipconfig- Windowsifconfigorip address showorip a s- Linux
- There are two types of IP addresses.
- Private
- Public
- RFC 1918 defines the following three ranges of private IP addresses:
Subnets¶
- Subnet mask of
255.255.255.0can also be written as/24. /24means that the leftmost three octets are the same across the whole subnet.- In this case the subnet range would be
192.168.66.1 to 192.168.66.254.
Ports¶
- IP address identifies the host.
- Port determine the sending and receiving process.
- Port numbers ranges between 1 to 65535 (
2^16 - 1).
UDP and TCP¶
- UDP is fast but unreliable.
- TCP is reliable but slow.
- TCP connection is established using a three-way handshake.
- Client intiates a connection by sending a SYN packet to the server.
- Server responds to the SYN packet with SYN-ACK packet.
- Client acknowledges the reception of SYN-ACK packet by sending an ACK packet to the server.
Encapsulation¶
- Process of adding the header at each layer and forwarding it as a unit.
- At transport layer, TCP adds the header information and creates a TCP segment.
- At transport layer, UDP adds a header information and creates a UDP datagram.
- At the network layer, header is added to get an IP Packet.
- At the link layer, Header and trailer is added to get a wifi or ethernet frame.
Telnet¶
- Telnet (Teletype Network) is a network protocol for remote terminal connection.
- Telnet allows the user to connect and ommunicate with the remote system.