Exemplu Retea PDF

Download as pdf or txt
Download as pdf or txt
You are on page 1of 9

Să se configureze echipamentele din figura de mai jos conform informațiilor

prezentate.

Configurarea hostname-ului, consolei, liniilor telnet și interfețelor pe routerul R1:

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1

R1(config)#line console 0
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit

R1(config)#line vty 0 4
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#exit

R1(config)#interface fa0/0
R1(config-if)#ip address 192.168.1.254 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit

R1(config)#interface fa1/0
R1(config-if)#ip address 192.168.10.126 255.255.255.128
R1(config-if)#no shutdown
R1(config-if)#exit

R1(config)#interface se2/0
R1(config-if)#ip address 10.10.10.1 255.255.255.252
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown

%LINK-5-CHANGED: Interface Serial2/0, changed state to down


R1(config-if)#exit

Configurarea serviciului DHCP pe routerul R1 pentru rețeaua N2:

R1(config)#ip dhcp pool N2


R1(dhcp-config)#network 192.168.10.0 255.255.255.128
R1(dhcp-config)#default-router 192.168.10.126
R1(dhcp-config)#dns-server 192.168.1.20
R1(dhcp-config)#exit

R1(config)#ip dhcp excluded-address 192.168.10.1 192.168.10.9


R1(config)#ip dhcp excluded-address 192.168.10.120 192.168.10.126

Configurarea hostname-ului, consolei, liniilor telnet și interfețelor pe routerul R2:

Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2

R2(config)#line console 0
R2(config-line)#password cisco
R2(config-line)#login
R2(config-line)#exit

R2(config)#line vty 0 4
R2(config-line)#password cisco
R2(config-line)#login
R2(config-line)#exit

R2(config)#interface fa0/0
R2(config-if)#ip address 11.1.1.206 255.255.255.240
R2(config-if)#no shutdown
R2(config-if)#ip helper-address 192.168.1.10
R2(config-if)#exit

R2(config)#interface fa1/0
R2(config-if)#ip address 11.1.1.214 255.255.255.248
R2(config-if)#no shutdown
R2(config-if)#exit

R2(config)#interface se2/0
R2(config-if)#ip address 10.10.10.2 255.255.255.252
R2(config-if)#no shutdown
R2(config-if)#exit
Configurarea serviciului DHCP pe routerul R2 pentru rețeaua N4:

R2(config)#ip dhcp pool N4


R2(dhcp-config)#network 11.1.1.208 255.255.255.248
R2(dhcp-config)#default-router 11.1.1.214
R2(dhcp-config)#dns-server 192.168.1.20
R2(dhcp-config)#exit

R2(config)#ip dhcp excluded-address 11.1.1.209


R2(config)#ip dhcp excluded-address 11.1.1.214

Configurarea serviciului DHCP pe server

Observație: Câmpul Maximum number of Users va fi completat automat odată cu apăsarea butonului Add.

Configurarea rutării statice pe cele două routere:

Pe routerul R1 vor fi configurate două rute către cele N3 și N4 care trec prin R2, iar R2 va avea doar o rută
default către toate destinațiile posibile trecând prin R1.

R1(config)#ip route 11.1.1.192 255.255.255.240 10.10.10.2


R1(config)#ip route 11.1.1.208 255.255.255.248 10.10.10.2

R2(config)#ip route 0.0.0.0 0.0.0.0 10.10.10.1

Tabela de rutare a lui R1:

R1#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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 not set

10.0.0.0/30 is subnetted, 1 subnets


C 10.10.10.0 is directly connected, Serial2/0
11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
S 11.1.1.192/28 [1/0] via 10.10.10.2
S 11.1.1.208/29 [1/0] via 10.10.10.2
C 192.168.1.0/24 is directly connected, FastEthernet0/0
192.168.10.0/25 is subnetted, 1 subnets
C 192.168.10.0 is directly connected, FastEthernet1/0

Tabela de rutare a lui R2:

