Download as pdf or txt
Download as pdf or txt
You are on page 1of 77

Advanced Computer Networking

Module Code :MIT6114


Ambo University
Hachalu Hundesa CampusInstitute of Technology
Department of Information Technology
(MSc program)

Instructor: Dr.C.Suresh Gnana Dhas


E-Mail id:drsuresh.csambo@gmail.com
Advanced Computer Networking
MIT6114
Chapter 1- Fundamental Networking concepts review
• OSI Reference model
• Routing and Switching basics
• Internet Protocol
 Addressing—Classless inter domain routing (CIDR), sub netting, Address
Resolution Protocol (ARP), Network Address Translation (NAT),
 Hot Standby Router Protocol (HSRP) Services—Domain Name System (DNS),
Bootstrap Protocol (BOOTP), Dynamic Host Configuration Protocol (DHCP),
Internet Control Message Protocol (ICMP)
 Applications—Telnet, File Transfer Protocol (FTP), Trivial File Transfer Protocol
(TFTP)
 Transport—IP fragmentation, sockets, ports
 IP access lists

CINS/F1-01
Chapter 1- Fundamental Networking
concepts review
OSI Reference model
Routing and Switching basics
Why a layered model?
– Easier to teach communication process.
– Speeds development, changes in one layer does not
affect how the other levels works.
– Standardization across manufactures.
– Allows different hardware and software to work
together.
– Reduces complexity
What Each Layer Does

2
APPLICATION LAYER

• Gives end-user applications access to network resources


Presentation Layer

Related to representation of transmitted data


3
Translates different data representations from the Application layer into
uniform standard format
Providing services for secure efficient data transmission
e.g. data encryption, and data compression.
Session Layer

• Allows applications to maintain an ongoing session


Transport Layer

• Provides reliable data delivery 3


• It’s the TCP in TCP/IP
• Receives info from upper layers and segments it into packets
• Can provide error detection and correction
Transport Layer

The transport layer is responsible for


the delivery of a message from one
process to another.
Network Layer

• Provides network-wide addressing and a mechanism to move packets


between networks (routing)
• Responsibilities:
– Network addressing
– Routing
• Example:
– IP from TCP/IP
Network Layer

The network layer is responsible for


the delivery of individual packets from
the source host to the destination host.
Network Addresses
• Network-wide addresses
• Used to transfer data across subnets
• Used by routers for packet forwarding
• Example:
– IP Address

• Where is it on my computer?
– TCP/IP Software
Data Link Layer

• Places data and retrieves it from the physical layer and provides error
detection capabilities
Data Link Layer

The data link layer is responsible for


moving frames from one hop (node) to
the next.
Sub-layers of the Data Link Layer
• MAC (Media Access Control)
– Gives data to the NIC
– Controls access to the media through:
• CSMA/CD Carrier Sense Multiple Access/Collision
Detection
• Token passing
• LLC (Logical Link Layer)
– Manages the data link interface (or Service Access Points (SAPs))
– Can detect some transmission errors using a Cyclic Redundancy
Check (CRC). If the packet is bad the LLC will request the sender to
resend that particular packet.
Physical Layer

• Determines the specs for all physical components


– Cabling
– Interconnect methods (topology / devices)
3
– Data encoding (bits to waves)
– Electrical properties
• Examples:
– Ethernet (IEEE 802.3) .Token Ring (IEEE 802.5) .Wireless (IEEE 802.11b)
Physical Layer

The physical layer is responsible


for the movement of individual bits
from one hop (node) to the next.
Physical Layer (cont’d)

• What are the Physical Layer components on my computer?


• NIC
– Network Interface Card
– Has a unique 12 character Hexadecimal number permanently burned
into it at the manufacturer.
– The number is the MAC Address/Physical address of a computer
• Cabling
– Twister Pair
– Fiber Optic
– Coax Cable
How Does It All Work Together

• Each layer contains a Protocol Data Unit (PDU)


