【网络设备配置与管理实验一】PT设置主机名,IP地址

一、实验目的

通过本实验,可以掌握以下技能:

  • 配置接口IP地址。
  • 配置路由器主机名。

二、设备需求

  • Cisco路由器1台,
  • 1台带有超级终端程序的PC机,以及Console电缆及转接器。

三、拓扑结构及接口IP配置

1. 设置主机名、描述、IP地址和始终速率

  1. 进入特权模式,使用hostname命令来修改主机名,使用console线连接路由器和pc机

拓扑结构为:

拓扑结构1
  1. 使用banner命令来设置一个网络管理员可以看到的标志区。

拓扑结构和拓扑结构1一样。

  1. 使用ip address命令可以为一个接口添加IP地址。

拓扑结构如下:

拓扑结构2
接口及IP地址
  1. 使用description命令为一个接口添加标识

拓扑结构及实验结果如下:

拓扑结构3及实验结果
  1. 当模拟一个DCE的WAN链接时,可以为一个串行链路添加带宽和时钟速率

拓扑结构如下:

拓扑结构4

四、实验配置文档

步骤1配置命令:

Router>enable 
Router#config
Router#configure term
Router#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router(config)#hostname Router-sjt
Router-sjt(config)#^Z
Router-sjt#
%SYS-5-CONFIG_I: Configured from console by console
Router-sjt#copy runn
Router-sjt#copy running-config st
Router-sjt#copy running-config startup-config 
Destination filename [startup-config]? 
Building configuration...
[OK]
Router-sjt#

步骤2配置命令:

Router-sjt>enable 
Router-sjt#conf
Router-sjt#configure te
Router-sjt#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router-sjt(config)#bann
Router-sjt(config)#banner mo
Router-sjt(config)#banner motd #
Enter TEXT message.  End with the character '#'.
WARNING
You are connected to $(hostname) on the cisco system ,incorporated network.
Unauthorized access and use of this network will be vigorously parosecuted.
#
Router-sjt(config)#^Z
Router-sjt#
%SYS-5-CONFIG_I: Configured from console by console
Router-sjt#exit
Router-sjt con0 is now available
Press RETURN to get started.
WARNING
You are connected to Router-sjt on the cisco system ,incorporated network.
Unauthorized access and use of this network will be vigorously parosecuted.
Router-sjt>

步骤3配置命令:

Router-sjt>en
Router-sjt>enable 
Router-sjt#conf
Router-sjt#configure te
Router-sjt#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router-sjt(config)#inte
Router-sjt(config)#interface F
Router-sjt(config)#interface FastEthernet 0/0
Router-sjt(config-if)#ip add
Router-sjt(config-if)#ip address 192.168.75.1 255.255.255.0
Router-sjt(config-if)#no shut
Router-sjt(config-if)#no shutdown 
Router-sjt(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
Router-sjt(config-if)#end
Router-sjt#
%SYS-5-CONFIG_I: Configured from console by console
Router-sjt#show int
Router-sjt#show interfaces Fa
Router-sjt#show interfaces FastEthernet 0/0
FastEthernet0/0 is up, line protocol is up (connected)
  Hardware is Lance, address is 0004.9ab2.4781 (bia 0004.9ab2.4781)
  Internet address is 192.168.75.1/24
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Full-duplex, 100Mb/s, media type is RJ45
  ARP type: ARPA, ARP Timeout 04:00:00, 
  Last input 00:00:08, output 00:00:05, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0 (size/max/drops); Total output drops: 0
  Queueing strategy: fifo
  Output queue :0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     0 packets input, 0 bytes, 0 no buffer
     Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     0 input packets with dribble condition detected
     0 packets output, 0 bytes, 0 underruns
     0 output errors, 0 collisions, 1 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
Router-sjt#

步骤4配置命令:

Router-sjt>ena
Router-sjt>enable 
Router-sjt#confi
Router-sjt#configure ter
Router-sjt#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router-sjt(config)#int F
Router-sjt(config)#int FastEthernet 0/0
Router-sjt(config-if)#des
Router-sjt(config-if)#description 2015122075
Router-sjt(config-if)#exit
Router-sjt(config)#exit
Router-sjt#
%SYS-5-CONFIG_I: Configured from console by console
Router-sjt#show in
Router-sjt#show interfaces F
Router-sjt#show interfaces FastEthernet 0/0
FastEthernet0/0 is up, line protocol is up (connected)
  Hardware is Lance, address is 0004.9ab2.4781 (bia 0004.9ab2.4781)
  Description: 2015122075
  Internet address is 192.168.75.1/24
  MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation ARPA, loopback not set
  Full-duplex, 100Mb/s, media type is RJ45
  ARP type: ARPA, ARP Timeout 04:00:00, 
  Last input 00:00:08, output 00:00:05, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0 (size/max/drops); Total output drops: 0
  Queueing strategy: fifo
  Output queue :0/40 (size/max)
  5 minute input rate 0 bits/sec, 0 packets/sec
  5 minute output rate 0 bits/sec, 0 packets/sec
     0 packets input, 0 bytes, 0 no buffer
     Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     0 input packets with dribble condition detected
     0 packets output, 0 bytes, 0 underruns
     0 output errors, 0 collisions, 1 interface resets
     0 babbles, 0 late collision, 0 deferred
     0 lost carrier, 0 no carrier
     0 output buffer failures, 0 output buffers swapped out
Router-sjt#

步骤5配置命令:

Router9:
Router-sjt>en
Router-sjt>enable 
Router-sjt#conf
Router-sjt#configure ter
Router-sjt#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router-sjt(config)#in
Router-sjt(config)#interface se
Router-sjt(config)#interface serial 2/0
Router-sjt(config-if)#ip ad
Router-sjt(config-if)#ip address 192.168.123.1 255.255.255.0
Router-sjt(config-if)#no shu
Router-sjt(config-if)#no shutdown 
Router-sjt(config-if)#end
Router-sjt#
%SYS-5-CONFIG_I: Configured from console by console
Router-sjt#show interfaces serial 2/0
Serial2/0 is up, line protocol is up (connected)
  Hardware is HD64570
  Internet address is 192.168.123.1/24
  MTU 1500 bytes, BW 128 Kbit, DLY 20000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation HDLC, loopback not set, keepalive set (10 sec)
  Last input never, output never, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0 (size/max/drops); Total output drops: 0
  Queueing strategy: weighted fair
  Output queue: 0/1000/64/0 (size/max total/threshold/drops)
     Conversations  0/0/256 (active/max active/max total)
     Reserved Conversations 0/0 (allocated/max allocated)
     Available Bandwidth 96 kilobits/sec
  5 minute input rate 18 bits/sec, 0 packets/sec
  5 minute output rate 18 bits/sec, 0 packets/sec
     15 packets input, 1920 bytes, 0 no buffer
     Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     15 packets output, 1920 bytes, 0 underruns
     0 output errors, 0 collisions, 1 interface resets
     0 output buffer failures, 0 output buffers swapped out
     0 carrier transitions
     DCD=up  DSR=up  DTR=up  RTS=up  CTS=up
Router-sjt#



Router10:
Router-sjt>ena
Router-sjt>enable 
Router-sjt#conf
Router-sjt#configure ter
Router-sjt#configure terminal 
Enter configuration commands, one per line.  End with CNTL/Z.
Router-sjt(config)#inte
Router-sjt(config)#interface s
Router-sjt(config)#interface serial 2/0
Router-sjt(config-if)#ip ad
Router-sjt(config-if)#ip address 192.168.123.2 255.255.255.0
Router-sjt(config-if)#cl
Router-sjt(config-if)#band
Router-sjt(config-if)#bandwidth 64
Router-sjt(config-if)#cloc
Router-sjt(config-if)#clock ra
Router-sjt(config-if)#clock rate 64000
Router-sjt(config-if)#no shutd
Router-sjt(config-if)#no shutdown 
Router-sjt(config-if)#
%LINK-5-CHANGED: Interface Serial2/0, changed state to up
Router-sjt(config-if)#
%LINEPROTO-5-UPDOWN: Line protocol on Interface Serial2/0, changed state to up
end
Router-sjt#
%SYS-5-CONFIG_I: Configured from console by console
Router-sjt#show in
Router-sjt#show interfaces s
Router-sjt#show interfaces serial 2/0
Serial2/0 is up, line protocol is up (connected)
  Hardware is HD64570
  Internet address is 192.168.123.2/24
  MTU 1500 bytes, BW 64 Kbit, DLY 20000 usec,
     reliability 255/255, txload 1/255, rxload 1/255
  Encapsulation HDLC, loopback not set, keepalive set (10 sec)
  Last input never, output never, output hang never
  Last clearing of "show interface" counters never
  Input queue: 0/75/0 (size/max/drops); Total output drops: 0
  Queueing strategy: weighted fair
  Output queue: 0/1000/64/0 (size/max total/threshold/drops)
     Conversations  0/0/256 (active/max active/max total)
     Reserved Conversations 0/0 (allocated/max allocated)
     Available Bandwidth 48 kilobits/sec
  5 minute input rate 12 bits/sec, 0 packets/sec
  5 minute output rate 12 bits/sec, 0 packets/sec
     15 packets input, 1920 bytes, 0 no buffer
     Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
     0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
     15 packets output, 1920 bytes, 0 underruns
     0 output errors, 0 collisions, 1 interface resets
     0 output buffer failures, 0 output buffers swapped out
     0 carrier transitions
     DCD=up  DSR=up  DTR=up  RTS=up  CTS=up
Router-sjt#

五、验证实验结果

  1. hostname修改成功
hostname Router-sjt
  1. 设置标志区
banner
  1. show interfaces FastEthernet 0/0后可以看到ip配置成功
show interfaces FastEthernet 0/0
  1. 可以看到接口的描述已经存在了
Description
  1. 使用ip为192.168.123.1的Router9去ping Router10,可以成功ping通
ping 192.168.123.2

六、实验总结

  1. 学会了使用pt模拟器
  2. 所有的配置操作都必须在特权模式下
  3. 对于路由器的接口需要按照实际情况来选择
  4. 如果能够相互ping通则说明配置成功,相互ping通会显示success和一堆!
  5. 连接线要看相应连接的装置和需要进行的操作,不然的话会出错
最后编辑于
©著作权归作者所有,转载或内容合作请联系作者
  • 序言:七十年代末,一起剥皮案震惊了整个滨河市,随后出现的几起案子,更是在滨河造成了极大的恐慌,老刑警刘岩,带你破解...
    沈念sama阅读 214,504评论 6 496
  • 序言:滨河连续发生了三起死亡事件,死亡现场离奇诡异,居然都是意外死亡,警方通过查阅死者的电脑和手机,发现死者居然都...
    沈念sama阅读 91,434评论 3 389
  • 文/潘晓璐 我一进店门,熙熙楼的掌柜王于贵愁眉苦脸地迎上来,“玉大人,你说我怎么就摊上这事。” “怎么了?”我有些...
    开封第一讲书人阅读 160,089评论 0 349
  • 文/不坏的土叔 我叫张陵,是天一观的道长。 经常有香客问我,道长,这世上最难降的妖魔是什么? 我笑而不...
    开封第一讲书人阅读 57,378评论 1 288
  • 正文 为了忘掉前任,我火速办了婚礼,结果婚礼上,老公的妹妹穿的比我还像新娘。我一直安慰自己,他们只是感情好,可当我...
    茶点故事阅读 66,472评论 6 386
  • 文/花漫 我一把揭开白布。 她就那样静静地躺着,像睡着了一般。 火红的嫁衣衬着肌肤如雪。 梳的纹丝不乱的头发上,一...
    开封第一讲书人阅读 50,506评论 1 292
  • 那天,我揣着相机与录音,去河边找鬼。 笑死,一个胖子当着我的面吹牛,可吹牛的内容都是我干的。 我是一名探鬼主播,决...
    沈念sama阅读 39,519评论 3 413
  • 文/苍兰香墨 我猛地睁开眼,长吁一口气:“原来是场噩梦啊……” “哼!你这毒妇竟也来了?” 一声冷哼从身侧响起,我...
    开封第一讲书人阅读 38,292评论 0 270
  • 序言:老挝万荣一对情侣失踪,失踪者是张志新(化名)和其女友刘颖,没想到半个月后,有当地人在树林里发现了一具尸体,经...
    沈念sama阅读 44,738评论 1 307
  • 正文 独居荒郊野岭守林人离奇死亡,尸身上长有42处带血的脓包…… 初始之章·张勋 以下内容为张勋视角 年9月15日...
    茶点故事阅读 37,022评论 2 329
  • 正文 我和宋清朗相恋三年,在试婚纱的时候发现自己被绿了。 大学时的朋友给我发了我未婚夫和他白月光在一起吃饭的照片。...
    茶点故事阅读 39,194评论 1 342
  • 序言:一个原本活蹦乱跳的男人离奇死亡,死状恐怖,灵堂内的尸体忽然破棺而出,到底是诈尸还是另有隐情,我是刑警宁泽,带...
    沈念sama阅读 34,873评论 5 338
  • 正文 年R本政府宣布,位于F岛的核电站,受9级特大地震影响,放射性物质发生泄漏。R本人自食恶果不足惜,却给世界环境...
    茶点故事阅读 40,536评论 3 322
  • 文/蒙蒙 一、第九天 我趴在偏房一处隐蔽的房顶上张望。 院中可真热闹,春花似锦、人声如沸。这庄子的主人今日做“春日...
    开封第一讲书人阅读 31,162评论 0 21
  • 文/苍兰香墨 我抬头看了看天上的太阳。三九已至,却和暖如春,着一层夹袄步出监牢的瞬间,已是汗流浃背。 一阵脚步声响...
    开封第一讲书人阅读 32,413评论 1 268
  • 我被黑心中介骗来泰国打工, 没想到刚下飞机就差点儿被人妖公主榨干…… 1. 我叫王不留,地道东北人。 一个月前我还...
    沈念sama阅读 47,075评论 2 365
  • 正文 我出身青楼,却偏偏与公主长得像,于是被迫代替她去往敌国和亲。 传闻我的和亲对象是个残疾皇子,可洞房花烛夜当晚...
    茶点故事阅读 44,080评论 2 352

推荐阅读更多精彩内容