R2#show ip route
Codes: C - connected, S - static, I - IGRP, 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, E - EGP
i - IS-IS, 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 10.10.10.1 to network 0.0.0.0

10.0.0.0/30 is subnetted, 1 subnets


C 10.10.10.0 is directly connected, Serial2/0
11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 11.1.1.192/28 is directly connected, FastEthernet0/0
C 11.1.1.208/29 is directly connected, FastEthernet1/0
S* 0.0.0.0/0 [1/0] via 10.10.10.1

Configurarea rutarii dinamice folosind RIP v1

Se specifică rețelele cu care se învecinează fiecare router. Optional se poate dezactiva transmiterea
pachetelor RIP pe interfețele unde nu există routere vecine.

R1(config)#router rip
R1(config-router)#network 192.168.1.0
R1(config-router)#network 192.168.10.0
R1(config-router)#network 10.10.10.0
R1(config-router)#passive-interface fa0/0
R1(config-router)#passive-interface fa1/0

R2(config)#router rip
R2(config-router)#network 11.1.1.192
R2(config-router)#network 11.1.1.208
R2(config-router)#network 10.10.10.0
R2(config-router)#passive-interface fa0/0
R2(config-router)#passive-interface fa1/0
Tabela de rutare a lui R1:

...
Gateway of last resort is not set

10.0.0.0/30 is subnetted, 1 subnets


C 10.10.10.0 is directly connected, Serial2/0
R 11.0.0.0/8 [120/1] via 10.10.10.2, 00:00:01, Serial2/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
192.168.10.0/25 is subnetted, 1 subnets
C 192.168.10.0 is directly connected, FastEthernet1/0

Tabela de rutare a lui R2:

...
Gateway of last resort is not set

10.0.0.0/30 is subnetted, 1 subnets


C 10.10.10.0 is directly connected, Serial2/0
11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 11.1.1.192/28 is directly connected, FastEthernet0/0
C 11.1.1.208/29 is directly connected, FastEthernet1/0
R 192.168.1.0/24 [120/1] via 10.10.10.1, 00:00:23, Serial2/0
R 192.168.10.0/24 [120/1] via 10.10.10.1, 00:00:23, Serial2/0

Configurarea rutarii dinamice folosind RIP v2

R1(config)#router rip
R1(config-router)#version 2
R1(config-router)#no auto-summary
R1(config-router)#network 192.168.1.0
R1(config-router)#network 192.168.10.0
R1(config-router)#network 10.10.10.0
R1(config-router)#passive-interface fa0/0
R1(config-router)#passive-interface fa1/0

R2(config)#router rip
R2(config-router)#version 2
R2(config-router)#no auto-summary
R2(config-router)#network 11.1.1.192
R2(config-router)#network 11.1.1.208
R2(config-router)#network 10.10.10.0
R2(config-router)#passive-interface fa0/0
R2(config-router)#passive-interface fa1/0

Tabela de rutare a lui R1:

...
Gateway of last resort is not set

10.0.0.0/30 is subnetted, 1 subnets


C 10.10.10.0 is directly connected, Serial2/0
11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
R 11.1.1.192/28 [120/1] via 10.10.10.2, 00:00:14, Serial2/0
R 11.1.1.208/29 [120/1] via 10.10.10.2, 00:00:14, Serial2/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
192.168.10.0/25 is subnetted, 1 subnets
C 192.168.10.0 is directly connected, FastEthernet1/0

Tabela de rutare a lui R2:

...
Gateway of last resort is not set

10.0.0.0/30 is subnetted, 1 subnets


C 10.10.10.0 is directly connected, Serial2/0
11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 11.1.1.192/28 is directly connected, FastEthernet0/0
C 11.1.1.208/29 is directly connected, FastEthernet1/0
R 192.168.1.0/24 [120/1] via 10.10.10.1, 00:00:28, Serial2/0
192.168.10.0/25 is subnetted, 1 subnets
R 192.168.10.0 [120/1] via 10.10.10.1, 00:00:28, Serial2/0

