Está en la página 1de 10

Lab 2.

1: Basic Static Route Configuration


Topology Diagram

Addressing Table
Device

Interface

IP Address

Subnet Mask

Default Gateway

Fa0/0

172.16.3.1

255.255.255.0

N/A

S0/0/0

172.16.2.1

255.255.255.0

N/A

Fa0/0

172.16.1.1

255.255.255.0

N/A

S0/0/0

172.16.2.2

255.255.255.0

N/A

S0/0/1

192.168.1.2

255.255.255.0

N/A

FA0/0

192.168.2.1

255.255.255.0

N/A

S0/0/1

192.168.1.1

255.255.255.0

N/A

PC1

NIC

172.16.3.10

255.255.255.0

172.16.3.1

PC2

NIC

172.16.1.10

255.255.255.0

172.16.1.1

PC3

NIC

192.168.2.10

255.255.255.0

192.168.2.1

R1

R2

R3

Mc tiu

Gn Cable theo yu cu ca s LAB Topology Diagram.

Erase startup configuration v reload cho router v trang thi default.

Cu hnh cc thng s c bn cho router.

Cu hnh v kch hot cho cc Serial v Ethernet interfaces.

Kim tra kt ni.

Cu hnh static route dng a ch ca next hop.

Cu hnh static route dng exit interface.

Cu hnh default static route.


Page 1 of 10

CCNA Lab
Routing Protocols and Concepts

Lab 2.1: Basic Static Route Configuration

Cu hnh summary static route.

1. Cable, Erase, v Reload the Routers.


Step 1: Gn cable theo nh s mng.
Step 2: Clear tp tin configuration trn cc router.
Dng lnh : erase startup-config . Sau dng lnh reload router c cu hnh mc nh.
Chn no nu yu cu lu cc thay i.

2. Cu hnh c bn cho Router.


Step 1: Use global configuration commands.
Trn mi routers, vo global configuration mode v thc hin cu hnh vi cc lnh sau:

hostname

enable secret

enable password

Step 2: Cu hnh password cho cc cng console v virtual terminal line trn mi router.

password

login

Step 3: Dng thm lnh logging synchronous ti cc cng console v virtual terminal lines.
Lnh ny rt u ch cho c lab v mi trng thc cc thng ip ca h thng khng chn vo du
nhc lnh ti cc cng console, aux hoc vty.
Router(config-line)#logging synchronous
Cu hnh trn R2:
R1(config)#line console 0
R1(config-line)#logging synchronous
R1(config-line)#line vty 0 4
R1(config-line)#logging synchronous
V d : Khi cu cha cu hnh cho R1 lnh ny trn line console v bt u vo cu hnh cho interface
F0/0 th cc thng ip ca Router s chn vo du nhc lnh:
R1(config)#interface fastethernet 0/0
R1(config-if)#ip address 172.16.3.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#descri
*Mar 1 01:16:08.212: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed
state to up
*Mar 1 01:16:09.214: %LINEPROTO-5-UPDOWN: Line protocol on Interface
FastEthernet0/0, changed state to upption
R1(config-if)#
Nu dng lnh logging synchronous th vn cu hnh trn s khng b ngt
v chn thng ip ca IOS router.
R1(config)#interface fastethernet 0/0
Page 2 of 10

CCNA Lab
Routing Protocols and Concepts

Lab 2.1: Basic Static Route Configuration

R1(config-if)#ip address 172.16.3.1 255.255.255.0


R1(config-if)#no shutdown
R1(config-if)#description
*Mar 1 01:28:04.242: %LINK-3-UPDOWN: Interface FastEthernet0/0, changed
state to up
*Mar 1 01:28:05.243: %LINEPROTO-5-UPDOWN: Line protocol on Interface
FastEthernet0/0, changed state to up
R1(config-if)#description <-- Keyboard input copied after message
Step 4: Thm lnh exec-timeout vo cng console v virtual terminal lines.
thit lp khong thi gian bt u t lc Router pht hin ngi qun tr khng nhp k t vo cu
hnh n lc router t logoff bo v trnh khi cc tn cng, chng ta c th dng lnh exectimeout theo c php sau y:
Router(config-line)#exec-timeout minutes [seconds]
Nu dng exec-timeout 0 0 s gip cho router khng bao gi timeout.
R1(config)#line console 0
R1(config-line)#exec-timeout 0 0
R1(config-line)#line vty 0 4
R1(config-line)#exec-timeout 0 0

