-
Protocole du World Wide Web :
-
HyperText Transmission Protocol ;
- HTTP/1.1 est spécifié par le RFC 2616 ;
- communication point à point :
- trois commandes principales :
-
GET :
- demande d’un document ;
- HEAD :
- demande uniquement les entêtes ;
- POST :
- transmission de données.
- Architecture du World Wide Web :
-
de nombreux serveurs (simples) ;
- un client ramène une page HTML (HyperText Markup Language) ;
- l’utilisateur choisit une autre URL (Uniform Ressource Locator).
- Exemple de récupération de document :
$ nc www.polytech-lille.fr 80
GET http://www.polytech-lille.fr/ HTTP/1.1
Host: pevele.escaut.net
Accept: */*
User-Agent: WebParTelnet
From: Xavier.Redon@polytech-lille.fr
If-Modified-Since: Sat, 10 Jan 2003 19:43:31 GMT
HTTP/1.1 200 OK
Date: Tue, 11 Mar 2003 20:44:29 GMT
Server: Apache/1.3.27 (Unix) Debian GNU/Linux PHP/4.2.3
X-Powered-By: PHP/4.2.3
Transfer-Encoding: chunked
Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML> <HEAD>
<TITLE>Polytech'Lille > Ecole polytechnique universitaire de Lille,
...
- Exemple de récupération de document par SSL :
$ openssl s_client -connect webmail.polytech-lille.fr:443
GET / HTTP/1.1
Host: webmail.polytech-lille.fr
HTTP/1.1 302 Found
Date: Thu, 13 Apr 2006 18:18:45 GMT
Server: Apache/2.0.55 (Debian) PHP/4.4.2-1 mod_ssl/2.0.55 OpenSSL/0.9.8a
X-Powered-By: PHP/4.4.2-1
Location: horde2/imp/
Content-Type: text/html; charset=ISO-8859-1
- Exemple d’envoi d’un questionnaire par POST :
$ nc www.polytech-lille.fr 80
POST http://www.polytech-lille.fr/cgi-bin/testfic HTTP/1.1
Host: pevele.escaut.net
Accept: */*
User-Agent: WebParTelnet
From: Xavier.Redon@polytech-lille.fr
Content-type: application/x-www-form-urlencoded
Content-length: 42
nom=xavier&prenom=redon&passw1=toto&OK1=OK
HTTP/1.1 200 OK
Date: Tue, 11 Mar 2003 20:44:29 GMT
Server: Apache/1.3.27 (Unix) Debian GNU/Linux PHP/4.2.3
Content-Type: text/html
<!DOCTYPE HTML PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN">
<HTML><HEAD>
<TITLE>PROBLEME</TITLE></HEAD>
...
- Utilisation d’un proxy web :
- Exemple d’utilisation d’un proxy :
$ telnet proxy.polytech-lille.fr 3128
HEAD http://www.lifl.fr/ HTTP/1.0
HTTP/1.0 200 OK
Date: Tue, 11 Mar 2003 21:00:55 GMT
Server: Apache/1.3 (Unix) PHP/4.3.0
Cache-Control: max-age=-561553
Expires: Wed, 05 Mar 2003 09:01:42 GMT
Last-Modified: Wed, 26 Feb 2003 09:01:42 GMT
ETag: "bec9a2-a9c-3e5c8276"
Accept-Ranges: bytes
Content-Length: 2716
Content-Type: text/html
X-Cache: MISS from artois.escaut.net
Proxy-Connection: close
- Restriction d’accès (exemple avec Apache2) :
AuthType Basic
AuthName "Site acces restreint"
AuthBasicProvider ldap
AuthzLDAPAuthoritative off
AuthLDAPURL ldap://ldap.polytech-lille.fr:389/ou=People,dc=polytech-lille.fr?cn
require valid-user
-
Routages statiques.
- Interfaces directement connectées :
r-uvsq#sh ip route connected
C 193.51.43.0 is directly connected, Ethernet1
193.51.24.0 is subnetted
mask is 255.255.255.224,
2 subnets
C 193.51.24.0 is directly connected, Ethernet0
- Routages explicites :
r-uvsq#sh ip route static
S* 0.0.0.0 (mask is 0.0.0.0) [1/0] via 193.51.43.2
- Exterior Gateway Protocol (EGP).
- Informations entre systèmes autonomes ;
- Définition des pairs EGP :
autonomous-system 2092
router egp 1309
network 193.51.24.0
network 193.51.25.0
...
- Acquisition des routes pour l’exterieur :
r-uvsq#sh ip route egp
E 193.48.241.0 [140/4] via 193.51.43.2, 0:00:29, Ethernet1
E 193.54.247.0 [140/4] via 193.51.43.2, 0:00:29, Ethernet1
E 194.167.101.0 [140/4] via 193.51.43.2, 0:00:29, Ethernet1
E 193.105.168.0 [140/4] via 193.51.43.2, 0:00:29, Ethernet1
...
- Routing Information Protocol (RIP) ;
- Acquisition des routes intérieures :
r-uvsq#sh ip route rip
R 193.51.34.0 [120/1] via 193.51.24.8, 0:00:22, Ethernet0
R 193.51.35.0 [120/1] via 193.51.35.254, 0:00:24, Serial3
R 193.51.32.0 [120/1] via 193.51.24.6, 0:00:16, Ethernet0
R 193.51.33.0 [120/1] via 193.51.24.7, 0:00:03, Ethernet0
R 193.51.38.0 [120/1] via 193.51.24.12, 0:00:16, Ethernet0
R 193.51.39.0 [120/1] via 193.51.39.254, 0:00:08, Serial2
R 193.51.37.0 [120/1] via 193.51.24.10, 0:00:19, Ethernet0
R 193.51.42.0 [120/1] via 193.51.39.254, 0:00:08, Serial2
R 193.51.40.0 [120/2] via 193.51.39.254, 0:00:08, Serial2
R 193.51.41.0 [120/1] via 193.51.24.13, 0:00:23, Ethernet0
R 193.51.26.0 [120/1] via 193.51.24.3, 0:00:12, Ethernet0
R 193.51.27.0 [120/1] via 193.51.27.254, 0:00:08, Serial0
R 193.51.24.64 [120/1] via 193.51.24.94, 0:00:28, Serial1
R 193.51.25.0 [120/1] via 193.51.24.2, 0:00:07, Ethernet0
R 193.51.30.0 [120/1] via 193.51.24.9, 0:00:25, Ethernet0
R 193.51.28.0 [120/2] via 193.51.24.94, 0:00:28, Serial1
R 193.51.29.0 [120/2] via 193.51.24.94, 0:00:28, Serial1
-
Protocoles de découverte de voisins :
SR30-Cisco-1#show cdp neighbors
Capability Codes: R - Router, T - Trans Bridge, B - Source Route Bridge
S - Switch, H - Host, I - IGMP, r - Repeater, P - Phone,
D - Remote, C - CVTA, M - Two-port Mac Relay
Device ID Local Intrfce Holdtme Capability Platform Port ID
SR30-1200-1.deule.net
Gig 0/44 136 T I AIR-AP124 Fas 0
SR22-R3560E.deule.net
Gig 0/2 126 R S I WS-C3560E Gig 0/10
RG20-R6506.deule.net
Ten 0/1 173 R S I WS-C6506- Ten 1/4
SR30-3560E-2.deule.net
Ten 0/2 167 S I WS-C3560E Ten 0/
SR32-HP-1# show lldp info remote-device
LLDP Remote Devices Information
LocalPort | ChassisId PortId PortDescr SysName
--------- + ------------------------- ------ --------- ----------------------
A1 | RG20-R6506.deule.net Ten...
A1 | 00 11 5d f2 54 00 Te3/4 TenGig... RG20-R6506.deule.net
B1 | e4 11 5b 6e e3 80 51 B1 SR32-HP2910-2
- Adresses apprises sur un commutateur :
RG20-Cisco-4# show mac-address-table
Dynamic Address Count: 142
Secure Address (User-defined) Count: 0
Static Address (User-defined) Count: 0
System Self Address Count: 50
Total MAC addresses: 192
Maximum MAC addreses: 8192
Non-static Address Table:
Destination Address Address Type VLAN Destination Port
------------------- ------------ ---- --------------------
0000.9431.1968 Dynamic 8 FastEthernet0/1
0000.b438.80e2 Dynamic 7 FastEthernet0/1
0000.b452.e1cf Dynamic 3 FastEthernet0/1
0000.b45c.95c1 Dynamic 11 FastEthernet0/1
0000.e899.8873 Dynamic 8 FastEthernet0/1
0000.e8ee.d420 Dynamic 8 FastEthernet0/1
0005.0254.9f41 Dynamic 8 FastEthernet0/1
0005.0276.2442 Dynamic 8 FastEthernet0/1
0010.4b5b.8557 Dynamic 3 FastEthernet0/1
0010.4bce.7310 Dynamic 8 FastEthernet0/1
...
SR32-HP-1# show mac-address vlan 4
Status and Counters - Address Table - VLAN 4
MAC Address Located on Port
------------- ---------------
00000c-9ff004 A1
00112f-c66ad0 A1
00115d-f25400 A1
00163e-e04561 A1
...
- Définition des VLANS :
RG20-2# show vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/6, Fa0/7, Fa0/8, Fa0/20
2 SERVERS active
3 STAFF active Fa0/22, Fa0/23, Fa0/24
4 STUDENTS active Fa0/9, Fa0/10, Fa0/11, Fa0/12,
Fa0/13, Fa0/14, Fa0/15, Fa0/16,
Fa0/17, Fa0/18, Fa0/19, Fa0/21
5 ADMIN active
6 INSECURE active
7 STAFF-PRIV active
...
RG20-2# show running-config
Current configuration:
!
version 11.2
service password-encryption
!
hostname RG20-2924M-2
!
enable password 7 110E091D
!
interface VLAN1
ip address 172.26.224.17 255.255.240.0
no ip route-cache
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
switchport mode trunk
!
interface FastEthernet0/3
switchport mode trunk
!
interface FastEthernet0/4
switchport mode trunk
!
interface FastEthernet0/5
switchport mode trunk
!
interface FastEthernet0/9
switchport access vlan 4
!
interface FastEthernet0/10
switchport access vlan 4
!
...
- Spanning tree :
RG20-2# show spanning-tree vlan 4
Spanning tree 4 is executing the IEEE compatible Spanning Tree protocol
Bridge Identifier has priority 32768, address 00d0.58f5.3f83
Configured hello time 2, max age 20, forward delay 15
Current root has priority 32768, address 00d0.588f.9083
Root port is 42, cost of root path is 27
Topology change flag not set, detected flag not set, changes 2565
Times: hold 1, topology change 35, notification 2
hello 2, max age 20, forward delay 15
Timers: hello 0, topology change 0, notification 0
Interface Fa0/1 (port 13) in Spanning tree 4 is FORWARDING
Port path cost 19, Port priority 128
Designated root has priority 32768, address 00d0.588f.9083
Designated bridge has priority 32768, address 00d0.58f5.3f83
Designated port is 13, path cost 27
Timers: message age 0, forward delay 0, hold 0
BPDU: sent 3504307, received 3203
...
- Configuration liées au 802.1x sur un commutateur :
RG20-2950G-13#sh run
...
aaa new-model
aaa authentication dot1x default group radius
dot1x system-auth-control
...
interface FastEthernet0/37
switchport access vlan 4
switchport mode access
dot1x port-control auto
dot1x host-mode multi-host
spanning-tree portfast
!
...
radius-server host 172.26.16.2 auth-port 1812 acct-port 1813
radius-server key petitcurieux
...
- Fichier de contrôle 802.1x sur les clients :
[STATE] Processing CONNECTING state.
[STATE] Sending EAPOL-Start Frame.
[STATE] Processing ACQUIRED state.
Connection established, authenticating...
[STATE] Sending EAPOL-Response-Identification
[STATE] ACQUIRED -> AUTHENTICATING
[STATE] Processing AUTHENTICATING state.
[STATE] Sending EAPOL-Response-Authentication
[CONFIG] Loading certificate /etc/1x/cert/cacert.pem . . .
[CONFIG] Loaded root certificate /etc/1x/cert/cacert.pem
[CONFIG] Loading user Private Key from /etc/1x/cert/hosttp-priv-nopass.pem...
Authenticated!
[STATE] (global) -> AUTHENTICATED
- Fichier de contrôle 802.1x sur le serveur :
eap {
default_eap_type = peap
timer_expire = 60
ignore_unknown_eap_types = no
cisco_accounting_username_bug = no
md5 { }
leap { }
gtc { auth_type = PAP }
tls {
private_key_file = ${raddbdir}/certs/radius-priv.pem
certificate_file = ${raddbdir}/certs/radius-cert.pem
CA_file = /etc/ssl/cacert.pem
CA_path = /etc/ssl/newcerts
dh_file = ${raddbdir}/certs/dh
random_file = ${raddbdir}/certs/random
fragment_size = 1024
include_length = yes
}
ttls {
default_eap_type = md5
copy_request_to_tunnel = no
use_tunneled_reply = no
}
peap {
default_eap_type = mschapv2
}
mschapv2 { }
}
-
Configuration d’une interface Ethernet sous Linux :
douaisis# /sbin/ifconfig eth0
eth0 Link encap:Ethernet HWaddr 00:10:B5:86:B6:A7
inet addr:193.48.57.36 Bcast:193.48.57.63 Mask:255.255.255.224
inet6 addr: 2001:660:4401:6002:210:b5ff:fe86:b6a7/64 Scope:Global
inet6 addr: fe80::210:b5ff:fe86:b6a7/64 Scope:Link
UP BROADCAST RUNNING MULTICAST MTU:1500 Metric:1
RX packets:65304644 errors:0 dropped:0 overruns:0 frame:0
TX packets:66466136 errors:0 dropped:0 overruns:1 carrier:0
collisions:0 txqueuelen:100
RX bytes:3113046169 (2.8 GiB) TX bytes:2088704981 (1.9 GiB)
Interrupt:11
- Type de messages DHCP (T53) :
1 DHCPDISCOVER
2 DHCPOFFER
3 DHCPREQUEST
4 DHCPDECLINE
5 DHCPACK
6 DHCPNAK
7 DHCPRELEASE
- Analyse d’une session DHCP :
pevele# tcpdump -vvv -s 1024 -e port bootps or port bootpc
gayant05# ifdown eth0 ; sleep 5 ; ifup eth0
pevele# tcpdump ...
15:29:27.437993 0:d0:bc:bf:6c:38 0:60:8:71:b9:82 ip 342:
router-students.priv.eudil.fr.bootps > pevele.eudil.fr.bootps:
(request) hops:1 xid:0x8382b23e G:router-students.priv.eudil.fr
ether 0:10:b5:7:34:a3 vend-rfc1048 T53:1
(ttl 255, id 9180)
15:29:28.438911 0:60:8:71:b9:82 0:d0:bc:bf:6c:38 ip 359:
pevele.eudil.fr.bootps > router-students.priv.eudil.fr.bootps:
(reply) hops:1 xid:0x8382b23e Y:gayant05.priv.eudil.fr
S:pevele.eudil.fr G:router-students.priv.eudil.fr
ether 0:10:b5:7:34:a3 file "gayant05 vend-rfc1048 T53:2
T54:3241163042 T51:93600 T58:46800 T59:81900 SM:255.255.240.0
DG:router-students.priv.eudil.fr NS:pevele.eudil.fr
HN:"gayant05" DN:"priv.eudil.fr" T28:2887393279
(ttl 64, id 28934)
15:29:28.456249 0:d0:bc:bf:6c:38 0:60:8:71:b9:82 ip 590:
router-students.priv.eudil.fr.bootps > pevele.eudil.fr.bootps:
(request) hops:1 xid:0x8382b23e G:router-students.priv.eudil.fr
ether 0:10:b5:7:34:a3 vend-rfc1048 T57:548
T55:1.3.6.15.28.12.7.9.42.48.49 HN:"gayant05" T51:43200 T53:3
T54:3241163042 T50:2887389578
(ttl 255, id 9184)
15:29:28.494105 0:60:8:71:b9:82 0:d0:bc:bf:6c:38 ip 347:
pevele.eudil.fr.bootps > router-students.priv.eudil.fr.bootps:
(reply) hops:1 xid:0x8382b23e Y:gayant05.priv.eudil.fr
S:pevele.eudil.fr G:router-students.priv.eudil.fr
ether 0:10:b5:7:34:a3 file "gayant05 vend-rfc1048 T53:5
T54:3241163042 T51:43200 SM:255.255.240.0
DG:router-students.priv.eudil.fr NS:pevele.eudil.fr
DN:"priv.eudil.fr" T28:2887393279 HN:"gayant05"
(ttl 64, id 28946)
- Avertissement de routeur en IPv6 :
douaisis# tcpdump -vvv -s 1024 -e icmp6
13:17:04.112383 0:d0:58:f3:4b:10 33:33:0:0:0:1 ip6 118:
fe80::2d0:58ff:fef3:4b10 > ip6-allnodes:
icmp6: router advertisement
(chlim=64, pref=medium, router_ltime=1800,
reachable_time=0, retrans_time=0)
(src lladdr: 00:d0:58:f3:4b:10)
(mtu: mtu=1500)
(prefix info: LA valid_ltime=2592000,preferred_ltime=604800,
prefix=net-servers.escaut.net/64)
[class 0xe0] (len 64, hlim 255)
douaisis# host -t any net-servers.escaut.net
net-servers.escaut.net MX 100 douaisis.escaut.net
net-servers.escaut.net A 193.48.57.32
net-servers.escaut.net AAAA 2001:660:4401:6002:0:0:0:0
- Sollicitation de routeur en IPv6 :
douaisis# tcpdump -vvv -s 1024 -e icmp6
artois# ifdown vlan2 ; ifup vlan2
douaisis# tcpdump ...
13:19:55.334322 0:b:db:5c:98:2c 33:33:ff:5c:98:2c ip6 78:
:: > ff02::1:ff5c:982c:
icmp6: neighbor sol:
who has fe80::20b:dbff:fe5c:982c (len 24, hlim 255)
13:19:56.334373 0:b:db:5c:98:2c 33:33:0:0:0:2 ip6 70:
fe80::20b:dbff:fe5c:982c > ip6-allrouters:
icmp6: router solicitation
(src lladdr: 00:0b:db:5c:98:2c) (len 16, hlim 255)
13:19:56.335277 0:d0:58:f3:4b:10 33:33:0:0:0:1 ip6 118:
fe80::2d0:58ff:fef3:4b10 > ip6-allnodes:
icmp6: router advertisement
(chlim=64, pref=medium, router_ltime=1800, reachable_time=0,
retrans_time=0)
(src lladdr: 00:d0:58:f3:4b:10)
(mtu: mtu=1500)
(prefix info: LA valid_ltime=2592000,preferred_ltime=604800,
prefix=net-servers.escaut.net/64)
[class 0xe0] (len 64, hlim 255)
douaisis# grep ip6-allrouters /etc/hosts
ff02::2 ip6-allrouters
- Sollicitation de routeur en IPv6 :
artois# route -A inet6 | grep vlan2
Destination Next Hop Flags Metric Ref Use Iface
2001:660:4401:6002::/64 :: UA 256 2 0 vlan2
fe80::/64 :: UA 256 0 0 vlan2
ff00::/8 :: UA 256 0 0 vlan2
::/0 fe80::2d0:58ff:fef3:4b10 UGDA 1024 9 1 vlan2
-
Exemple des classes d’adresses pour l’EUDIL :
pevele# sed 's/^[^:]*:[^:]*:\([^:]*\):.*$/\1/' /register/network/vlans
172.26.224.0/255.255.240.0
193.48.57.32/255.255.255.224
193.48.64.0/255.255.255.0
172.26.16.0/255.255.240.0
193.48.68.0/255.255.255.128
172.26.64.0/255.255.240.0
172.26.32.0/255.255.240.0
172.26.48.0/255.255.240.0
193.48.57.192/255.255.255.224
193.48.65.0/255.255.255.0
193.48.57.224/255.255.255.224
193.48.57.160/255.255.255.224
172.26.80.0/255.255.255.224
- Exemple de la table de routage du routeur IPv4 de l’école :
7202# show ip route connected
172.26.0.0/16 is variably subnetted, 6 subnets, 2 masks
C 172.26.224.0/20 is directly connected, ATM2/0.1
C 172.26.48.0/20 is directly connected, ATM2/0.8
C 172.26.32.0/20 is directly connected, ATM2/0.7
C 172.26.16.0/20 is directly connected, ATM2/0.4
C 172.26.80.0/27 is directly connected, ATM2/0.13
C 172.26.64.0/20 is directly connected, ATM2/0.6
193.48.57.0/27 is subnetted, 4 subnets
C 193.48.57.192 is directly connected, ATM2/0.9
C 193.48.57.224 is directly connected, ATM2/0.11
C 193.48.57.160 is directly connected, ATM2/0.12
C 193.48.57.32 is directly connected, ATM2/0.2
C 193.48.65.0/24 is directly connected, ATM2/0.10
C 193.48.64.0/24 is directly connected, ATM2/0.3
193.48.68.0/25 is subnetted, 1 subnets
C 193.48.68.0 is directly connected, ATM2/0.5
C 192.168.1.0/24 is directly connected, ATM2/0.101
C 192.168.2.0/24 is directly connected, ATM2/0.102
C 134.206.0.0/16 is directly connected, FastEthernet1/0
C 192.168.3.0/24 is directly connected, ATM2/0.103
7202# show ip route rip
R 192.168.166.0/24 [120/1] via 172.26.33.63, 00:00:05, ATM2/0.7
R 195.83.194.0/24 [120/2] via 134.206.3.1, 00:00:04, FastEthernet1/0
R 192.168.91.0/24 [120/1] via 134.206.3.1, 00:00:04, FastEthernet1/0
R 193.49.225.0/24 [120/1] via 134.206.3.2, 00:00:08, FastEthernet1/0
[120/1] via 134.206.3.1, 00:00:04, FastEthernet1/0
R 192.168.61.0/24 [120/1] via 134.206.3.1, 00:00:04, FastEthernet1/0
R 192.168.60.0/24 [120/1] via 134.206.3.1, 00:00:04, FastEthernet1/0
R 192.168.247.0/24 [120/1] via 134.206.3.1, 00:00:04, FastEthernet1/0
R 192.168.246.0/24 [120/1] via 134.206.3.1, 00:00:04, FastEthernet1/0
...
7202# show ip route static
S* 0.0.0.0/0 [1/0] via 134.206.3.2
- Exemple de la table de routage du routeur IPv6 de l’école :
3640# sh ipv6 route
IPv6 Routing Table - 19 entries
Codes: C - Connected, L - Local, S - Static, R - RIP, B - BGP
U - Per-user Static route
I1 - ISIS L1, I2 - ISIS L2, IA - ISIS interarea
L 2001:660:3000:1104:140::/128 [0/0] via ::, Tunnel0
C 2001:660:3000:1104::/64 [0/0] via ::, Tunnel0
L 2001:660:4401:6002:2D0:58FF:FEF3:4B10/128 [0/0] via ::, FastEthernet3/0.2
C 2001:660:4401:6002::/64 [0/0] via ::, FastEthernet3/0.2
L 2001:660:4401:6003:2D0:58FF:FEF3:4B10/128 [0/0] via ::, FastEthernet3/0.3
C 2001:660:4401:6003::/64 [0/0] via ::, FastEthernet3/0.3
L 2001:660:4401:6004:2D0:58FF:FEF3:4B10/128 [0/0] via ::, FastEthernet3/0.4
C 2001:660:4401:6004::/64 [0/0] via ::, FastEthernet3/0.4
L 2001:660:4401:6007:2D0:58FF:FEF3:4B10/128 [0/0] via ::, FastEthernet3/0.7
C 2001:660:4401:6007::/64 [0/0] via ::, FastEthernet3/0.7
L 2001:660:4401:6009:2D0:58FF:FEF3:4B10/128 [0/0] via ::, FastEthernet3/0.9
C 2001:660:4401:6009::/64 [0/0] via ::, FastEthernet3/0.9
L 2001:660:4401:6011:2D0:58FF:FEF3:4B10/128 [0/0] via ::, FastEthernet3/0.11
C 2001:660:4401:6011::/64 [0/0] via ::, FastEthernet3/0.11
L 2001:660:4401:6012:2D0:58FF:FEF3:4B10/128 [0/0] via ::, FastEthernet3/0.12
C 2001:660:4401:6012::/64 [0/0] via ::, FastEthernet3/0.12
L FE80::/10 [0/0] via ::, Null0
L FF00::/8 [0/0] via ::, Null0
S ::/0 [1/0] via ::, Tunnel0
3640# show running-config interface FastEthernet3/0.2
Building configuration...
Current configuration : 237 bytes
!
interface FastEthernet3/0.2
encapsulation dot1Q 2
ip address 193.48.57.62 255.255.255.224
ipv6 address 2001:660:4401:6002::/64 eui-64
ipv6 enable
ipv6 nd prefix 2001:660:4401:6002::/64
ipv6 rip TO enable
ipv6 rip T0 enable
end
3640# show running-config interface Tunnel0
Building configuration...
Current configuration : 203 bytes
!
interface Tunnel0
no ip address
ipv6 address 2001:660:3000:1104:140::/64
ipv6 enable
ipv6 rip T0 enable
tunnel source FastEthernet3/0.2
tunnel destination 193.51.178.140
tunnel mode ipv6ip
end
- Exemple de la table de routage d’artois :
artois# netstat -rn
Kernel IP routing table
Destination Gateway Genmask Flags MSS Window irtt Iface
193.48.57.32 0.0.0.0 255.255.255.224 U 0 0 0 vlan2
172.26.16.0 0.0.0.0 255.255.240.0 U 0 0 0 vlan4
0.0.0.0 193.48.57.33 0.0.0.0 UG 0 0 0 vlan2
artois# netstat -r -A inet6
Kernel IPv6 routing table
Destination Next Hop Flags Metric Ref Use Iface
::1/128 :: U 0 118472 4 lo
fe80::20b:dbff:fe5c:982c/128 :: U 0 7196 0 lo
2001:660:4401:6002:20b:dbff:fe5c:982c/128 :: U 0 161399 0 lo
ff00::/8 :: UA 256 0 0 vlan2
fe80::/64 :: UA 256 0 0 vlan2
2001:660:4401:6002::/64 :: UA 256 4168 0 vlan2
::/0 fe80::2d0:58ff:fef3:4b10 UGDA 1024 293 0 vlan2
ff00::/8 :: UA 256 0 0 vlan4
fe80::/64 :: UA 256 0 0 vlan4
2001:660:4401:6004::/64 :: UA 256 14549 0 vlan4
::/0 fe80::2d0:58ff:fef3:4b10 UGDA 1024 4353 0 vlan4
ff00::/8 :: UA 256 0 0 eth0
fe80::/64 :: UA 256 0 0 eth0
- Exemple de la table de routage d’une machine avec vmware :
avalon# route
Kernel IP routing table
Destination Gateway Genmask Flags Metric Ref Use Iface
193.48.64.0 * 255.255.255.0 U 0 0 0 eth0
192.168.230.0 * 255.255.255.0 U 0 0 0 vmnet1
default * 0.0.0.0 U 0 0 0 eth0
-
Montrer l’option IP d’enregistrement de route :
artois# tcpdump -s 1500 -vvv -xe icmp &
artois# ping -R ftp.jussieu.fr
PING nephtys.lip6.fr (195.83.118.1) 56(124) bytes of data.
64 bytes from nephtys.lip6.fr (195.83.118.1): icmp_seq=1 ttl=54 time=13.7 ms
RR: artois.eudil.fr (193.48.57.37)
router-eudil.univ-lille1.fr (193.49.225.60)
193.49.225.1
193.49.253.114
172.21.86.60
172.21.86.33
lille-pos2-0.cssi.renater.fr (193.51.179.146)
nri-b-a0-2-580.cssi.renater.fr (193.51.179.153)
jussieu-a1-0-65.cssi.renater.fr (193.51.182.202)
artois# tcpdump ...
tcpdump: listening on vlan2
09:55:23.648014 0:b:db:5c:98:2c 0:d0:bc:bf:6c:1c ip 138: artois.eudil.fr > nephtys.lip6.fr: icmp: echo request (DF) (ttl 64, id 0, len 124, optlen=40 NOP RR{artois.eudil.fr#0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0 0.0.0.0})
4f00 007c 0000 4000 4001 da71 c130 3925
c353 7601 0107 2708 c130 3925 0000 0000
0000 0000 0000 0000 0000 0000 0000 0000
0000 0000 0000 0000 0000 0000 0800 9d70
593d 0001 6b2b 7d3f 24e3 0900 0809 0a0b
0c0d 0e0f 1011 1213 1415 1617 1819 1a1b
1c1d 1e1f 2021 2223 2425 2627 2829 2a2b
2c2d 2e2f 3031 3233 3435 3637
09:55:23.661758 0:d0:bc:bf:6c:1c 0:b:db:5c:98:2c ip 138: nephtys.lip6.fr > artois.eudil.fr: icmp: echo reply (ttl 54, id 44009, len 124, optlen=40 RR{artois.eudil.fr router-eudil.univ-lille1.fr 193.49.225.1 193.49.253.114 172.21.86.60 172.21.86.33 lille-pos2-0.cssi.renater.fr nri-b-a0-2-580.cssi.renater.fr jussieu-a1-0-65.cssi.renater.fr#} EOL)
4f00 007c abe9 0000 3601 b362 c353 7601
c130 3925 0727 28c1 3039 25c1 31e1 3cc1
31e1 01c1 31fd 72ac 1556 3cac 1556 21c1
33b3 92c1 33b3 99c1 33b6 ca00 0000 a570
593d 0001 6b2b 7d3f 24e3 0900 0809 0a0b
0c0d 0e0f 1011 1213 1415 1617 1819 1a1b
1c1d 1e1f 2021 2223 2425 2627 2829 2a2b
2c2d 2e2f 3031 3233 3435 3637
- Montrer les ICMP 8 et 0 de demande et de réponse d’écho :
gayant05# ping gayant06
PING gayant06.priv.eudil.fr (172.26.17.139): 56 data bytes
64 bytes from 172.26.17.139: icmp_seq=0 ttl=255 time=2.0 ms
64 bytes from 172.26.17.139: icmp_seq=1 ttl=255 time=1.3 ms
64 bytes from 172.26.17.139: icmp_seq=2 ttl=255 time=1.5 ms
gayant05# tcpdump -e -x -s 128 icmp
tcpdump: listening on eth0
14:22:05.046558 0:10:b5:7:34:a3 0:10:b5:7:34:9c ip 98:
gayant05 > gayant06.priv.eudil.fr: icmp: echo request
4500 0054 b534 0000 4001 4a2b ac1a 118a
ac1a 118b 0800 49fe cc0e 0000 fd01 083a
f1b3 0000 0809 0a0b 0c0d 0e0f 1011 1213
1415 1617 1819 1a1b 1c1d 1e1f 2021 2223
2425 2627 2829 2a2b 2c2d 2e2f 3031 3233
3435 3637
14:22:05.047075 0:10:b5:7:34:9c 0:10:b5:7:34:a3 ip 98:
gayant06.priv.eudil.fr > gayant05: icmp: echo reply
4500 0054 b138 0000 ff01 8f26 ac1a 118b
ac1a 118a 0000 51fe cc0e 0000 fd01 083a
f1b3 0000 0809 0a0b 0c0d 0e0f 1011 1213
1415 1617 1819 1a1b 1c1d 1e1f 2021 2223
2425 2627 2829 2a2b 2c2d 2e2f 3031 3233
3435 3637
...
- Montrer les ICMP 5 de modification de route :
gayant05# route add -host gayant06 gw router-students
gayant05# ping gayant06
PING gayant06.priv.eudil.fr (172.26.17.139): 56 data bytes
64 bytes from 172.26.17.139: icmp_seq=0 ttl=255 time=1.7 ms
64 bytes from 172.26.17.139: icmp_seq=1 ttl=255 time=2.0 ms
64 bytes from 172.26.17.139: icmp_seq=2 ttl=255 time=1.7 ms
...
gayant05# tcpdump -e -x -s 128 icmp
tcpdump: listening on eth0
14:28:50.976445 0:10:b5:7:34:a3 0:d0:bc:bf:6c:38 ip 98:
gayant05 > gayant06.priv.eudil.fr: icmp: echo request
4500 0054 faa1 0000 4001 04be ac1a 118a
ac1a 118b 0800 44ca 060f 0000 9203 083a
19e6 0e00 0809 0a0b 0c0d 0e0f 1011 1213
1415 1617 1819 1a1b 1c1d 1e1f 2021 2223
2425 2627 2829 2a2b 2c2d 2e2f 3031 3233
3435 3637
14:28:50.977596 0:d0:bc:bf:6c:38 0:10:b5:7:34:a3 ip 70:
router-students.priv.eudil.fr > gayant05: icmp:
redirect gayant06.priv.eudil.fr to net gayant06.priv.eudil.fr
4500 0038 a817 0000 ff01 99ed ac1a 1001
ac1a 118a 0500 ea80 ac1a 118b 4500 0054
faa1 0000 3f01 05be ac1a 118a ac1a 118b
0800 44ca 060f 0000
14:28:50.978087 0:10:b5:7:34:9c 0:10:b5:7:34:a3 ip 98:
gayant06.priv.eudil.fr > gayant05: icmp: echo reply
4500 0054 b18c 0000 ff01 8ed2 ac1a 118b
ac1a 118a 0000 4cca 060f 0000 9203 083a
19e6 0e00 0809 0a0b 0c0d 0e0f 1011 1213
1415 1617 1819 1a1b 1c1d 1e1f 2021 2223
2425 2627 2829 2a2b 2c2d 2e2f 3031 3233
3435 3637
...
- Montrer les paquets ICMP 11 de datagramme trop vieux, les paquets
UDP de TTL croissants et le paquet ICMP 3 (destination inaccessible) :
pevele# traceroute -q 1 ftp.jussieu.fr
traceroute to nephtys.lip6.fr (195.83.118.1), 30 hops max, 38 byte packets
1 router-servers.eudil.fr (193.48.57.33) 2.108 ms
2 cisco1.univ-lille1.fr (134.206.3.2) 3.811 ms
...
11 nephtys.lip6.fr (195.83.118.1) 35.629 ms
pevele# tcpdump -e -x -s 128 \( icmp and dst host pevele \) or \
\( udp and dst host ftp.jussieu.fr \)
14:32:37.503746 0:60:8:71:b9:82 0:d0:bc:bf:6c:38 ip 52:
pevele.eudil.fr.51131 > nephtys.lip6.fr.33435: udp 10 [ttl 1]
4500 0026 c7bc 0000 0111 be63 c130 3922
c353 7601 c7bb 829b 0012 98dc 0101 7504
083a 63af 0700
14:32:37.504901 0:d0:bc:bf:6c:38 0:60:8:71:b9:82 ip 70:
router-servers.eudil.fr > pevele.eudil.fr: icmp:
time exceeded in-transit [tos 0xc0]
45c0 0038 aa3e 0000 ff01 1c22 c130 3921
c130 3922 0b00 11ba 0000 0000 4500 0026
c7bc 0000 0111 be63 c130 3922 c353 7601
c7bb 829b 0012 98dc
14:32:37.507148 0:60:8:71:b9:82 0:d0:bc:bf:6c:38 ip 52:
pevele.eudil.fr.51131 > nephtys.lip6.fr.33436: udp 10
4500 0026 c7bd 0000 0211 bd62 c130 3922
c353 7601 c7bb 829c 0012 0acd 0202 7504
083a f0bc 0700
14:32:37.510803 0:d0:bc:bf:6c:38 0:60:8:71:b9:82 ip 70:
cisco1.univ-lille1.fr > pevele.eudil.fr: icmp:
time exceeded in-transit [tos 0xc0]
45c0 0038 5202 0000 fe01 e5df 86ce 0302
c130 3922 0b00 9fc8 0000 0000 4500 0026
c7bd 0000 0111 be62 c130 3922 c353 7601
c7bb 829c 0012 0acd
...
16:23:02.449608 0:60:8:71:b9:82 0:d0:bc:bf:6c:38 ip 52:
pevele.eudil.fr.52994 > nephtys.lip6.fr.33445: udp 10
4500 0026 cf0d 0000 0b11 ad12 c130 3922
c353 7601 cf02 82a5 0012 eb3a 0b0b 561e
083a 1fdc 0600
16:23:02.483371 0:d0:bc:bf:6c:38 0:60:8:71:b9:82 ip 80:
nephtys.lip6.fr > pevele.eudil.fr: icmp:
nephtys.lip6.fr udp port 33445 unreachable [tos 0xc0]
45c0 0042 a24b 0000 3601 ae08 c353 7601
c130 3922 0303 30c8 0000 0000 4500 0026
cf0d 0000 0111 b712 c130 3922 c353 7601
cf02 82a5 0012 eb3a 0b0b 561e 083a 1fdc
0600
- Description du protocole UDP :
$ cat /etc/services | grep udp
echo 7/udp
discard 9/udp sink null
daytime 13/udp
...
time 37/udp timserver
...
bootps 67/udp
bootpc 68/udp
tftp 69/udp
$ echo | nc -u pevele.eudil.fr 13
Tue Nov 7 14:38:56 2000
$ netstat -A inet -u -a
udp 0 0 *:bootps *:*
udp 0 0 *:domain *:*
udp 0 0 *:ntp *:*
udp 0 0 *:netbios-dgm *:*
udp 0 0 *:netbios-ns *:*
udp 0 0 *:tftp *:*
udp 0 0 *:talk *:*
udp 0 0 *:ntalk *:*
udp 0 0 *:time *:*
udp 0 0 *:daytime *:*
udp 0 0 *:discard *:*
udp 0 0 *:chargen *:*
udp 0 0 *:echo *:*
udp 0 0 *:sunrpc *:*
udp 0 0 *:syslog *:*
...
- Montrer la perte de paquets avec les commandes :
$ nc -u -l -p 4000 | ( sleep 10 ; cat ) > /tmp/fich1
...
$ nc -u localhost 4000 < /vmlinuz
...
$ ls -l /tmp/fich1 /vmlinuz
-rw-r--r-- 1 root root 69581 Nov 7 14:43 /tmp/fich1
-rw-r--r-- 1 root root 716749 Oct 18 17:14 /vmlinuz
- Description du protocole TCP :
$ cat /etc/services | grep tcp
...
ftp-data 20/tcp
ftp 21/tcp
ssh 22/tcp # SSH Remote Login Protocol
telnet 23/tcp
smtp 25/tcp mail
time 37/tcp timserver
...
gopher 70/tcp # Internet Gopher
finger 79/tcp
www 80/tcp http # WorldWideWeb HTTP
...
$ nc pevele 21
220-Welcome, archive user @193.48.64.39 !
220-
220-The local time is: Tue Nov 7 14:51:25 2000
220-
220-This is an experimental FTP server. If have any unusual problems,
220-please report them via e-mail to <root@pevele.eudil.fr>.
220-
220-If you do have problems, please try using a dash (-) as the first
220-character of your password -- this will turn off the continuation
220-messages that may be confusing your ftp client.
220-
220 pevele.eudil.fr FTP server (Version wu-2.6.0(1) Fri Jun 23 08:07:11 CEST 2000) ready.
quit
221 Goodbye.
$ netstat -A inet -t -a -p
...
tcp *:ssh *:* LISTEN -
tcp *:telnet *:* LISTEN -
tcp *:smtp *:* LISTEN -
tcp 193.48.64.39:33785 artois.eudil.fr:3128 ESTABLISHED 502/netscape
tcp 193.48.64.39:33782 artois.eudil.fr:3128 ESTABLISHED 502/netscape
tcp 193.48.64.39:33414 pevele.eudil.fr:ssh ESTABLISHED 2204/ssh
tcp 193.48.64.39:33275 pevele.eudil.fr:ssh ESTABLISHED 1743/ssh
...
- Mode connecté :
$ netstat -A inet -t
Active Internet connections (w/o servers)
Proto Recv-Q Send-Q Local Address Foreign Address State
tcp 0 94 pevele.eudil.fr:smtp 62.161.186.124:1325 ESTABLISHED
tcp 0 49 pevele.eudil.fr:1384 sofrer-nat.clients:smtp ESTABLISHED
tcp 0 0 pevele.eudil.fr:smtp 62.161.186.124:1317 TIME_WAIT
tcp 0 0 pevele.eudil.fr:smtp kipper02.priv.eudi:4510 TIME_WAIT
tcp 0 58400 pevele.eudil.f:ftp-data ttmdy070188.montro:2582 ESTABLISHEDs
tcp 0 0 pevele.eudil.fr:smtp 62.161.186.124:1311 TIME_WAIT
tcp 0 0 pevele.eudil.fr:pop3 phinaert03.priv.eu:2920 TIME_WAIT
tcp 0 0 pevele.eudil.fr:ssh goto.priv.eudil.fr:866 ESTABLISHED
tcp 0 77 pevele.eudil.fr:ftp ttmdy070188.montro:2566 ESTABLISHED
tcp 0 0 pevele.eudil.fr:smtp 207.94.47.202:3362 FIN_WAIT2
tcp 0 1 pevele.eudil.fr:1031 212.37.207.51:auth LAST_ACK
tcp 0 0 pevele.eudi:netbios-ssn corse.eudil.fr:61739 ESTABLISHED
...
- Montrer la non perte de paquets avec les commandes :
$ nc -l -p 4000 | ( sleep 10 ; cat ) > /tmp/fich1
...
$ nc localhost 4000 < /vmlinuz
...
$ ls -l /tmp/fich1 /vmlinuz
-rw-r--r-- 1 root root 716749 Nov 7 15:28 /tmp/fich1
-rw-r--r-- 1 root root 716749 Oct 18 17:14 /vmlinuz
- Montrer la phase de connexion TCP :
gayant05# nc pevele 21
...
gayant05# tcpdump -e -x -s 128 host pevele and port 21
15:31:57.189984 0:d0:bc:bf:6c:38 0:60:8:71:b9:82 ip 74:
weppes.priv.eudil.fr.2137 > pevele.eudil.fr.ftp:
S 3611621681:3611621681(0) win 32120
<mss 1460,sackOK,timestamp 110933944 0,nop,wscale 0>
(DF) [tos 0x10]
4510 003c 94a3 4000 3f06 f097 ac1a 1004
c130 3922 0859 0015 d744 f931 0000 0000
a002 7d78 7ce4 0000 0204 05b4 0402 080a
069c b7b8 0000 0000 0103 0300
15:31:57.190068 0:60:8:71:b9:82 0:d0:bc:bf:6c:38 ip 74:
pevele.eudil.fr.ftp > weppes.priv.eudil.fr.2137:
S 3640171901:3640171901(0) ack 3611621682 win 32120
<mss 1460,sackOK,timestamp 190083705 110933944,nop,wscale 0>
(DF)
4500 003c 60c3 4000 4006 2388 c130 3922
ac1a 1004 0015 0859 d8f8 9d7d d744 f932
a012 7d78 888f 0000 0204 05b4 0402 080a
0b54 7279 069c b7b8 0103 0300
15:31:57.192459 0:d0:bc:bf:6c:38 0:60:8:71:b9:82 ip 66:
weppes.priv.eudil.fr.2137 > pevele.eudil.fr.ftp:
. ack 1 win 32120 <nop,nop,timestamp 110933945 190083705>
(DF) [tos 0x10]
4510 0034 94a5 4000 3f06 f09d ac1a 1004
c130 3922 0859 0015 d744 f932 d8f8 9d7e
8010 7d78 b753 0000 0101 080a 069c b7b9
0b54 72791