Nous disposons d’un routeur Cisco 2621XM: celui-ci possède 2 interfaces FastEthernet. A terme le routeur servira pour partager une connexion Internet.

En attendant, voyons comment configurer les interfaces de notre routeur:
Attention: Les configurations présentées ci-dessous ne sont pas sécurisées, et présentent uniquement la configuration des interfaces. La sécurisation du routeur et les fonctionnalités de NAT/PAT seront présentées plus tard. Notez que le routeur configuré ci-dessous n’est pas pour l’instant directement connecté à Internet, ce qui explique les adresses obtenues par DHCP, et les adresses des 1ers routeurs dans les traceroute.
- L’interface connectée à Internet: configuration DHCP:
Router>enable
Router#show interface
FastEthernet0/0 is administratively down, line protocol is down
Hardware is AmdFE, address is c802.3a03.0000 (bia c802.3a03.0000)
MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
16 packets output, 5982 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
FastEthernet0/1 is administratively down, line protocol is down
Hardware is AmdFE, address is c802.3a03.0001 (bia c802.3a03.0001)
MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
16 packets output, 5982 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface FastEthernet 0/0
Router(config-if)#ip address dhcp
Router(config-if)#no shutdown
Router(config-if)#
*Mar 1 00:03:42.144: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
*Mar 1 00:03:43.145: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
^Z
Router#
*Mar 1 00:03:47.476: %SYS-5-CONFIG_I: Configured from console by console
Router#show interfaces FastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
Hardware is AmdFE, address is c802.3a03.0000 (bia c802.3a03.0000)
Internet address will be negotiated using DHCP
MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
25 packets output, 9084 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
Router#
Brancher le cable Ethernet sur l’interface FastEthernet 0/0
Router#
*Mar 1 00:08:37.239: %DHCP-6-ADDRESS_ASSIGN: Interface FastEthernet0/0 assigned DHCP address 192.168.100.50, mask 255.255.255.240, hostname Router
Router#show interfaces FastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
Hardware is AmdFE, address is c802.3a03.0000 (bia c802.3a03.0000)
Internet address is 192.168.100.50/28
MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input 00:00:10, output 00:00:03, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
6 packets input, 2085 bytes
Received 6 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
79 packets output, 24964 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
Router#
- L’interface connectée au réseau local: adresse IP fixe.
Router>enable
Router#show interfaces FastEthernet 0/1
FastEthernet0/1 is administratively down, line protocol is down
Hardware is AmdFE, address is c802.3a03.0001 (bia c802.3a03.0001)
MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output never, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
16 packets output, 5982 bytes, 0 underruns
0 output errors, 0 collisions, 0 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#interface FastEthernet 0/1
Router(config-if)#ip address 192.168.0.254 255.255.255.0
Router(config-if)#no shutdown
Router(config-if)#
*Mar 1 00:21:07.417: %LINK-3-UPDOWN: Interface FastEthernet0/1, changed state to up
*Mar 1 00:21:08.419: %LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
Router(config-if)#^Z
Router#
*Mar 1 00:21:25.867: %SYS-5-CONFIG_I: Configured from console by console
Brancher le cable Ethernet sur l’interface FastEthernet 0/1
Router#show interfaces FastEthernet 0/1
FastEthernet0/1 is up, line protocol is up
Hardware is AmdFE, address is c802.3a03.0001 (bia c802.3a03.0001)
Internet address is 192.168.0.254/24
MTU 1500 bytes, BW 100000 Kbit/sec, DLY 100 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation ARPA, loopback not set
Keepalive set (10 sec)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output 00:00:04, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: fifo
Output queue: 0/40 (size/max)
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
0 packets input, 0 bytes
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
45 packets output, 9552 bytes, 0 underruns
0 output errors, 0 collisions, 1 interface resets
0 unknown protocol drops
0 babbles, 0 late collision, 0 deferred
0 lost carrier, 0 no carrier
0 output buffer failures, 0 output buffers swapped out
Router#
- Vérification de la table de routage:
Router#show ip route
Codes: C - connected, S - static, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is 192.168.100.62 to network 0.0.0.0
C 192.168.0.0/24 is directly connected, FastEthernet0/1
192.168.100.0/28 is subnetted, 1 subnets
C 192.168.100.48 is directly connected, FastEthernet0/0
S* 0.0.0.0/0 [254/0] via 192.168.100.62
Router#
- Vérification du resolver:
Router#show hosts
Default domain is not set
Name/address lookup uses domain service
Name servers are 192.168.100.62
Codes: UN - unknown, EX - expired, OK - OK, ?? - revalidate
temp - temporary, perm - permanent
NA - Not Applicable None - Not defined
Host Port Flags Age Type Address(es)
Router#
Le routeur a bien pris en compte les informations fournies par le DHCP: routeur par défaut, serveur DNS…
- Quelques tests:
Router#ping 192.168.100.62
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.100.62, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 1/8/20 ms
Router#show ip arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.100.62 0 000f.23a1.5741 ARPA FastEthernet0/0
Internet 192.168.100.50 - c802.3a03.0000 ARPA FastEthernet0/0
Internet 192.168.0.254 - c802.3a03.0001 ARPA FastEthernet0/1
Router#ping 8.8.8.8
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 8.8.8.8, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 41/50/64 ms
Router#ping www.google.com
Translating "www.google.com"...domain server (192.168.100.62) [OK]
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 209.85.229.105, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 40/40/40 ms
Router#traceroute www.google.com
Type escape sequence to abort.
Tracing the route to www.l.google.com (209.85.229.105)
1 192.168.100.62 4 msec 4 msec 0 msec
2 192.168.10.1 4 msec 4 msec 4 msec
3 82.245.189.254 24 msec 25 msec 24 msec
4 213.228.37.190 20 msec 24 msec 24 msec
5 rennes-6k-1-po3.intf.routers.proxad.net (212.27.57.85) 24 msec 24 msec 28 msec
6 cbv-6k-2-v804.intf.routers.proxad.net (212.27.50.141) 32 msec 32 msec *
7 74.125.50.116 32 msec 32 msec 32 msec
8 209.85.250.142 32 msec
209.85.251.40 148 msec 32 msec
9 209.85.243.111 40 msec
216.239.43.233 48 msec 49 msec
10 209.85.251.231 40 msec 40 msec
209.85.252.83 36 msec
11 * * *
12 www.l.google.com (209.85.229.105) 36 msec 32 msec 40 msec
Router#show hosts
Default domain is not set
Name/address lookup uses domain service
Name servers are 192.168.100.62
Codes: UN - unknown, EX - expired, OK - OK, ?? - revalidate
temp - temporary, perm - permanent
NA - Not Applicable None - Not defined
Host Port Flags Age Type Address(es)
cbv-6k-2-v804.intf.router None (temp, OK) 0 IP 212.27.50.141
rennes-6k-1-po3.intf.rout None (temp, OK) 0 IP 212.27.57.85
www.l.google.com None (temp, OK) 0 IP 209.85.229.105
209.85.229.104
209.85.229.106
209.85.229.103
209.85.229.99
209.85.229.147
www.google.com
Router#show arp
Protocol Address Age (min) Hardware Addr Type Interface
Internet 192.168.100.62 1 000f.23a1.5741 ARPA FastEthernet0/0
Internet 192.168.100.50 - c802.3a03.0000 ARPA FastEthernet0/0
Internet 192.168.0.254 - c802.3a03.0001 ARPA FastEthernet0/1
Router#
- Sauvegarde de la configuration:
Router#copy running-config startup-config Destination filename [startup-config]? Building configuration... [OK] Router#
Voila, le routeur est configuré pour 2 interfaces, est capable de résoudre les noms, et de communiquer avec d’autres machines sur Internet.
Commentaires