3. Cu hnh cc Interface cho Router 1, Router 2 v Router 3


Step 1: Vo Interface configuration mode cho LAN interface ca R1.
R1#configure terminal
Enter configuration commands, one per line.
R1(config)#interface fastethernet 0/0

End with CNTL/Z.

Cu hnh IP address nh trong s mng.


R1(config-if)#ip address 172.16.3.1 255.255.255.0
R1(config-if)#no shutdown
%LINK-3-UPDOWN: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed
state to up

Step 2: Kim tra Routing table trn 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
C

172.16.0.0/24 is subnetted, 1 subnets


172.16.3.0 is directly connected, FastEthernet0/0

Step 3: Vo interface configuration mode cho R1s WAN interface kt ni n R2.


R1#configure terminal
Enter configuration commands, one per line.
Page 3 of 10

End with CNTL/Z.

CCNA Lab
Routing Protocols and Concepts

Lab 2.1: Basic Static Route Configuration

R1(config)#interface Serial 0/0/0


R1(config-if)#ip address 172.16.2.1 255.255.255.0
R1(config-if)#no shutdown
Step 4: Dng lnh clock rate trn R1.
Bi v R1 l pha DCE side nn chng ta phi ch nh tc xung ng h truyn cc bit gia R1 v
R2 l 64000 bps.
R1(config-if)#clock rate 64000
%LINK-3-UPDOWN: Interface Serial0/0/0, changed state to down

Step 5: Cu hnh tng t cho R2 trn cc interface


R2#configure terminal
Enter configuration commands, one per line.
R2(config)#interface serial 0/0/0

End with CNTL/Z.

R2(config-if)#ip address 172.16.2.2 255.255.255.0


R2(config-if)#no shutdown
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to
up
R2(config)#interface serial 0/0/1
R2(config-if)#ip address 192.168.1.2 255.255.255.0
R2(config-if)#no shutdown
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial0/0/0, changed state to
up
R2(config)#interface fastethernet 0/0
R2(config-if)#ip address 172.16.1.1 255.255.255.0
R2(config-if)#no shutdown

Step 6: Cu hnh cc Interface cho R3


Cu hnh tng t nh R1 v R2.
Step 7: Kim tra routing table cho R1, R2 v R3.
R1#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 not set
C
C

172.16.0.0/24 is subnetted, 2 subnets


172.16.2.0 is directly connected, Serial0/0/0
172.16.3.0 is directly connected, FastEthernet0/0

Page 4 of 10

CCNA Lab
Routing Protocols and Concepts

Lab 2.1: Basic Static Route Configuration

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 not set
C
C
C

172.16.0.0/24 is subnetted, 1 subnets


172.16.2.0 is directly connected, Serial0/0/0
172.16.1.0 is directly connected, FastEthernet0/0
192.168.1.0 is directly connected, Serial0/0/1

4. Cu hnh IP cho cc PC.


Step 1: Cu hnh PC1.
IP address of 172.16.3.10/24 v default gateway 172.16.3.1.
Step 2: Configure the host PC2.
IP address of 172.16.1.10/24 v default gateway 172.16.1.1.
Step 3: Configure the host PC3.
IP address of 192.168.2.10/24 v default gateway 192.168.2.1.

5. Kim tra cu hnh Configurations.


Step 1: Kim tra kt ni.
Kim tra kt ni dng lnh ping t mi PC n default gateway ca n.
Step 2: Kim tra kt ni gia cc router kt ni trc tip.
T router R2, ping n R1 bng lnh ping 172.16.2.1?
T router R2, ping n R3 bng lnh ping 192.168.1.1?
Step 3: Kim tra kt ni gia cc thit b khng kt ni trc tip.
T PC3, ping n PC1? Cho bit kt qu? _

T PC3, ping n PC2? Cho bit kt qu?

6. Cu hnh Static Route dng Next-Hop Address.


Step 1: cu hnh static routes vi IP address ca next-hop dng c php sau:
Router(config)# ip route network-address subnet-mask ip-address

network-address:Destination network address of the remote network to be added to the


routing table.
Page 5 of 10

CCNA Lab
Routing Protocols and Concepts

Lab 2.1: Basic Static Route Configuration