Configurarea rutarii dinamice folosind OSPF

R1(config)#router ospf 1
R1(config-router)#network 192.168.1.0 0.0.0.255 area 1
R1(config-router)#network 192.168.10.0 0.0.0.127 area 1
R1(config-router)#network 10.10.10.0 0.0.0.3 area 1
R1(config-router)#passive-interface fa0/0
R1(config-router)#passive-interface fa1/0

R2(config)#router ospf 1
R2(config-router)#network 11.1.1.192 0.0.0.15 area 1
R2(config-router)#network 11.1.1.208 0.0.0.7 area 1
R2(config-router)#network 10.10.10.0 0.0.0.3 area 1
R2(config-router)#passive-interface fa0/0
R2(config-router)#passive-interface fa1/0

Tabela de rutare a lui R1:

...
Gateway of last resort is not set

10.0.0.0/30 is subnetted, 1 subnets


C 10.10.10.0 is directly connected, Serial2/0
11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
O 11.1.1.192/28 [110/65] via 10.10.10.2, 00:01:24, Serial2/0
O 11.1.1.208/29 [110/65] via 10.10.10.2, 00:01:24, Serial2/0
C 192.168.1.0/24 is directly connected, FastEthernet0/0
192.168.10.0/25 is subnetted, 1 subnets
C 192.168.10.0 is directly connected, FastEthernet1/0

Tabela de rutare a lui R2:

...
Gateway of last resort is not set

10.0.0.0/30 is subnetted, 1 subnets


C 10.10.10.0 is directly connected, Serial2/0
11.0.0.0/8 is variably subnetted, 2 subnets, 2 masks
C 11.1.1.192/28 is directly connected, FastEthernet0/0
C 11.1.1.208/29 is directly connected, FastEthernet1/0
O 192.168.1.0/24 [110/65] via 10.10.10.1, 00:00:11, Serial2/0
192.168.10.0/25 is subnetted, 1 subnets
O 192.168.10.0 [110/65] via 10.10.10.1, 00:00:11, Serial2/0

Configurarea listelor de access (ACL) pe cele două rutere:

Cele patru restricții care apar în imagine pot fi realizate în felul următor:
1. o listă de acces simplă, numărul 14, instalată pe direcția ieșire a interfeței Fa0/1 a routerului R2

2. primele doua linii ale listei de acces extinse cu numărul 104, instalată pe interfața Fa0/1 a routerului R2 pe
directia intrare (prima linie permite accesul lui PC3 la rețeaua N2, iar a doua impiedică accesul la oricare altă
rețea).

3. linia a treia din lista de acces 104 menționată anterior.


4. lista de acces extinsă, numărul 102, instalata pe interfața Fa0/1 a routerului R1 pe direcția intrare.
R1(config)#access-list 102 deny ip 192.168.10.0 0.0.0.127 host 11.1.1.193
R1(config)#access-list 102 permit ip any any

R1(config)#interface fa1/0
R1(config-if)#ip access-group 102 in
R1(config-if)#exit

R2(config)#access-list 14 deny host 11.1.1.193


R2(config)#access-list 14 permit any

R2(config)#interface fa1/0
R2(config-if)#ip access-group 14 out
R2(config-if)#exit

R2(config)#access-list 104 permit ip host 11.1.1.209 192.168.10.0 0.0.0.127


R2(config)#access-list 104 deny ip host 11.1.1.209 any
R2(config)#access-list 104 deny tcp 11.1.1.208 0.0.0.7 host 192.168.1.100 eq www
R2(config)#access-list 104 permit ip any any

R2(config)#interface fa1/0
R2(config-if)#ip access-group 104 in
R2(config-if)#exit

Configurarea serviciului DNS pe server

Observație:
IP-urile pentru calculatoare și servere se configurează în sectiunea IP Configuration din cadrul tab-ului
Desktop corespunzătoare fiecărui echipament.

You might also like