– PDU’s are used for peer-to-peer contact between corresponding layers.
– Data is handled by the top three layers, then Segmented by the Transport layer.
– The Network layer places it into packets and the Data Link frames the packets for
transmission. 2
– Physical layer converts it to bits and sends it out over the media.
– The receiving computer reverses the process using the information contained in the
Data Encapsulation In TCP/IP
• At each layer in the TCP/IP protocol stack
• Outgoing data is packaged and identified for delivery to the layer underneath
• PDU – Packet Data Unit – the “envelop” information attached to a packet at a
particular TCP/IP protocol
• e.g. header and trailer
• Header
• PDU’s own particular opening component
• Identifies the protocol in use, the sender and intended recipient
• Trailer (or packet trailer)
– Provides data integrity checks for the payload
Encapsulation example: E-mail
Encapsulation
An exchange using the OSI model
Summary of layers
4 layers of the TCP/IP model

• Layer 4: Application
• Layer 3: Transport
• Layer 2: Internet
• Layer 1: Network access

It is important to note that some of the


layers in the TCP/IP model have the same
name as layers in the OSI model.
Do not confuse the layers of the two models.
The network access layer
• Concerned with all of the issues that an IP
packet requires to actually make the physical
link. All the details in the OSI physical and data
link layers.
– Electrical, mechanical, procedural and functional
specifications.
– Data rate, Distances, Physical connector.
– Frames, physical addressing.
– Synchronization, flow control, error control.
The internet layer
• Send source packets from any network on the
internetwork and have them arrive at the
destination independent of the path and
networks they took to get there.
– Packets, Logical addressing.
– Internet Protocol (IP).
– Route , routing table, routing protocol.
The transport layer
• The transport layer deals with the quality-of-
service issues of reliability, flow control, and
error correction.
– Segments, data stream, datagram.
– Connection oriented and connectionless.
– Transmission control protocol (TCP).
– User datagram protocol (UDP).
– End-to-end flow control.
– Error detection and recovery.
TCP/IP Reference Model (cont)

• 3. Transport layer (layer 3)


– Allows end-to-end communication
– Connection establishment, error control, flow control
– Two main protocols at this level
• Transmission control protocol (TCP),
– Connection oriented
» Connection established before sending data
» Reliable
• user datagram protocol (UDP)
– Connectionless
» Sending data without establishing connection
» Fast but unreliable

The application layer
• Handles high-level protocols, issues of
representation, encoding, and dialog control.
• The TCP/IP combines all application-related
issues into one layer, and assures this data is
properly packaged for the next layer.
– FTP, HTTP, SMNP, DNS ...
– Format of data, data structure, encode …
– Dialog control, session management …
TCP/IP protocol stack
TCP/IP Reference Model
Layer Protocols

Application HTTP TELNET FTP SMTP SNMP

Transport TCP UDP

Internet IP ICMP

Network Access
ETHERNET PACKET RADIO
(Host-to-network)
Protocols at the application layer
• HTTP:
– browser and web server communicatin
• FTP :
– file transfer protocol
• TELNET:
– remote login protocol
• POP3: Retrieve email
– POP3 is designed to delete mail on the server as soon as the user has downloaded it

• IMAP (Internet Message Access Protocol )


– Retrieve emails,
– retaining e-mail on the server and for organizing it in folders on the serve
Protocols at the transport layer
• Transmission control protocol (TCP),
– Connection oriented
» Connection established before sending data
» Reliable
• user datagram protocol (UDP)
– Connectionless
» Sending data without establishing connection
» Fast but unreliable
Protocol at the network layer
• IP
– Path selection ,
– routing and addressing
• ICMP (Internet Control Message Protocol )
– sends error messages relying on IP
• a requested service is not available
• a host or router could not be reached
Data Formats

Application data message


application
layer

transport TCP TCP TCP segment


layer header data header data header data

network IP TCP packet


layer header header data

data link Ethernet IP TCP Ethernet frame


layer header header header data trailer
Packet Encapsulation (TCP/IP)
• The data is sent down the protocol stack
• Each layer adds to the data by prepending headers

22Bytes 20Bytes 20Bytes 4Bytes

64 to 1500 Bytes
Comparing TCP/IP with OSI
OSI Model TCP/IP Hierarchy Protocols

7th
Application Layer

6th
Presentation Layer Application Layer

5th
Session Layer

4th
Transport Layer
Transport Layer

3rd
Network Layer
Network Layer

2nd
Link Layer
Link Layer
1st
Physical Layer

Link Layer : includes device driver and network interface card


Network Layer : handles the movement of packets, i.e. Routing
Transport Layer : provides a reliable flow of data between two hosts
Application Layer : handles the details of the particular application
How the OSI and TCP/IP Models Relate in a Networking Environment

