Model ISO - OSI OSI packet encapsulation Klasy adresów IP

Transkrypt

Model ISO - OSI OSI packet encapsulation Klasy adresów IP
'
$ '
Jerzy Sobczyk
$
Jerzy Sobczyk
Klasy adresów IP
Model ISO - OSI
A
w.aplikacji
Telnet SMTP FTP DNS NFS
w.prezentacji
XDR
w.sesji
RPC
w.transportowa
TCP
UDP
w.sieciowa
IP
w.łącza
w.fizyczna
Ethernet IEEE 802.3 X.25 SLIP PPP
&
'
19 padziernika 1998 roku
SIEC
ASU
Jerzy Sobczyk
0.0.0.0
B
10
C
110
192.0.0.0 223.255.255.255
% &
$ '
1
D
1110
224.0.0.0 239.255.255.255
E
1111
240.0.0.0 255.255.255.255
19 padziernika 1998 roku
SIEC
%
$
ASU
3
ASU
4
Jerzy Sobczyk
Subnetting
255.255.255.192
netmask
11 11 11 11 11 11 11 11 11 11 11 11 11 00 00 00
w.aplikacji
w.prezentacji
w.sesji
w.transportowa
w.sieciowa
w.łącza
w.fizyczna
19 padziernika 1998 roku
127.255.255.255
128.0.0.0 191.255.255.255
OSI packet encapsulation
&
0
B
148.81.31.145
address
10 01 01 00 01 01 00 01 00 01 11 11 10 01 00 01
0.0.0.17
host
00 00 00 00 00 00 00 00 00 00 00 00 00 01 00 01
nagłówek
SIEC
dane
końcówka
ASU
% &
2
19 padziernika 1998 roku
148.81.31.128
network
10 01 01 00 01 01 00 01 00 01 11 11 10 00 00 00
148.81.31.191
broadcast
10 01 01 00 01 01 00 01 00 01 11 11 10 11 11 11
SIEC
%
'
$ '
Jerzy Sobczyk
$
Jerzy Sobczyk
TCP/IP
Polecenie – ifconfig
Eth.
IP
TCP
src
data
dst
source
&
'
destination
chk
sequence
acknowledge
destination
source
19 padziernika 1998 roku
ifconfig interface [address family] [address] [up] [down]
[netmask mask] [broadcast address]
address family – rodzina adresów
address – adres interfejsu
up down – włączenie/wyłączenie interfejsu
netmask – maska podsieci
broadcast – adres broadcastowy
type
SIEC
ASU
Jerzy Sobczyk
% &
$ '
5
19 padziernika 1998 roku
SIEC
%
$
ASU
7
ASU
8
Jerzy Sobczyk
148.81.31.230
148.81.31.193
Routers
&
19 padziernika 1998 roku
Polecenie – route
R
148.81.31.65 255.255.255.192
148.81.31.72
148.81.31.64 ... 127
C
225.225.225.192
148.81.31.192 ... 225
255.255.255.224
148.81.31.0 ... 31
148.81.31.30
R
148.81.31.1
148.81.31.2
A
route [-fn] add | delete [host | net] destination
[gateway[metric] ]
-f – opróżnij tablice routingu
-n – wyświetlaj adresy a nie nazwy
destination – numer maszyny/sieci
gateway – adres najbliższego routera
metric – koszt (odległość)
B
SIEC
ASU
% &
6
19 padziernika 1998 roku
SIEC
%
'
$ '
Jerzy Sobczyk
Polecenie – netstat
Polecenie – arp
netstat [-rnpsv]
-r
-n
-s
-v
arp [-v] [-d host] [-s host addr]
– wyświetl tablicę routingu
– wyświetlaj adresy a nie nazwy
– wyświetl statystyki
– wyświetl obszerniejsze informacje
&
'
19 padziernika 1998 roku
SIEC
-d – skasuj pozycję
-s – utwórz nową pozycję
-v – wyświetl obszerniejsze informacje
ASU
Jerzy Sobczyk
% &
$ '
9
19 padziernika 1998 roku
&
19 padziernika 1998 roku
SIEC
ASU
Jerzy Sobczyk
Gateway
-------------------127.0.0.1
148.81.63.248
148.81.63.243
148.81.63.249
148.81.63.250
148.81.63.248
148.81.63.249
148.81.63.254
148.81.63.254
148.81.63.250
service-name endpoint-type protocol wait-status uid server-program
server-arguments
Flags Ref
Use
Interface
----- ----- ------ --------UH
0
9790 lo0
UGH
0
0
UGH
0
0
UGH
0
0
UGH
0
0
UGH
0
0
UGH
0
0
U
3 21336 le0
U
3
0 le0
UG
0 39701
SIEC
%
$
11
Plik /etc/inetd.conf
Tablica routingu
Routing Table:
Destination
-------------------127.0.0.1
148.81.64.64
148.81.65.64
148.81.31.0
148.81.63.32
148.81.64.96
148.81.31.224
148.81.63.224
224.0.0.0
default
$
Jerzy Sobczyk
service-name – nazwa usługi (z /etc/services)
endpoint-type – rodzaj: stream, dgram, raw, tli
protocol – nazwa protokółu (z /etc/protocols)
wait-status – nowait/wait – czy server zwalnia połączenie
uid – z jakim UID ma być wykonywany server
server-program – ścieżka do programu servera
server-arguments – argumenty wywołania (wraz z argumentem 0)
ASU
% &
10
19 padziernika 1998 roku
SIEC
ASU
%
12
'
$ '
Jerzy Sobczyk
$
Jerzy Sobczyk
Plik /etc/services – fragment
Plik /etc/inetd.conf – fragment
ftp
telnet
#
shell
login
exec
talk
finger
stream tcp nowait root
stream tcp nowait root
/usr/sbin/in.ftpd
/usr/sbin/in.telnetd
in.ftpd
in.telnetd
stream
stream
stream
dgram
stream
/usr/sbin/in.rshd
/usr/sbin/in.rlogind
/usr/sbin/in.rexecd
/usr/sbin/in.talkd
/usr/sbin/in.fingerd
in.rshd
in.rlogind
in.rexecd
in.talkd
in.fingerd
&
'
19 padziernika 1998 roku
tcp
tcp
tcp
udp
tcp
nowait root
nowait root
nowait root
wait
root
nowait nobody
SIEC
#
# Network services, Internet style
#
echo 7/tcp
echo 7/udp
telnet 23/tcp
smtp 25/tcp mail
whois 43/tcp nicname # usually to sri-nic
finger 79/tcp
#
# UNIX specific services
# these are NOT officially assigned
#
talk 517/udp
ASU
Jerzy Sobczyk
% &
$ '
13
19 padziernika 1998 roku
15
ASU
16
Plik /etc/protocols
service-name port/protocol aliases
protocol protocol-number aliases
service-name – nazwa usługi
port – numer portu
protocol – nazwa protokółu (z /etc/protocols)
aliases – alternatywne nazwy usługi
19 padziernika 1998 roku
SIEC
%
$
ASU
Jerzy Sobczyk
Plik /etc/services
&
SIEC
protocol – nazwa protokołu
protocol-number – numer protokołu
aliases – alternatywne nazwy protokołów
ASU
% &
14
19 padziernika 1998 roku
SIEC
%
'
$ '
Jerzy Sobczyk
$
Jerzy Sobczyk
Plik /etc/protocols – fragment
Plik /etc/hosts – fragment
#
# Internet (IP) protocols
#
ip 0 IP # internet protocol, pseudo protocol number
icmp 1 ICMP # internet control message protocol
ggp 3 GGP # gateway-gateway protocol
tcp 6 TCP # transmission control protocol
egp 8 EGP # exterior gateway protocol
pup 12 PUP # PARC universal packet protocol
udp 17 UDP # user datagram protocol
hmp 20 HMP # host monitoring protocol
xns-idp 22 XNS-IDP # Xerox NS IDP
rdp 27 RDP # "reliable datagram" protocol
&
'
19 padziernika 1998 roku
SIEC
#
# Internet host table
#
127.0.0.1 localhost loghost
148.81.31.1 csd
148.81.31.2 csd1
148.81.31.3 csd2
148.81.31.4 csd3
ASU
Jerzy Sobczyk
19 padziernika 1998 roku
19 padziernika 1998 roku
SIEC
Plik /etc/hosts
Plik /etc/networks
IP-address official-host-name nicknames...
official-network-name network-number aliases
SIEC
19
ASU
20
official-network-name – oficjalna nazwa sieci
network-number – numer IP sieci
nicknames – alternatywne nazwy sieci
ASU
% &
18
19 padziernika 1998 roku
SIEC
%
$
ASU
Jerzy Sobczyk
IP-address – adres IP
official-host-name – oficjalna nazwa maszyny
nicknames – alternatywne nazwy maszyny
&
% &
$ '
17
%
'
$
Jerzy Sobczyk
Plik /etc/networks – fragment
#
# The loopback network is used only for intra-machine communication
#
loopback 127
#
# Internet networks
#
arpanet 10 arpa # Historical
&
'
19 padziernika 1998 roku
SIEC
%
$
ASU
21
ASU
22
Jerzy Sobczyk
Plik /etc/netmasks
network-number netmask
network-number – numer IP sieci
netmask – maska sieci
Przykład
#
# The netmasks file associates Internet Protocol (IP)
# address masks with IP network numbers.
#
# network-number netmask
#
148.81.0.0 255.255.255.224
&
19 padziernika 1998 roku
SIEC
%

Podobne dokumenty