Networks
René Serral-Gracià Xavier Martorell-Bofill1
1Universitat Politècnica de Catalunya (UPC)
Networks Xavier Martorell-Bofill 1 Ren Serral-Graci 1 Universitat - - PowerPoint PPT Presentation
Networks Xavier Martorell-Bofill 1 Ren Serral-Graci 1 Universitat Politcnica de Catalunya (UPC) May 26, 2014 Introduction Servers Services Lectures System administration introduction 1 Operating System installation 2 User management
1Universitat Politècnica de Catalunya (UPC)
Introduction Servers Services
1
2
3
4
5
6
7
8
9
10 Virtualization
Networks 2
Introduction Servers Services
Networks 3
Introduction Servers Services
Networks 4
Introduction Servers Services
Networks 5
Introduction Servers Services
Networks 6
Introduction Servers Services
servicename port/protocol alias list echo 7/tcp echo 7/udp systat 11/tcp users systat 11/udp users ftp-data 20/tcp ftp-data 20/udp # 21 is registered to ftp, but also used by fsp ftp 21/tcp ftp 21/udp fsp fspd ssh 22/tcp ssh 22/udp telnet 23/tcp telnet 23/udp # 24 - private mail system smtp 25/tcp mail smtp 25/udp mail domain 53/tcp domain 53/udp http 80/tcp www www-http http 80/udp www www-http
Networks 7
Introduction Servers Services
Networks 8
Introduction Servers Services
Networks 9
Introduction Servers Services
147.83.159.200 192.168.12.1/24 .2 .3 .4 .5
Port 22, 25, 80 Port 22 Port 25, 80
Networks 10
Introduction Servers Services
Networks 11
Introduction Servers Services
Networks 12
Introduction Servers Services
Networks 13
Introduction Servers Services
Networks 14
Introduction Servers Services
Networks 15
Introduction Servers Services
Networks 16
Introduction Servers Services
Networks 17
Introduction Servers Services
$ cat /etc/xined.conf includedir /etc/xinetd.d $ cat /etc/xined.d/ftp service ftp { socket_type = stream wait = no user = root server = /usr/sbin/vsftpd log_on_success += HOST DURATION log_on_failure += HOST disable = no }
Networks 18
Introduction Servers Services
int read(int fd, ... ... b = read(8, ... ... int read(int fd, ...
Stub Implementation
Networks 19
Introduction Servers Services
d e m a n a r s e r v e i p
t
Crida RPC Resultat Client Portmapper Server Registrar servei
Networks 20
Introduction Servers Services
Networks 21
Introduction Servers Services
/etc/resolv.conf: search ac.upc.edu nameserver 147.83.33.45 www.google.com
Servidor DNS Local a.root-server b.root-server
internic.net ... www.google.com? .com
.com
iana.org alldomains.com www.google? google www? www NS3.google.com
google.com
DNS: RFCs 1034/1035
Networks 22
Introduction Servers Services
Avoids repeating the same query
Avoids going up to the root servers too often Avoids some steps of the iterative search
Each query returns different values: Round Robin or ”geographical“ criteria $ nslookup www.google.com Name: www.google.com Address: 212.106.221.23 Name: www.google.com Address: 212.106.221.27 Name: www.google.com Address: 212.106.221.25 ...
Networks 23
Introduction Servers Services
Networks 24
Introduction Servers Services
Networks 25
Introduction Servers Services
Networks 26
Introduction Servers Services
Networks 27
Introduction Servers Services
$ cat /etc/bind/named.conf
directory "/var/cache/bind"; forwarders { 147.83.159.217; }; auth-nxdomain no; # conform to RFC1035 listen-on-v6 { any; }; }; zone "cluster.craax.upc.edu" { type master; file "/etc/bind/cluster.zone"; }; zone "1.1.10.in-addr.arpa" { type master; file "/etc/bind/cluster.rev"; };
Networks 28
Introduction Servers Services
$ cat /etc/bind/cluster.zone $TTL 604800 @ IN SOA
20101220 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS gandalf $ORIGIN cluster.craax.upc.edu. gandalf IN A 10.1.1.1 boromir-1 IN A 10.1.1.2 $ cat /etc/bind/cluster.rev $TTL 604800 @ IN SOA
20101220 ; Serial 604800 ; Refresh 86400 ; Retry 2419200 ; Expire 604800 ) ; Negative Cache TTL ; @ IN NS gandalf $ORIGIN cluster.craax.upc.edu. 1 IN PTR gandalf.cluster.craax.upc.edu. 2 IN PTR boromir-1.cluster.craax.upc.edu.
Networks 29
Introduction Servers Services
Networks 30
Introduction Servers Services
Networks 31
Introduction Servers Services
Networks 32
Introduction Servers Services
Networks 33
Introduction Servers Services
ddns-update-style none;
allow booting; allow bootp; default-lease-time 600; max-lease-time 7200; authoritative; subnet 192.168.1.0 netmask 255.255.255.0 { range dynamic-bootp 192.168.1.172 192.168.1.254; range 192.168.1.2 192.168.1.171; filename "pxelinux.0";
}
Networks 34
Introduction Servers Services
ddns-update-style interim; key DHCP_UPDATER { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret pRP5FapFoJ95JEL06sv4PQ==; }; zone ac.upc.edu. { primary 192.168.1.1; key DHCP_UPDATER; }
key DHCP_UPDATER { algorithm HMAC-MD5.SIG-ALG.REG.INT; secret pRP5FapFoJ95JEL06sv4PQ==; }; zone ac.upc.edu. { type master; file "ac.zone"; allow-update { key DHCP_UPDATER; }; }; ...
Networks 35
Introduction Servers Services
Networks 36
Introduction Servers Services
Networks 37
Introduction Servers Services
Networks 38
Introduction Servers Services
21 21 20
Networks 39
Introduction Servers Services
Networks 40
Introduction Servers Services
Networks 41
Introduction Servers Services
Client de mail Complet
MUA
Client de mail Simple
MUA
Servidor de Mail (SSMTP)
MSA
Servidor de Mail (SMTP)
MTA
Servidor de Mail (SMTP)
MTA
Client de Mail Simple
MUA mbox
Mail Classification
DA
Mail Storage
DA
Client de mail Complet
AA/MUA SSMTP SMTP SMTP SMTP POP3/IMAP
Networks 42
Introduction Servers Services
Networks 43
Introduction Servers Services
Networks 44
Introduction Servers Services
Networks 45
Introduction Servers Services
Networks 46
Introduction Servers Services
Networks 47
Introduction Servers Services
Networks 48
Introduction Servers Services
Networks 49
Introduction Servers Services
Networks 50
Introduction Servers Services
Networks 51
Introduction Servers Services
Networks 52
Introduction Servers Services
OS NFS Client ...
read/write ... OS NFS Server N F S P r
shared disk
Networks 53
Introduction Servers Services
OS NFS Client OS NFS Server shared disk local disk / /usr /home /home
Networks 54
Introduction Servers Services
Networks 55
Introduction Servers Services
/ master(rw) trusty(rw,no_root_squash) /projects proj*.local.domain(rw) /usr *.local.domain(ro) @trustedgroup(rw) /home/joe pc001(rw,all_squash,anonuid=150,anongid=100) /pub (ro,insecure,all_squash)
Networks 56
Introduction Servers Services
Networks 57
Introduction Servers Services
Networks 58
Introduction Servers Services
192.168.1.31 Internet 88.40.135.97 (wlan0) VPN 192.168.1.200 (tun0) 192.168.1.30 192.168.1.32 192.168.1.33
Ctrl F n Alt Alt Gr Ctrl Shift Z X C V B N M , . / A S D F G H J K L ; ' Q W E R T Y U I O P [ ] 1 2 3 4 5 6 7 8 9Internet 147.83.159.97 (eth0) VPN 192.168.1.1 (tun0)
Networks 59