OSI
OSI Model Equipment Words to TCP/IP
Model Pneumonic Equipment Data Protocols
Name Purpose Remember Model
Layer
Redirector,
Layer 7 Application All FTP, Telnet, Browsers Application
Regular Computer SMTP,
or A Special SNMP, Common Data
Layer 6 Presentation People Computer Data Application
Gateway. Used to Netware Format
combine networks Core
using different NFS, SQL, Dialogues and
Layer 5 Session Seem communication Application
RPC, X-Win Conversations
protocols Quality of
Layer 4 Transport To Computer Segment TCP and UDP Service, and Transport
Reliability
Segment Network Routable
Path Selection,
into Smaller Protocols.
Layer 3 Network Need Router Packet Routing, and Internet
Broadcast (IP, IPX,
Addressing
AppleTalk)
Domains
Bridge (2
Data Link Segment Network NDIS, ODI, Frames and
Ports) or Network
Layer 2 -MAC Data into Smaller Frame MAC Address, Media Access
Switch and Ether Talk Control (MAC) Access
-LLC Collision Domains
NIC
Repeater,
One Collision AND
Hub (Multi- Signals and Network
Layer 1 Physical Processing One Broadcast Bit Physical
Media
port), Access
Domain
Cabling
Client-Server model
• Client and server processes operate on machines which are able to
communicate through a network:
– The Server waits for requests from client
– When a request is received
– The server lookup for the requested data
– And send a response the client

• Sockets and ports


– A socket is and end-point of way communication link between two
programs
– A port number bound to a socket specifies the protocol need the be used
at the receiving end

• Example of servers
– File servers
– Web servers
• Example of client applications
– Browsers
– Email clients
What is a socket?
• An interface between application and
network.
– Create a socket
• Socket(Protocolfamily, type-of-communicatio, specific- protocol);

– The application creates a socket


– The socket type dictates the style of
communication
• reliable vs. best effort
• connection-oriented vs. connectionless
Port 0

Ports
Port 1

Port 65535

 Each host has 65,536 ports


 20,21: FTP
 23: Telnet
 80: HTTP

 A socket provides an interface


to send data to/from the
network through a port
Network Devices basics and
Routing
Functions of network devices
• Separating (connecting) networks or
expanding network
• e.g. repeaters, hubs, bridges,
routers, brouters, switches,
gateways
• Remote Access Modems

45
Expanding Network
• Networks cannot be made larger by simply
adding new computers and more cables
• Less efficient !!

• Can install components to


• segment (divide) large LAN to form
smaller LANs
• connect LANs
• Required components
• Repeaters, bridges, routers, brouters,
switches or gateways
46
Interconnection Devices

47
Repeaters and Hubs
• Repeaters or hubs work at the OSI physical
layer to regenerate the network’s signal and
resend them to other segments
• Primitive hub can be viewed as a multiport
repeater
• It regenerates data and broadcasts them to
all ports Hub

48
49
Limitations and Features

• Cannot link unlike segments


• Cannot join segments with different access
methods (e.g. CSMA/CD and token passing)
• Do not isolate and filter packets
• Can connect
different types of
media
• The most
economic way of
expanding
networks
50
Bridges
• Has one input and one output
• Used to isolate network traffic and
computers
• Has the intelligent to examine incoming
• packet source and destination addresses
But cannot
interpret
higher-level
information
• Hence cannot
filter packet
according to its
protocol 51
How Bridges Work
• Bridges work at the Media Access Control
Sub-layer of the OSI model
• Routing table is built to
record the segment no.
of address
• If destination address is
in the same segment as
the source address,
stop transmit
• Otherwise, forward to
the other segment

52
Bridge Functions

53
Bridge in OSI Model

54
Creating a Switching Table
• Based on the addresses of the sending
computers
• New addresses are added if they are not in
the table Add02 S 02 D 01
Switching Table
Seg 1 Seg 2
Add01 01

Stop 02

Add03 S 01 D 02
55
Remote Bridges
• Bridges are often used in large networks
that have widely dispersed segments
• Remote bridges can be used to connect
remote segments via data-grade telephone
line

56
Differences Between Bridges and Repeaters

Repeaters Bridges

