计算机代写

Introduction
Computer Networks and the Internet

Copyright By PowCoder代写 加微信 powcoder

The Network Structure

Main Topics
What is the Internet?
What is a protocol?
The Network Edge, some useful tools

What is a router?

Access Networks and Physical media

Transmission and Propagation delays

Queuing delay and packet loss

Protocol layers

Encapsulation

What is the Internet?

What’s the Internet?

Email server
Web-page server
smartphones
Automobile
Digital cameras
UNIX-based workstations
Household appliances
HOSTS or END SYSTEMS

billions of connected computing devices:
hosts = end systems
running network apps

Nuts and Bolts View
Networking Infrastructure View
Hardware components
provides services to distributed applications

infrastructure where new applications are being constantly invented and deployed
global communication
computation infrastructure

What’s the Internet?

Nuts and Bolts View
Internet: “network of networks”
Interconnected ISPs
protocols control sending, receiving of messages
e.g., TCP, IP, HTTP, Skype, 802.11
Internet standards
RFC: Request for comments
IETF: Internet Engineering Task Force

mobile network
global ISP
regional ISP
institutional

ISP – Internet Service Provider

Networking Infrastructure View
infrastructure that provides services to applications:
Web, VoIP, email, games, e-commerce, social nets, …
provides programming interface to apps
hooks that allow sending and receiving app programs to “connect” to Internet
provides service options, analogous to postal service

mobile network
global ISP
regional ISP
institutional

is a scientific experiment that uses Internet-connected computers in the Search for Extraterrestrial Intelligence (SETI). You can participate by running a free program that downloads and analyzes radio telescope data.

http://setiathome.ssl.berkeley.edu/
VIRTUAL SUPERCOMPUTER
Search For Extra-Terrestrial Intelligence
Massively Distributed Computing
https://www.nationalgeographic.com/news/2016/08/seti-signal-sun-like-star-hercules-aliens-life-space-science/

The Network Structure

network edge: applications and hosts
network core:
network of networks
access networks, physical media: communication links

The big picture

Network Structure

network core:
network of networks

The big picture
Network of routers

End System

End System

Takes a chunk of information arriving on one of its incoming communication links (input link interface) and forwards that chunk of information on one of its outgoing communication links (output link interface).

End System
End System

path or route
End System

Internet uses packet switching to allow for multiple communicating end systems to share a path, or parts of a path, at the same time.

End System

End System

End System
End System

path or route
End System

The Network Edge

A closer look at the Network Edge
What happens in the network edge?
The sending End System doesn’t need to know how messages are actually sent.
It only needs to know what services are provided by the transport layer protocol being used.
Because of the layered network architecture, there is some level of abstraction that hides the nitty-gritty part of the communication process between two end systems.

(e.g. in NZ )
(e.g. in Switzerland )
Internet protocol stack:
Application layer
Transport layer
Network layer
Link layer
Physical layer

What is a protocol?
All activities in the Internet that involves two or more communicating entities are governed by a protocol.

a human protocol and a computer network protocol:

What’s a protocol?

Got the time?

TCP connection request

TCP connection reply

Get http://www.massey.ac.nz/hello.php

A protocol defines:
format and order of messages sent and received among network entities
and actions taken on the transmission and/or receipt of a message, or other event
Communicating Network Entities:
Hardware, Software components
Different protocols are used to accomplish different communication tasks.

What’s a protocol?

What’s a protocol?
* All activities in the Internet that involves two or more communicating entities are governed by a protocol.

* In order for protocols to work, both entities must observe the same protocol.
* There is a set of conventional actions taken when messages are sent and received.

There are protocols in:

Protocols determine a packet’s path from source to destination

Network Interface Cards
hardware-implemented protocols control the flow of the bits on the “wire”

End Systems
congestion-control protocols control the rate at which packets are transmitted between sender and receiver.

What’s a protocol?

Client/Server Model
client host requests, receives
service from server
most prevalent structure for Internet applications although not all applications are purely client, or purely of server type (e.g. P2P file sharing)

A closer look at the Network Edge
What happens in the network edge?
End Systems (Hosts):
run application program
e.g. web server/browser, email server/client, ftp client/server, etc.
at “edge of network”

“Connection” between two End Systems: (e.g. Web application or Internet phone application)
Nothing more than allocated buffers and state variables in the End-Systems

The Network Edge