subnet-maskSubnet mask of the remote network to be added to the routing table. The subnet
mask can be modified to summarize a group of networks.

ip-addressCommonly referred to as the next-hop routers IP address.

Trn R3 router, cu hnh static route cho mng ch 172.16.1.0 dng IP ca Serial 0/0/1 interface ca R2
nh l next-hop address.
R3(config)#ip route 172.16.1.0 255.255.255.0 192.168.1.2
Step 2: xem routing table kim tra c static route mi cha?
R3#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, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
S
C
C
R3#

172.16.0.0/24 is subnetted, 1 subnets


172.16.1.0 [1/0] via 192.168.1.2
192.168.1.0/24 is directly connected, Serial0/0/1
192.168.2.0/24 is directly connected, FastEthernet0/0

Step 3: Dng ping kim tra kt ni gia PC3 v PC2.


T PC3, ping n PC2? _
Ping s thng bo l request timeout. Bi v PC2 gi gi tin tr li cho PC3 nhng R2 s khng bit
ng no chuyn n PC3 v R2 khng c route no n 192.168.2.0 trong routing table.
Step 4: Trn R2 router, cu hnh static route n mng 192.168.2.0.
Next-hop address i vi R2 n gi gi tin c ch n mng 192.168.2.0/24 l g?
R2(config)#ip route 192.168.2.0 255.255.255.0
R2(config)#
Step 5: Xem routing table trn 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, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
C
C
C
S

172.16.0.0/24 is subnetted, 2 subnets


172.16.1.0 is directly connected, FastEthernet0/0
172.16.2.0 is directly connected, Serial0/0/0
192.168.1.0/24 is directly connected, Serial0/0/1
192.168.2.0/24 [1/0] via 192.168.1.1
Page 6 of 10

CCNA Lab
Routing Protocols and Concepts

Lab 2.1: Basic Static Route Configuration

R2#
Step 6: ping kim tra li gia host PC3 v host PC2.
T PC3, ping n PC2 thn cng.

7. Cu hnh Static Route dng Exit Interface.


C php:
Router(config)# ip route network-address subnet-mask exit-interface

network-addressDestination network address of the remote network to be added to the


routing table.

subnet-maskSubnet mask of the remote network to be added to the routing table. The subnet
mask can be modified to summarize a group of networks.

exit-interfaceOutgoing interface that would be used in forwarding packets to the


destination network.

Step 1: Trn R3 router, configure a static route.


Trn R3 router, cu hnh static route n mng 172.16.2.0 dng Serial 0/0/0 interface ca R3 router nh
l exit interface.
R3(config)# ip route 172.16.2.0 255.255.255.0 Serial0/0/1
R3(config)#
Step 2: Xem routing table.
R3#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, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
S
S
C
C
R3#

172.16.0.0/24 is subnetted, 2 subnets


172.16.1.0 [1/0] via 192.168.1.2
172.16.2.0 is directly connected, Serial0/0/1
192.168.1.0/24 is directly connected, Serial0/0/1
192.168.2.0/24 is directly connected, FastEthernet0/0

R3#show running-config
Building configuration...
<output omitted>
!
hostname R3
!
interface FastEthernet0/0
ip address 192.168.2.1 255.255.255.0
!
interface Serial0/0/0
Page 7 of 10

CCNA Lab
Routing Protocols and Concepts

Lab 2.1: Basic Static Route Configuration

no ip address
shutdown
!
interface Serial0/0/1
ip address 192.168.1.1 255.255.255.0
!
ip route 172.16.1.0 255.255.255.0 192.168.1.2
ip route 172.16.2.0 255.255.255.0 Serial0/0/1
!
end
Step 3: Trn R2 router, cu hnh static route.
Trn R2 router, cu hnh static route n mng 172.16.3.0 dng Serial 0/0/0 interface ca R2 router nh
l exit interface.
R2(config)# ip route 172.16.3.0 255.255.255.0 Serial0/0/0
R2(config)#
Step 4: Xem routing table.
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, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is not set
C
C
S
C
S
R2#

172.16.0.0/24 is subnetted, 3 subnets


172.16.1.0 is directly connected, FastEthernet0/0
172.16.2.0 is directly connected, Serial0/0/0
172.16.3.0 is directly connected, Serial0/0/0
192.168.1.0/24 is directly connected, Serial0/0/1
192.168.2.0/24 [1/0] via 192.168.1.1