OSI layer Physical layer Data link layer

Data Regenerate data at Regenerate data


regeneration the signal level at the packet
level
Reduce network No Yes
traffic
Switches
• Switches operate at the Data Link layer (layer
2) of the OSI model
• Can interpret address information
• Switches resemble bridges and can be
considered as multiport bridges
• By having
multiports, can
better use limited
bandwidth and
prove more cost-
effective than Cisco Catalyst 2900 switch
bridge 58
• Switches divide a network into several
isolated channels
• Packets sending from 1 channel will not go
to another if not specify
• Each channel has its own capacity and need
not be shared with other channels

Hub 3.3Mbps
10Mbps
Switch 3.3Mbps
3.3Mbps
10Mbps
10Mbps
59
10Mbps
Advantages of Switches

• Switches divide a network into several isolated


channels (or collision domains)
• Reduce the possibility of collision
• Collision only occurs when two devices try to get access to one
channel
• Can be solved by buffering one of them for later access
• Each channel has its own network capacity
• Suitable for real-time applications, e.g. video conferencing
• Since isolated, hence secure
• Data will only go to the destination, but not others

60
Routers
• Layer 2 Switches cannot take advantage of
multiple paths
• Routers work at the OSI layer 3 (network layer)
• They use the
“logical
address” of
packets and
routing tables to
determine the
best path for
data delivery
61
Router in OSI Model

62
How Routers Work
• As packets are passed from routers to routers,
Data Link layer source and destination
addresses are stripped off and then recreated
• Enables a router to route a packet from a TCP/IP
Ethernet network to a TCP/IP token ring network
• Only packets with known network addresses
will be passed - hence reduce traffic
• Routers can listen to a network and identify its
busiest part
• Will select the most cost effective path for
transmitting packets 63
How Routing Table is formed

• Routing table is formed based on


communications between routers using
“Routing Protocols”
• Routing Protocols  Routable Protocol
• Routing
Protocols collect Routers communicate
data about within themselves

current network
status and
contribute to
selection of the
best path
64
Static and Dynamic Routers

Static Routers Dynamic Routers


Manual configuration Manual configuration of the first
of routes route. Automatic discovery of new
routes
Always use the same Can select the best route
route
More secure Need manual configuration to
improve security

65
Distinguishing Between Bridges
and Routers
• Bridges forward everything they
don’t recognize
• Routers select the best path

• Routers are layer 3 devices


which recognize network
address
• Bridges are layer 2 devices
which look at the MAC sublayer
node address

66
Gateway

• Operate in all seven layers.


• Protocol converter.

67
Gateway in OSI Model

68
Device Overview

69
Routing Concepts

• Key design elements


– Performance criteria.
– Decision time.
– Decision place.
– Network information source.
– Network information update timing.
Performance Criteria (PC)
• What route should I take?
– Hop count – simplest.
– Links’ bandwidths – better.
– Current delay in the queue – more realistic.
• Example of least-cost algorithms
– Distance vector routing.
– Link-state routing.
Decision Time and Place
• Decision Time (DT)
– When finding the route, what level should I decide for ?
• Per-packet.
• Per-session.
• Decision Place (DP)
– Who will decide the route ?
• Switching node (e.g. router).
• Central node.
• Source node.
Network Information (NI)

• obtain the information regarding to current network


information
– Topology.
– Traffic load.
– Link cost.
• Scope of the information
– Cost from the router to all other routers.
– Cost from the router to its neighbors.
Network Information Source (NS)

• obtain the information regarding to current network information

– None.
– Local.
– Adjacent (neighbor) node.
– Node along the route (of packet).
– All nodes – centrally or distributed.
Network Information Updating Time (NU)

• collect network information


– Continuous.
– Periodic.
– Major load change.
– Topology change.
• The more often you collect
– The better routing decision you can make.
– The more overhead you generate.
Routing Strategies
• Fixed Routing
– all routes are predetermined.
– simple but not flexible.
• Source Routing
– Source node determines the route.
– Routing patterns can be pre-arranged.
– Good for special network.
• Flooding
– send to everyone.
– require no network information.
– generate lots of traffic.
Routing Strategies
• Random Routing
– simple and require no network information with less traffic.
– may not be the least-cost routing.
• Adaptive Routing
– complex
– generate some traffic overheads

You might also like