“Connection”
Internet provides two type of services to End-System Applications:
Connection-oriented service – (TCP)
App’s using UDP:
streaming media, teleconferencing, Internet telephony
Connectionless service – (UDP)
App’s using TCP:
HTTP (WWW), FTP (file transfer), Telnet (remote login), SMTP (email)
Type netstat -a
Transmission Control Protocol
User Datagram Protocol

Network tools

Network tools

Some useful network tools:
The Network Edge
ping hostname/IP address
tests if a particular host is reachable. 
displays the IP address, subnet mask, and default gateway for all adapters in your machine
displays network connections of processes using TCP and UDP
nslookup hostname
queries the Domain Name System (DNS) to obtain domain name or IP
tracert hostname/IP address
 shows the path traversed by a packet of information, starting from your computer to another end system that you specify.

IP address
In the Internet, every end system and router has a numeric address associated with each of their network interfaces, called an IP address.

network interface
End System

223.1.3.27
223.1.4.11
This address contains some structured information that is used specifically for routing messages to the end system.

Machine connected to a network

IP address?
Default gateway?
IP address
We can use the ipconfig command to extract the IP addresses and other TCP/IP network configuration values associated with a host.

C:\>ipconfig /all

Open a command prompt, then type

From the results returned by the ipconfig command we are interested in the addresses associated with the physical adapter.
IP address

virtual adapter
physical adapter

We can see two IP addresses assigned to my machine: an IPv6 and an IPv4 address. Either of them could be used to communicate with this machine.

virtual adapter

IPv4 address
The IPv4 address is a 32-bit number that uniquely identifies a network interface on a host/router/node.

typically written in decimal digits, formatted as four 8-bit fields separated by periods (dotted-decimal notation).

The ipv4 address contains two parts:
a network address and a host part.
IPv4 Subnet address

The subnet mask helps to identify the network address component of an ipv4 address. This specifies to which IP network/subnetwork the machine belongs to.

virtual adapter
physical adapter

virtual adapter
IPv4: 192.168.68.54
Subnet: 255.255.252.0

Dissecting an IPv4 address

Network address = IPv4 bitwise AND Subnet Mask
Given an IPv4 address and its subnet mask, we can extract its network address and host parts using the following bitwise operation:

Let’s examine the network addresses assigned to a simple home network

Sample home network with Mesh WiFi
 TP-Link* Mesh Technology provides whole-home IoT coverage with Wi-Fi, Bluetooth and Zigbee integrated into a single system

Optical Network Terminator
Fibre optic link
Modem/router/access point
Mesh WiFi Node 2
Mesh WiFi Node 1

Sample home network with Mesh WiFi

 TP-Link* Mesh Technology provides whole-home IoT coverage with Wi-Fi, Bluetooth and Zigbee integrated into a single system

This information can be found using the router’s user interface.
IPv4 addresses

Sample home network with Mesh WiFi

 TP-Link* Mesh Technology provides whole-home IoT coverage with Wi-Fi, Bluetooth and Zigbee integrated into a single system

Sample home network with Mesh WiFi

Globally unique IP address assigned by the ISP

All these IP addresses are only applicable to the home private network (not globally unique)

There will be times when we would want to perform a quick check on the reachability of a host on an IP network:

if our own socket program fails to communicate to a target host, we need to know if this is due to a bug in our codes, or is it due to an external problem (e.g. problem with the network itself).

We can use a network software utility that is built into the OS to accomplish this task – we can issue a ping command on the command line.

We can use the ping network utility to test the reachability of a host on an Internet Protocol (IP) network.
Simplified syntax: ping hostname/ IP address
https://docs.microsoft.com/en-us/windows-server/administration/windows-commands/ping

IPv4 loop back or localhost address

Loopback address, 127.0.0.1
To send messages to the same machine you are using, use the loopback IP address.
For diagnostic purposes, you might want to send a ping command to the same host that you are using. This is to verify that the internal path through the TCP/IP protocols is working.

IPv6 address
The IPv6 address is a 128-bit number that identifies and locates a network interface on a machine/node, in recognition that a node can have more than one interface. IPv6 hosts usually have more than one IPv6 address assigned to each of their IPv6-enabled network interfaces.

2001:0db8:3c4d:0015:0000:0000:1a2f:1a2b
typically written in hexadecimal digits, formatted as eight 16-bit fields separated by colons.
The leftmost three fields (48 bits) contain the site prefix. This is followed by a 16-bit subnet ID, and a 64-bit interface ID.

Site prefix

Interface ID
(assigned by ISP or Regional Internet Registry)

