Networking & Internetworking: Types of Networks Network Principles Internet Protocols
Networking & Internetworking: Types of Networks Network Principles Internet Protocols
Types of Networks
Network Principles
Internet Protocols
NETWORKS IN DS
3/30/2019 UNIT -1 DC 7
Network Principles
3/30/2019 UNIT -1 DC 9
Protocols
Layer n
Layer 2
Layer 1
Sender Communication Recipient
medium
3/30/2019 UNIT -1 DC 11
Figure 3.3
Encapsulation as it is applied in layered protocols
Transport header
3/30/2019 UNIT -1 DC 12
Protocols
3/30/2019 UNIT -1 DC 14
OSI 7 Layer Reference Model
3/30/2019 UNIT -1 DC 15
Figure 3.5
OSI protocol summary
3/30/2019 UNIT -1 DC 16
Protocols
3/30/2019 UNIT -1 DC 17
Figure 3.6
Internetwork layers
Mess age
Lay ers
Applic ation
Internetw ork
Transport protocols
Internetw ork
Internetw ork pac kets
3/30/2019 UNIT -1 DC 18
3/30/2019 UNIT -1 DC 19
Packet assembly
3/30/2019 UNIT -1 DC 20
Ports, Addressing
3/30/2019 UNIT -1 DC 22
Comparisons
3/30/2019 UNIT -1 DC 23
Packet delivery, Routing
3/30/2019 UNIT -1 DC 24
Figure 3.7
Routing in a wide area network
A 1 B
Hosts 2
3 Links 4
or local C
networks 5
D 6 E
Routers
3/30/2019 UNIT -1 DC 25
Routing
• Linkstate algorithm:
keep a distance vector for destinations in routing
table
send a summary of routing table to neighbors using
RIP (router information protocol)
read tables from neighbors and update as needed
• The RIP routing algorithm is shown in Fig. 3.9.
3/30/2019 UNIT -1 DC 26
Figure 3.8
Routing tables for the network in Figure 3.7
3/30/2019 UNIT -1 DC 27
Figure 3.9
Pseudo-code for RIP routing algorithm
3/30/2019 UNIT -1 DC 29
Internetworking terminology
• Internetworking devices:
Router/Gateway - connects to at least two networks
(network/packet level)
Bridge – links networks of different type (datalink/frame level)
Repeater – physical/electronic signal level
Brouter – the bridge and router combination
• Switch – interconnects several separate Ethernets. A
type of bridge.
• Hub – connects hosts and extends segments of
Ethernet. A type of repeater.
• Tunnel – is used to hold an alien protocol on the
underlying protocol.
IPv6 packets are encapsulated in IPv4 and transported over the
IPv4 networks.
3/30/2019 UNIT -1 DC 30
Figure 3.10
Simplified view of the QMW Computer Science network
router/
Campus138.37.95.240/29 138.37.95.241 firewall
router subnet hammer
Staff subnet Student subnet
138.37.88 138.37.88.251 138.37.94.251 138.37.94
compute file server/
server Eswitch Eswitch
gateway
bruno
138.37.88.249 custard
138.37.94.246 printers
dialup
% server
henry
138.37.88.230
other
file servers
server
hotpoint
138.37.88.162
web
server
copper
138.37.88.248
hub hub
sickle
Campus138.37.95.248/29 100 Mbps Ethernet
router subnet router/
138.37.95.249 firewall
1000 Mbps Ethernet
Eswitch: Ethernet switch
3/30/2019 UNIT -1 DC 31
Figure 3.11
Tunnelling for IPv6 migration
IPv4 network
IPv6 IPv6
A B
Encapsulators
3/30/2019 UNIT -1 DC 32
Internet Protocols
• TCP/IP
• IP addressing
• The IP protocol
• IP routing
• IP version 6
• Mobile IP
• TCP and UDP
• Domain names
• Firewalls
3/30/2019 UNIT -1 DC 33
TCP/IP
3/30/2019 UNIT -1 DC 34
TCP/IP
Message
Layers
Application
Messages (UDP) or Streams (TCP)
Transport
UDP or TCP packets
Internet
IP datagrams
Network interface
Network-specific frames
Underlying network
3/30/2019 UNIT -1 DC 36
TCP/IP
Application message
IP header TCP
Ethernet header IP
Ethernet frame
3/30/2019 UNIT -1 DC 38
TCP/IP
3/30/2019 UNIT -1 DC 39
TCP/IP
3/30/2019 UNIT -1 DC 40
Figure 3.14
The programmer's conceptual view of a TCP/IP Internet
TCP UDP
IP
3/30/2019 UNIT -1 DC 41
TCP abstractions
3/30/2019 UNIT -1 DC 42
Common Internet applications that use
TCP
• BGP (routing) – Border Gateway Protocol
• SMTP (email) – Simple Mail Transfer Protocol
• POP (email) – Post Office Protocol
• Telnet (remote login)
• SSH (remote login) – Secure Shell
• FTP (file transfer) – File Transfer Protocl
• HTTP (web) – HyperText Transfer Protocol
• NNTP (netnews) - (Network News Transfer Protocol)
• DNS (name service) – Domain Name Service
• NFS (distributed file system) – Network File System
• Sun RPC (remote procedure call)
• DCE RPC (remote procedure call)
3/30/2019 UNIT -1 DC 43
Internet Protocols
3/30/2019 UNIT -1 DC 44
IP addressing
3/30/2019 UNIT -1 DC 45
IP addressing
7 24
Clas s A: 0 Netw ork ID Host ID
14 16
Clas s B: 1 0 Netw ork ID Host ID
21 8
Clas s C: 1 1 0 Netw ork ID Host ID
28
Clas s D (multicast): 1 1 1 0 Multicast address
27
Clas s E (reserved): 1 1 1 1 0 unused
3/30/2019 UNIT -1 DC 47
IP addressing
3/30/2019 UNIT -1 DC 49
IP addressing
3/30/2019 UNIT -1 DC 50
IP protocol overview
3/30/2019 UNIT -1 DC 51
Figure 3.17
IP packet layout
header
IP addres s of s ource IP addres s of des tination data
up to 64 kiloby tes
3/30/2019 UNIT -1 DC 52
Address resolution
3/30/2019 UNIT -1 DC 53
Example: ARP on an Ethernet
3/30/2019 UNIT -1 DC 54
IP Spoofing
3/30/2019 UNIT -1 DC 55
IP routing
• The topological map of the Internet is partitioned
into autonomous systems (AS)
3/30/2019 UNIT -1 DC 58
IP Routing
3/30/2019 UNIT -1 DC 59
CIDR –Classless InterDomain Routing
3/30/2019 UNIT -1 DC 60
CIDR
3/30/2019 UNIT -1 DC 61
IP version 6
Sourc e address
(128 bits )
Destination addres s
(128 bits )
3/30/2019 UNIT -1 DC 63
IP version 6 – Address Space
3/30/2019 UNIT -1 DC 65
IP version 6 – Real-time and Services
3/30/2019 UNIT -1 DC 69
MobileIP
3/30/2019 UNIT -1 DC 70
MobileIP
3/30/2019 UNIT -1 DC 71
MobileIP
3/30/2019 UNIT -1 DC 72
Figure 3.19
The Mobile IP routing mechanism
3/30/2019 UNIT -1 DC 73
MobileIP
3/30/2019 UNIT -1 DC 74
Comments on MobileIP
3/30/2019 UNIT -1 DC 75
TCP and UDP
3/30/2019 UNIT -1 DC 76
Ports
• Transport protocols provide process-to-process
communication. This is accomplished by the use
of ports.
• Port numbers are used for addressing
messages to processes within a specified host.
• A port number is specified by a 16-bits integer.
• Once an IP packet has been delivered to the
destination host, the TCP- or UDP-layer
software delivers it to a process via a specific
port at that host.
• This combination is IP address + local port.
3/30/2019 UNIT -1 DC 77
Ports
• IANA (Internet Assigned Numbers Authority)
specifies port usage:
well-known ports: 1 1023
registered ports: 1024 49151
dynamic or private ports: 49152 65535
• ICANN is the new authority for naming and
numbering on the Internet as of 1998.
3/30/2019 UNIT -1 DC 78
UDP features
• UDP (User Datagram Protocol) is an unreliable
datagram-based communication.
• A UDP datagram is encapsulated inside an IP
packet including:
A short header contains the source and destination
port numbers.
A length field specifies the length of the packet.
A checksum is used to verify the integrity of the
packet.
• UDP provides a means of transmitting
messages of up to 64 KB between pairs of
processes.
3/30/2019 UNIT -1 DC 79
UDP features
• It incurs no setup costs or transmission delays
and it requires no administrative
acknowledgement messages.
• But its use is restricted to those applications and
services that do not require reliable delivery of
single or multiple messages.
• Trivial File Transfer Protocol (TFTP) is a file
transfer utility that uses the UDP.
• It is used where user authentication and
directory visibility are not required, for example,
X-Terminal bootup.
3/30/2019 UNIT -1 DC 80
TCP features
3/30/2019 UNIT -1 DC 81
TCP features
3/30/2019 UNIT -1 DC 82
TCP features
Retransmission: The sender records the sequence
numbers of the segments. When it receives an
acknowledgement, it notes that the segments were
received and it may then delete them from its
outgoing buffers. If any segment is not acknowledged
within a specified timeout, the sender retransmits it.
Buffering: The incoming buffer at the receiver is
used to balance the flow between the sender and the
receiver.
Checksum: Each segment carries a checksum
covering the header and the data segment.
3/30/2019 UNIT -1 DC 83
Domain names
3/30/2019 UNIT -1 DC 84
Domain names
3/30/2019 UNIT -1 DC 85
Discovering Network Topology
• netstat –ni
• netstat –rn
• Do a man netstat to look at the command
options.
• Try netstat -a
• /sbin/ifconfig eth0
• /sbin/ifconfig lo
• Do a man ifconfig to look at the command
options.
• Do /usr/sbin/ping –s 156.26.10.255 on Solaris.
3/30/2019 UNIT -1 DC 86
Firewalls
3/30/2019 UNIT -1 DC 87
Firewalls
3/30/2019 UNIT -1 DC 88
Firewalls
3/30/2019 UNIT -1 DC 90
Figure 3.20
Firewall configurations
Internet
w eb/ftp
s erv er
Internet
w eb/ftp
s erv er
Internet
w eb/ftp
s erv er
3/30/2019 UNIT -1 DC 91
Firewalls
• This configuration (Fig. 3.20 (c)) has several
security advantages:
If the bastion policy is strict, the IP addresses of hosts
in the intranet need not be published to the outside
world and the external addresses need not be known,
because all external communication passes through
proxy processes in the bastion.
If the first filter is compromised, the second one
invisible from outside is less vulnerable.
• Virtual private networks (VPNs) extend the
firewall protection boundary beyond the local
intranet by use of cryptographically protected
secure channels at the IP level.
3/30/2019 UNIT -1 DC 92
Network Case Studies
3/30/2019 UNIT -1 DC 93
Network Case Studies
3/30/2019 UNIT -1 DC 95
Network Case Studies
3/30/2019 UNIT -1 DC 96
Ethernet
3/30/2019 UNIT -1 DC 97
Ethernet
3/30/2019 UNIT -1 DC 98
Packet Broadcasting
3/30/2019 UNIT -1 DC 99
Ethernet Packet Layout
send_frame (...)
{
while (the bus is busy) wait ();
send the frame to the bus;
A B C
Laptops
LAN
Mess age
Lay ers
Applic ation
ATM layer
ATM virtual channels
Phy sical
Header: 5 by tes
Host
VPI = 2
VPI = 3 VP/VC
VP sw itch
s w itch
VPI = 4
VPI in VPI out
2 4 VPI = 5
3 5
VP sw itch
Host
VPI : virtual path identifier