Bài lab cấu hình Ripv2 dùng layer3 switch TN 210816
Đề bài
Bài làm
Router>
Router>
Router>en
Router#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hos
Router(config)#hostname R1
R1(config)#ena
R1(config)#enable pas
R1(config)#enable password cisco
R1(config)#li
R1(config)#line con
R1(config)#line console 0
R1(config-line)#pas
R1(config-line)#password cisco
R1(config-line)#exit
R1(config)#li
R1(config)#line vt
R1(config)#line vty 0 4
R1(config-line)#pas
R1(config-line)#password cisco
R1(config-line)#exit
R1(config)#int f0/0
R1(config-if)#no shut
R1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up
R1(config-if)#ip add
R1(config-if)#ip address 192.168.2.1 255.255.255.0
R1(config-if)#int f0/1
R1(config-if)#no shut
R1(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
R1(config-if)#ip add 192.168.3.1 255.255.255.0
R1(config-if)#exit
R1(config)#router rip
R1(config-router)#ver
R1(config-router)#version 2
R1(config-router)#no au
R1(config-router)#no auto-summary
R1(config-router)#net
R1(config-router)#network 192.168.2.0
R1(config-router)#network 192.168.3.0
R1(config-router)#exit
R1(config)#exit
R1#
%SYS-5-CONFIG_I: Configured from console by console
R1#wr
Building configuration…
[OK]
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 192.168.2.0/24 is directly connected, FastEthernet0/0
C 192.168.3.0/24 is directly connected, FastEthernet0/1
R1#
Switch>
Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hos
Switch(config)#hostname S1
S1(config)#ena
S1(config)#enable pas
S1(config)#enable password cisco
S1(config)#li
S1(config)#line con
S1(config)#line console 0
S1(config-line)#pas
S1(config-line)#password cisco
S1(config-line)#exit
S1(config)#li
S1(config)#line vt
S1(config)#line vty 0 4
S1(config-line)#pas
S1(config-line)#password cisco
S1(config-line)#exit
S1(config)#ip routi
S1(config)#ip routing
S1(config)#int f0/1
S1(config-if)#no sw
S1(config-if)#no switchport
S1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
S1(config-if)#ip add 192.168.2.11 255.255.255.0
S1(config-if)#int f0/2
S1(config-if)#no sw
S1(config-if)#no switchport
S1(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
S1(config-if)#ip add
S1(config-if)#ip address 192.168.1.11 255.255.255.0
S1(config-if)#exit
S1(config)#router r
S1(config)#router rip
S1(config-router)#ver
S1(config-router)#version 2
S1(config-router)#no au
S1(config-router)#no auto-summary
S1(config-router)#net
S1(config-router)#network 192.168.1.0
S1(config-router)#network 192.168.2.0
S1(config-router)#exit
S1(config)#exit
S1#
%SYS-5-CONFIG_I: Configured from console by console
S1#wr
Building configuration…
[OK]
S1#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 192.168.1.0/24 is directly connected, FastEthernet0/2
C 192.168.2.0/24 is directly connected, FastEthernet0/1
R 192.168.3.0/24 [120/1] via 192.168.2.1, 00:00:08, FastEthernet0/1
S1#
Switch>
Switch>en
Switch#conf t
Enter configuration commands, one per line. End with CNTL/Z.
Switch(config)#hos
Switch(config)#hostname S2
S2(config)#ena
S2(config)#enable pas
S2(config)#enable password cisco
S2(config)#li
S2(config)#line con
S2(config)#line console 0
S2(config-line)#pas
S2(config-line)#password cisco
S2(config-line)#li
S2(config-line)#exit
S2(config)#li
S2(config)#line vty 0 4
S2(config-line)#pas
S2(config-line)#password cisco
S2(config-line)#exit
S2(config)#ip routi
S2(config)#ip routing
S2(config)#router rip
S2(config-router)#ver
% Incomplete command.
S2(config-router)#ver 2
S2(config-router)#no
S2(config-router)#no
S2(config-router)#no
S2(config-router)#no au
S2(config-router)#no auto-summary
S2(config-router)#netw
S2(config-router)#network 192.168.4.0
S2(config-router)#network 192.168.3.0
S2(config-router)#exit
S2(config)#int f0/2
S2(config-if)#no sw
S2(config-if)#no switchport
S2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/2, changed state to up
S2(config-if)#ip add 192.168.4.12 255.255.255.0
S2(config-if)#exit
S2(config)#int f0/1
S2(config-if)#no sw
S2(config-if)#no switchport
S2(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to down
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
S2(config-if)#ip add 192.168.3.12 255.255.255.0
S2(config-if)#exit
S2(config)#exit
S2#
%SYS-5-CONFIG_I: Configured from console by console
S2#wr
Building configuration…
[OK]
S2#
S2#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
R 192.168.1.0/24 [120/2] via 192.168.3.1, 00:00:18, FastEthernet0/1
R 192.168.2.0/24 [120/1] via 192.168.3.1, 00:00:18, FastEthernet0/1
C 192.168.3.0/24 is directly connected, FastEthernet0/1
C 192.168.4.0/24 is directly connected, FastEthernet0/2
S2#