Short cut notation used in IPv6 addresses
IPv6 address
Within the same local network (e.g. home network), you can use the link-local IPv6 address to send messages to hosts in that network.
Link-local addresses starts with fe80:: (fe80:: /10)
fe80:0:0:0:fd39:f4ed:1938:97e6
fe80::fd39:f4ed:1938:97e6
Consecutive all-zero blocks could be hidden using double colon characters (::).

equivalent!

Link-local addresses can be used to reach the neighbouring nodes attached to the same link.

IPv6 address

Link-local addresses starts with fe80:: (fe80:: /10)

When contacting hosts within the same subnetwork, use the link-local IPv6 address of that target host, followed by an interface number (Windows) or an interface name (UNIX).

%21 is the interface number

IPv6 address (expanded version also works)

fe80:0:0:0:fd39:f4ed:1938:97e6%21
is equivalent to
fe80::fd39:f4ed:1938:97e6%21

IPv6 loopback address

Loopback address ::1
To send messages to the same machine you are using, use the loopback IPv6 address.

a command-line network utility that displays network connections for Transmission Control Protocol, routing tables, and a number of network interface and network protocol statistics.

Display all connections and listening ports

netstat -an
We can identify the different processes using TCP and UDP transport protocols

Display all connections and listening ports

netstat -an
Server is listening at all IPv4 addresses local to the machine, at port 135
A connection has been established
Connection is being requested
Server is listening at all available IPv6 addresses local to the machine, at port 135
Server can receive messages from any available IPv6 addresses, port 53
Any remote IP address and port number is ok
-an means display all connections and listening ports; display addresses and port numbers in numeric form

netstat -r
Display the routing table
-r means display routing table

IPv4 route table

IPv6 route table
21 is the interface number of my Wireless network adapter
We will cover routing algorithms once we get to the Network Layer in the lectures.
More details about routing will be covered when we examine the Network layer.

Network tool used for querying the Domain Name System to obtain the mapping between domain name and IP address, or other DNS records.

syntax: nslookup hostname
C:\>nslookup www.google.co.nz
Server: UnKnown
Address: fe80::1

Non-authoritative answer:
Name: www.google.co.nz
Addresses: 2404:6800:4006:803::2003
203.118.141.116
203.118.141.82
203.118.141.109
203.118.141.96
203.118.141.95
203.118.141.117
203.118.141.88
203.118.141.110
203.118.141.123
203.118.141.102
203.118.141.103
203.118.141.89
Note: these IP addresses change over time as their network administrators may assign new machines residing at different network locations.
IPv6 address

IPv4 addresses
What is the IP address associated with www.google.co.nz?

syntax: nslookup hostname dns_server
C:\>nslookup www.google.co.nz ns1.google.com
Server: ns1.google.com
Address: 216.239.32.10

Name: www.google.co.nz
Addresses: 2404:6800:4006:814::2003
142.250.204.3
The results come from a dns server we specified
IPv4 and IPv6 addresses
We can also query a specific dns server to perform host names to ip address resolution.

It is also possible to get no reply from a default DNS server configured in your machine. Therefore, you may specifically query a DNS server of your choice to perform the task.
C:\>nslookup www.google.co.nz

The Network Structure

Is there a way of identifying the intervening routers between a client and a server?

Traceroute
We can trace the actual route taken by a packet from source to destination, and measure the actual round-trip time.

Trace route

 either an IP Address or a Domain Name
How many routers are involved in sending a packet between a client residing at (Auckland, NZ) and a server at EPFL Switzerland? Can we trace those routers and find their names/IP addresses?
command: tracert target_host

a command-line utility that you can use to trace the path that an Internet Protocol (IP) packet takes to its destination.

Tracert example
From Massey university (Auckland) to EPFL.ch (Switzerland)

Netherlands
Palmerston North, NZ

See also https://www.ipaddress.com/
Default gateway

Tracert example
From Massey university (Auckland) to EPFL.ch (Switzerland)

Palmerston North, NZ

See also https://www.ipaddress.com/
More on this later…

Swiss Education and Research Network

Tracert example
To use tracert in IPv6 mode, add the -6 parameter

Without the proper parameter settings, a trace route of a host in IPv6 would fail (see example below).

References
Computer Networking: A Top-Down Approach, 7th edition, , , Pearson/ , April 2016
https://docs.microsoft.com/
https://docs.oracle.com/cd/E18752_01/html/816-4554/ipv6-overview-10.html
Internet Infrastructure: Networking, Web Services, and Cloud Computing, ,

End of Session

/docProps/thumbnail.jpeg

程序代写 CS代考 加微信: powcoder QQ: 1823890830 Email: powcoder@163.com