Networking Fundamentals - Govardhan - July 2018
Networking Fundamentals - Govardhan - July 2018
Networking Fundamentals - Govardhan - July 2018
July 2018
what is internet?
• two or more networks that can communicate with each other.
what is Internet?
• composed of hundreds of thousands of interconnected networks.
who uses?
• individuals, various organizations such as government agencies, schools, research facilities, corporations, and libraries
Internet Today
• ISP’s: Internet service Providers – Local, Regional, Backbone ISPs
• WWW – World Wide Web(since 1990s) – Explosion of Internet with WWW – Tim Berners – Lee
• Grown from simple host to host sharing way to millions of hosts communicating with audio and video multimedia
Internet Standards
• Standards are written to guarantee national and international interoperability of data and telecommunications technology and
processes
• RFC – Request for comments – Before it can be standardized
• IETF –Internet Engineering Task Force – identifying operational problems and proposing solutions to those problems. These problems
been categorized into areas like Applications, Internet Protocols, Transport, Security
• IANA – Internet Assigned Numbers Authority – responsible for managing domains and IP addresses
Encapsulation
• Each layered data is encapsulated in lower layer packet
• A packet at level 7 is encapsulated in the packet at level 6. The whole packet at level 6 is encapsulated in a packet at level 5, and so
on.
Application-Specific Addresses
• Some applications have user-friendly addresses that are designed for that specific application.
• Example:
• e-mail address - govardhan@tataelxsi.co.in
• URL(Universal Resource Locator) - www.tataelxsi.com
Project 802
• IEEE started a project called “Project 802” – Specifies the functions of Physical and Data link layer of LAN protocols
• The IEEE has subdivided the data link layer into two sublayers:
• logical link control (LLC)
• media access control (MAC)
MAC Address
• NIC: Each station on an Ethernet network (such as a PC, workstation, or printer) has its own
network interface card (NIC).
• The NIC provides the station with a 6-byte physical address. Also called as MAC/Link address.
Classful Addressing
Network Address
Network Mask
• A network mask or a default mask is a 32-bit number with n leftmost bits all set to 1s and (32 − n) rightmost bits all set to 0s. Ex: 255.0.0.0, 255.255.0.0
• To extract the network address from the destination address of a packet, destination address (or any address in the block) is ANDed with the default mask
Subnetwork
• In subnetting, a network is divided into several smaller subnetworks (subnets) with each subnetwork having its own
subnetwork address
Classless Addressing
• the class privilege was removed from the distribution to compensate for the address depletion
• In classless addressing, variable-length blocks are used. Ex: a block of 1 address, 2 addresses, 4 addresses, 128 addresses, and so on.
• the prefix defines the network and the suffix defines the host. The prefix length in classless addressing can be 1 to 32
• Slash notation: byte . byte . byte . byte / n
• The slash notation is formally referred to as Classless Inter-Domain Routing or CIDR (pronounced cider) notation
Special Addresses
• All-Zeros Address: 0.0.0.0, used when system doesn’t know its IP address. Ex: DHCP client first time booting up.
• All-Ones Address: Broadcast Address- 255.255.255.255. A host that wants to send a message to every other host can use this address as a destination address in an IPv4 packet
• Loopback Addresses: The block 127.0.0.0/8 is used for the loopback address. When this address is used, a packet never leaves the machine; it simply returns to the same machine
software. It can be used to test software
• Multicast Addresses: The block 224.0.0.0/4 is reserved for multicast communication.
• Private Addresses: A number of blocks are assigned for private use. They are not recognized globally.
Introduction
• The Internet Protocol (IP) is the transmission mechanism used by the TCP/IP protocols at the network layer.
• IP is an unreliable and connectionless datagram protocol—a best-effort delivery service.
• Each datagram is handled
• independently
• follow a different route to the destination
• datagrams sent by the same source to the same destination could arrive out of order
• some could be lost or corrupted during transmission
• If reliability is important, IP must be paired with a reliable protocol such as TCP.
• Ex: Post Office delivering a letter
• Datagram: Packets in the network (internet) layer are called datagrams
IP Datagram
• Version (VER): This 4-bit field defines the version of the IP protocol. IPv4 - 4 & IPv6 - 6.
• Header length (HLEN): This 4-bit field defines the total length of the datagram header in 4-byte words. Length of the header is variable between 20 and 60 bytes. 20bytes
= 4x5, so HLEN = 5
• Service type: Part of the field was used to define the precedence(priority) of the datagram; the rest defined the type of service-TOS(low delay, high throughput, and so
on). This is 8 bit field.
• Total length: This is a 16-bit field that defines the total length (header plus data) of the IP datagram in bytes. The total length of the IP datagram is limited to 65,535
• Identification: This field is used in fragmentation
• Flags: This field is used in fragmentation
• Fragmentation offset: This field is used in fragmentation
Fragmentation
• Maximum Transfer Unit (MTU): The value of the MTU differs from one physical network protocol to another. Ex: Ethernet LAN is
1500 bytes, PPP is 296 bytes
• Fragmentation means divide the datagram to make it possible to pass through these networks.
• The source usually does not fragment the IP packet. The transport layer will instead segment the data into a MTU size.
• Datagram may itself be fragmented if it encounters a network with an even smaller MTU
• The reassembly of the datagram is done only by the destination host because each fragment becomes an independent datagram
• Only data in a datagram is fragmented
Fragmentation Fields
When to Share
• Periodic Update
• A node sends its routing table, normally 30 seconds, in a periodic
update
• Triggered Update
• A node sends its routing table to its neighbors any time when there is
a change in its routing table
• 1. After updating its routing table, or
• 2. Detects some failure in the neighboring links
4 3 2
Net5 , 1Net4 , 1
Net2 , 1
RIP timers
Summary
• UDP is a transport protocol that creates a process-to-process communication.
• UDP is a (mostly) unreliable and connectionless protocol that requires little overhead and
offers fast delivery.
• The UDP packet is called a user datagram.
• UDP’s only attempt at error control is the checksum. Inclusion of a pseudoheader in the
checksum calculation allows source and destination IP address errors to be detected.
• UDP has no flow-control mechanism.
• A user datagram is encapsulated in the data field of an IP datagram. Incoming and
outgoing queues hold messages going to and from UDP.
• UDP uses multiplexing to handle outgoing user datagrams from multiple processes on one
host. UDP uses demultiplexing to handle incoming user datagrams that go to different
processes on the same host.
Error Control
• To provide reliable service, TCP implements an error control mechanism
• Loss of segment and discarded segments
• Corrupted Segment
• Recognize duplicate packets and discard them
• Buffer out-of-order segments until the missing segments arrive
Congestion Control
• Controls congestion in the network
• the number of packets sent to the network—is greater than the capacity of network
• Congestion in a network or internetwork occurs because routers and switches have queues—buffers that
hold the packets before and after processing
Copyright © 2017 Tata Elxsi | Confidential | 79
Transmission Control Protocol(TCP) contd
Passive
Active open
open
Connection
opened
Send
request
Receive
Send
request
Receive
Send
request
Connection Termination
2
Segements are pushed
4
Flow control feedback
1
cwnd
RTT
2
cwnd
RTT
4
cwnd
RTT
8
cwnd
TCP Options
Each computer that uses the TCP/IP protocol suite needs to know its IP
address. If the computer uses classless addressing or is a member of a subnet,
it also needs to know its subnet mask. Most computers today need two other
pieces of information: the address of a default router to be able to
communicate with other networks and the address of a name server to be able
to use names instead of addresses as we will see in the next chapter. In other
words, four pieces of information are normally needed.
The DHCP client and server can either be on the same network or on different
networks. Let us discuss each situation separately.
The DHCP has been devised to provide static and dynamic address allocation.
User
1
Host
name
Host
name
2
5
IP address
6 3 Query
IP address
Response 4
Transport layer
A primary server loads all information from the disk file; the
secondary server loads all information from the primary
server.
DNS is a protocol that can be used in different platforms. In the Internet, the
domain name space (tree) is divided into three different sections: generic
domains, country domains, and the inverse domain
3
4
8 7
2 5
9
6
10
5
6
3
4
1
2
7
8
9
10
DNS has two types of messages: query and response. Both types have the
same format. The query message consists of a header and question records;
the response message consists of a header, question records, answer records,
authoritative records, and additional records
As we saw in the previous section, two types of records are used in DNS. The
question records are used in the question section of the query and response
messages. The resource records are used in the answer, authoritative, and
additional information sections of the response message.
Errors
All HTTP
packets
Accepted
packets
SNMP uses the concept of manager and agent. That is, a manager, usually a
host, controls and monitors a set of agents, usually routers or servers.
6
1
3
SNMP packet
4 Get Request
SNMP packet
Response 5
http://erdos.csie.ncnu.edu.tw/~ccyang/TCPIP/TCPIPSlide.html