交換機VLAN的配置——交換機VLAN端口隔離

路由器的基本配置

1、通過telnet訪問路由器

要通過telnet訪問路由器,需要先通過console口對路由器進行基本配置,例如:IP地址、密碼等。

實驗拓撲圖如圖1所示。

1、通過telnet訪問路由器拓撲圖

路由器的配置:

Router>enable                    ...................................進入路由器的特權模式

Router#configure terminal            ................................進入路由器的全局配置模式

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#interface f0/0         ...............................進入路由器的f0/0端口

Router(config-if)#ip address 192.168.1.1 255.255.255.0   ...配置路由器f0/0端口的Ip地址

Router(config-if)#no shutdown             .......................啓用f0/0端口

%LINK-5-CHANGED: Interface FastEthernet0/0, changed state to up

%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/0, changed state to up

Router(config-if)#end          ..............................退出配置模式

Router#

%SYS-5-CONFIG_I: Configured from console by console

Router#configure terminal               

Enter configuration commands, one per line.  End with CNTL/Z.

Router(config)#line vty 0 4        ...................進入路由器的VTY虛擬終端

Router(config-line)#password homechen

Router(config-line)#login     .....................以上兩行配置VTY(即telent)的密碼

Router(config-line)#exit

Router(config)#enable password homechen   ..............配置進入路由器特權模式的密碼

Router(config)#end

Router#

%SYS-5-CONFIG_I: Configured from console by console

Router#

PC上測試是否可以和路由器連通:

C:\>ipconfig

IP Address......................: 192.168.1.100

Subnet Mask.....................: 255.255.255.0

Default Gateway.................: 0.0.0.0

C:\>>ping 192.168.1.1

Pinging 192.168.1.1 with 32 bytes of data:

Reply from 192.168.1.1: bytes=32 time=21ms TTL=255

Reply from 192.168.1.1: bytes=32 time=8ms TTL=255

Reply from 192.168.1.1: bytes=32 time=8ms TTL=255

Reply from 192.168.1.1: bytes=32 time=8ms TTL=255

Ping statistics for 192.168.1.1:

    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 8ms, Maximum = 21ms, Average = 11ms

以上可以看出計算機和路由器能夠連通了。

使用telent登錄的路由器上

C:\>telnet 192.168.1.1          ..............遠程登錄到路由器上

Trying 192.168.1.1 ...Open

User Access Verification

Password:             .........................輸入telent密碼

Router>enable

Password:              .........................輸入進入特權模式的密碼

Router#show interface f0/0  ........................查看路由器f0/0端口的信息(注意紅色的up

FastEthernet0/0 is up, line protocol is up (connected)

  Hardware is Lance, address is 0001.96b9.6501 (bia 0001.96b9.6501)

  Internet address is 192.168.1.1/24

本文出自 “花開不敗” 博客,請務必保留此出處http://homechen.blog.51cto.com/1519170/312494

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章