Step 5: Dng ping kim tra kt ni gia PC2 v PC1.


ping s tht bi v R1 router khng c route n mng 172.16.1.0 trong routing table.

8. Cu hnh Default Static Route.


Trong cc phn trn chng ta c uhi2nh cho router ch ng n mng ch no bit trc.
Nu nh Router ca chng ta kt ni vo mng Internet (thuc loi Stub network) th a ch mng ch
chng ta khng th bit trc ht c. Do gim thiu kch c bng Routing table chng ta dng
default static route.
cu hnh default static route, dng c php:
Router(config)#ip route 0.0.0.0 0.0.0.0 { ip-address | interface }

Step 1: Cu hnh R1 router vi default route.


Cu hnh R1 router vi default route dng Serial 0/0/0 interface ca R2 nh next-hop interface IP.
Page 8 of 10

CCNA Lab
Routing Protocols and Concepts

Lab 2.1: Basic Static Route Configuration

R1(config)#ip route 0.0.0.0 0.0.0.0 172.16.2.2


R1(config)#

Step 2: Xem routing table


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, * - candidate default
U - per-user static route, o - ODR
Gateway of last resort is 172.16.2.2 to network 0.0.0.0
C
C
S*
R1#

172.16.0.0/24 is subnetted, 2 subnets


172.16.2.0 is directly connected, Serial0/0/0
172.16.3.0 is directly connected, FastEthernet0/0
0.0.0.0/0 [1/0] via 172.16.2.2

Step 3: Dng lnh ping kim tra kt ni gia PC2 v PC1.


T PC2, chng ta c th ping PC1 thnh cng.
T PC3, chng ta c th ping PC1 khng thnh cng

9.Cu hnh Summary Static Route.


Chng ta c th cu hnh mt static route khc na trn R3 cho mng ch 172.16.3.0 PC3 kt ni ti
PC1 thnh cng. Tuy nhin chng ta cu hnh n hai static routes n mng 172.16.2.0/24 v
172.16.1.0/24. Bi v cc network ny cnh nhau, v chng ta c th tm gn li thnh mt route m thi.
Lc ny s gip gim kch c ca routing tables, v lm cho qu trnh nh tuyn hiu qu hn.
Cch tm lc:
172.16.1.0
172.16.2.0
172.16.3.0

10101100.00010000.00000001.00000000
10101100.00010000.00000010.00000000
10101100.00010000.00000011.00000000

Tm s bit ging nhau t tri sang , tt c cc bit cn li s cho gi tr l bit 0. Ta thy a ch i din l
172.16.0.0, v c 22 bit ging nhau nn:
Prefix

172.16.0.0 v

Network mask l 22 bit ( v c 22 bit ging hau t tri sang )


Bit Mask 11111111.11111111.11111100.00000000
Suy ra
Mask

255.255.252.0

Step 1: cu hnh summary static route trn R3 router.


R3(config)#ip route 172.16.0.0 255.255.252.0 192.168.1.2

Page 9 of 10

CCNA Lab
Routing Protocols and Concepts

Lab 2.1: Basic Static Route Configuration

Step 2: Kim tra summary route trong routing table.


R3# 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
S
S
S
C
C

172.16.0.0/16 is variably subnetted, 3 subnets, 2 masks


172.16.0.0/22 [1/0] via 192.168.1.2
172.16.1.0/24 [1/0] via 192.168.1.2
172.16.2.0/24 is directly connected, Serial0/0/1
192.168.1.0/24 is directly connected, Serial0/0/1
192.168.2.0/24 is directly connected, FastEthernet0/0

Step 3: Xa static routes trn R3.


Remove 2 static routes dng lnh no
R3(config)#no ip route 172.16.1.0 255.255.255.0 192.168.1.2
R3(config)#no ip route 172.16.2.0 255.255.255.0 Serial0/0/0
Step 4: Kim tra li.
R3#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
S
C
C

172.16.0.0/22 is subnetted, 1 subnets


172.16.0.0 [1/0] via 192.168.1.2
192.168.1.0/24 is directly connected, Serial0/0/1
192.168.2.0/24 is directly connected, FastEthernet0/0

Step 5: Dng lnh ping kim tra PC3 v PC1.


T PC3, c th ping n PC1 thnh cng.

Page 10 of 10

También podría gustarte