任务 2:配置思科路由器的基本参数

栏目:实验 1 Cisco 网络设备基本管理 作者:administrator 时间:2023-11-14 09:21:54

步骤 1:进入 R1 的命令行界面 

步骤 2:进入 R1 的全局配置模式

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

步骤 3:使用 hostname 命令,设置路由器的主机名 

Router(config)#hostname R1 
R1(config)#

步骤 4:进入 R2 的命令行界面,如果出现以下询问,输入”no“ 

% Please answer 'yes' or 'no'. 
Would you like to enter the initial configuration dialog? [yes/no]: no

步骤 5:进入 R2 的全局配置模式

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

步骤 6:设置 R2 的主机名 

Router(config)#hostname R2 
R2(config)#

步骤 7:进入 R1 FastEthernet0/0 接口(如果没有 FastEthernet0/0,则进入 Ethernet0/0),配置 IP 地址为 192.168.1.1,掩码为 255.255.255.0,并开启接口 

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

步骤 8:进入 R2 FastEthernet0/0 接口(如果没有 FastEthernet0/0,则进入 Ethernet0/0),配置 IP 地址为 192.168.1.2,掩码为 255.255.255.0,并开启接口 

R2(config)#interface fastEthernet 0/0 
R2(config-if)#ip address 192.168.1.2 255.255.255.0 
R2(config-if)#no shutdown 
R2(config-if)#exit

步骤 9:检查 R1 的接口状态,确认 Fa0/0(或 E0/0)的状态是 UP

R1#show ip interface brief
Interface              IP-Address      OK? Method Status                           Protocol
FastEthernet0/0        192.168.1.1     YES manual up                               up
FastEthernet0/1        unassigned      YES unset  administratively down            down

步骤 10:检查 R2 的接口状态,确认 Fa0/0(或 E0/0)的状态是 UPR2#show ip interface brief

Interface              IP-Address      OK? Method Status                          Protocol
FastEthernet0/0        192.168.1.2     YES manual up                              up
FastEthernet0/1        unassigned      YES unset  administratively down           down

步骤 11:使用 show protocols,也可以检查接口状

R1#show protocols
Global values:
Internet Protocol routing is enabled
FastEthernet0/0 is up, line protocol is up
Internet address is 192.168.1.1/24
FastEthernet0/1 is administratively down, line protocol is down
Vlan1 is administratively down, line protocol is down

步骤 12:在 R1 上,使用 ping 命令,测试能否和 192.168.1.2R2)互相通信

R1#ping 192.168.1.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.2, timeout is 2 seconds:
.!!!!
Success rate is 80 percent (4/5), round-trip min/avg/max = 0/0/0 ms

"!"表示发出的 ping 包得到了相应(能 ping 通),“.”表示发出的 ping 包无法得到相应。 如果是第一次 ping,可能会出现第一个是".",后面会出现“!"

阅读:239次

我要留言

  

分类栏目