路由器IP地址配置和Telnet配置

社区服务
高级搜索
猴岛论坛电脑百科路由器IP地址配置和Telnet配置
发帖 回复
正序阅读 最近浏览的帖子最近浏览的版块
1个回复

路由器IP地址配置和Telnet配置

楼层直达
happylove11

ZxID:1328382

等级: 上校
态度决定一切

举报 只看楼主 使用道具 楼主   发表于: 2009-05-09 0
— 本帖被 再见喜雨。 执行锁定操作(2009-05-11) —
拓扑图:


目的:
掌握基本接口ip地址配置,熟悉基本telnet登陆设置

步骤:
1.
查看相关接口连接
Router#show ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
Serial1/0 unassigned YES unset administratively down down
Serial1/1 unassigned YES unset administratively down down
Serial1/2 unassigned YES unset administratively down down
Serial1/3 unassigned YES unset administratively down down

2.
配置主机名以及相关参数
Router#conf t
Router(config)#host R1
R1(config)#no ip domain-lo
R1(config)#line con 0
R1(config-line)#no exec-t
R1(config-line)#exit
R1(config)#
R1(config)#
R1(config)#

3.
配置串口ip地址
R1(config)#interface serial 1/1
R1(config-if)#ip add
R1(config-if)#ip address 10.10.12.1 255.255.255.0
R1(config-if)#clock rate 64000
R1(config-if)#no shutdown
R1(config-if)#end


R1#sh ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
Serial1/0 unassigned YES unset administratively down down
Serial1/1 10.10.12.1 YES manual up up
Serial1/2 unassigned YES unset administratively down down
Serial1/3 unassigned YES unset administratively down down

4.
查看接口信息R1#sh interfaces serial 1/1
R1#sh interfaces serial 1/1
Serial1/1 is up, line protocol is up
Hardware is M4T
Internet address is 10.10.12.1/24
MTU 1500 bytes, BW 1544 Kbit, DLY 20000 usec,
reliability 255/255, txload 1/255, rxload 1/255
Encapsulation HDLC, crc 16, loopback not set
Keepalive set (10 sec)
Restart-Delay is 0 secs
Last input 00:00:03, output 00:00:04, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0
Queueing strategy: weighted fair
Output queue: 0/1000/64/0 (size/max total/threshold/drops)
Conversations 0/1/256 (active/max active/max total)
Reserved Conversations 0/0 (allocated/max allocated)
Available Bandwidth 1158 kilobits/sec
5 minute input rate 0 bits/sec, 0 packets/sec
5 minute output rate 0 bits/sec, 0 packets/sec
10 packets input, 240 bytes, 0 no buffer
Received 10 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored, 0 abort
14 packets output, 1484 bytes, 0 underruns
0 output errors, 0 collisions, 2 interface resets
0 output buffer failures, 0 output buffers swapped out
2 carrier transitions DCD=up DSR=up DTR=up RTS=up CTS=up

5.
配置以太网口ip地址
R1#conf t
R1(config)#int fastEthernet 0/0
R1(config-if)#ip add 192.168.1.1 255.255.255.0
R1(config-if)#no shutdown
R1(config-if)#exit
R1(config)#end
R1#sh interfaces fastEthernet 0/0
FastEthernet0/0 is up, line protocol is up
Hardware is AmdFE, address is cc00.0c9c.0000 (bia cc00.0c9c.0000)


Internet address is 192.168.1.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
Keepalive set (10 sec)
Full-duplex, 100Mb/s, 100BaseTX/FX
ARP type: ARPA, ARP Timeout 04:00:00
Last input never, output 00:00:06, output hang never
Last clearing of "show interface" counters never
Input queue: 0/75/0/0 (size/max/drops/flushes); 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
Received 0 broadcasts, 0 runts, 0 giants, 0 throttles
0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored
0 watchdog
0 input packets with dribble condition detected
9 packets output, 1380 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
R1#sh ip interface b
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.1 YES manual up up
Serial1/0 unassigned YES unset administratively down down
Serial1/1 10.10.12.1 YES manual up up
Serial1/2 unassigned YES unset administratively down down
Serial1/3 unassigned YES unset administratively down down

6.
登陆到第二台路由器上
Router>enable
Router#conf t
Router(config)#host R2
R2(config)#no ip domain-lookup
R2(config)#line con 0
R2(config-line)#no exec-t
R2(config-line)#exit
R2(config)#end
R2#sh ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 unassigned YES unset administratively down down
Serial1/0 unassigned YES unset administratively down down
Serial1/1 unassigned YES unset administratively down down
Serial1/2 unassigned YES unset administratively down down
Serial1/3 unassigned YES unset administratively down down

7.
配置串口ip地址和以太口ip地址
R2#conf terminal t
R2(config)#interface serial 1/0
R2(config-if)#ip add 10.10.12.2 255.255.255.0
R2(config-if)#no shutdown
R2(config-if)#exit
R2(config)#int fastEthernet 0/0
R2(config-if)#ip add 192.168.1.2 255.255.255.0
R2(config-if)#no shut
R2(config-if)#exit
R2(config)#exit
R2#sh ip interface brief
Interface IP-Address OK? Method Status Protocol
FastEthernet0/0 192.168.1.2 YES manual up up
Serial1/0 10.10.12.2 YES manual up up
Serial1/1 unassigned YES unset administratively down down
Serial1/2 unassigned YES unset administratively down down
Serial1/3 unassigned YES unset administratively down down

8.
测试ip连通性
R1#ping 10.10.12.2
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 10.10.12.2, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 20/38/72 ms
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 = 16/27/44 ms

9.
配置从R2 telnet 到R1的基本设置
R1#conf t
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)#enable password cisco
R1(config)#line vty 0 4
R1(config-line)#password cisco
R1(config-line)#login
R1(config-line)#end

10.
从R2上登陆到R1测试
R2#telnet 10.10.12.1
Trying 10.10.12.1 ... Open
User Access Verification
Password: ---------------------------------------------vty线下密码
R1>enable
Password: ----------------------------------------------enable密码
R1#------------------------------------------------------成功登陆到R1上
按q退出登陆
R1#q
[Connection to 10.10.12.1 closed by foreign host]
R2#

11.
配置基于用户名telnet登陆方式
R1#conf t
R1(config)#enable password cisco
R1(config)#username wmzhe password cisco
R1(config)#line vty 0 4
R1(config-line)#login local
R1(config-line)#end

12.
从R2上测试登陆方式:
R2#telnet 10.10.12.1
Trying 10.10.12.1 ... Open
User Access Verification
Username: wmzhe
Password:
R1>enable
Password:
R1#q
[Connection to 10.10.12.1 closed by foreign host]
R2#

13.
同样道理也可以通过以太网口telnet
R2#telnet 192.168.1.1
Trying 192.168.1.1 ... Open
User Access Verification
Username: chaijian
Password:
R1>enable
Password:
R1#q
[Connection to 192.168.1.1 closed by foreign host]
R2#
本帖de评分: 1 条评分 DB +5
DB+5

^_^  辛苦了。

再见喜雨。

ZxID:1480534

等级: 元老

举报 只看该作者 沙发   发表于: 2009-05-09 0
谢谢分享

« 返回列表
发帖 回复