Instructor:Mr.Zhang
硬件配置
路由器:2620XM 3台
交换机:2960-24 1台
实验拓扑
#Ciso Packet Tracer中路由器添加的是NM-4E模块
IP地址分配
设备 |
接口 |
IP地址/掩码 |
R1 |
E1/0 |
13.3.0.1/24 |
R1 |
E1/1 |
13.3.123.1/24 |
R2 |
E1/1 |
13.3.123.2/24 |
R2 |
Loopback0 |
13.3.20.1/24 |
R2 |
Loopback1 |
13.3.21.1/24 |
R3 |
E1/1 |
13.3.123.3/24 |
R3 |
Loopback0 |
13.3.22.1/24 |
R3 |
Loopback1 |
13.3.23.1/24 |
*** 要使配置重启生效,切记配置完成后 #write ***
实验步骤
一、步骤1
根据拓扑图,配置R1、R2和R3的主机名和接口,保证直连接口能正常通信
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R1
R1(config)#interface ethernet 1/0
R1(config-if)#no shutdown
R1(config-if)#ip address 13.3.0.1 255.255.255.0
R1(config-if)#exit
R1(config)#interface ethernet 1/1
R1(config-if)#ip address 13.3.123.1 255.255.255.0
R1(config-if)#no shutdown
%LINK-5-CHANGED: Interface Ethernet1/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1/1, changed state to up
R1(config-if)#exit
R1(config)#%LINK-5-CHANGED: Interface Ethernet1/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1/0, changed state to up
R1(config-if)#
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R2
R2(config)#interface ethernet 1/0
R2(config-if)#no shutdown
%LINK-5-CHANGED: Interface Ethernet1/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1/0, changed state to up
R2(config-if)#ip address 13.3.123.2 255.255.255.0
R2(config-if)#exit
R2(config)#interface loopback 0
%LINK-5-CHANGED: Interface Loopback0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
R2(config-if)#ip address 13.3.20.1 255.255.255.0
R2(config-if)#no shutdown
//loopback接口配置好IP地址后接口自动打开,可以省略no shutdown
R2(config-if)#exit
R2(config)#interface loopback 1
%LINK-5-CHANGED: Interface Loopback1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
R2(config-if)#ip address 13.3.21.1 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#
Router>enable
Router#configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
Router(config)#hostname R3
R3(config)#interface ethernet 1/0
R3(config-if)#no shutdown
%LINK-5-CHANGED: Interface Ethernet1/0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet1/0, changed state to up
R3(config-if)#ip address 13.3.123.3 255.255.255.0
R3(config-if)#exit
R3(config)#interface loopback 0
R3(config-if)#
%LINK-5-CHANGED: Interface Loopback0, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback0, changed state to up
R3(config-if)#ip address 13.3.22.1 255.255.255.0
R3(config)#interface loopback 1
%LINK-5-CHANGED: Interface Loopback1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface Loopback1, changed state to up
R3(config-if)#ip address 13.3.23.1 255.255.255.0
R3(config-if)#exit
R3(config)#
测试
R1#ping 13.3.123.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 13.3.123.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/7/10 ms
R1#ping 13.3.123.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 13.3.123.3, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 3/8/12 ms
R1#
R2#ping 13.3.123.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 13.3.123.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 7/8/10 ms
R2#ping 13.3.123.3
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 13.3.123.3, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 4/22/40 ms
R2#
R3#ping 13.3.123.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 13.3.123.1, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 5/7/10 ms
R3#ping 13.3.123.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 13.3.123.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 2/20/40 ms
R3#