CISCO 单臂路由实验

合集下载
  1. 1、下载文档前请自行甄别文档内容的完整性,平台不提供额外的编辑、内容补充、找答案等附加服务。
  2. 2、"仅部分预览"的文档,不可在线预览部分如存在完整性等问题,可反馈申请退款(可完整预览的文档不适用该条件!)。
  3. 3、如文档侵犯您的权益,请联系客服反馈,我们会尽快为您处理(人工客服工作时间:9:00-18:30)。

CISCO 单臂路由实验

拓扑图如下:

PC0在VLAN 10中,PC1在VLAN 20中,要求PC0能PING通PC1.

具体步骤如下:

1、在交换机上配置VLAN,并把接口加入到VLAN中。

sw>en

sw#vlan da

sw#vlan database

% Warning: It is recommended to configure VLAN from config mode, as VLAN database mode is being deprecated. Please consult user documentation for configuring VTP/VLAN in config mode.

sw(vlan)#vlan 10

VLAN 10 added:

Name: VLAN0010

sw(vlan)#vlan 20

VLAN 20 added:

Name: VLAN0020

sw(vlan)#exi

APPLY completed.

Exiting....

sw#config t

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

sw(config)#int range f0/1 - 5

sw(config-if-range)#sw

sw(config-if-range)#switchport ac

sw(config-if-range)#switchport access vlan 10

sw(config-if-range)#int range f0/6 - 10

sw(config-if-range)#sw

sw(config-if-range)#switchport acc

sw(config-if-range)#switchport access vlan 20

sw(config-if-range)#int f0/24

sw(config-if)#sw

sw(config-if)#switchport mo

sw(config-if)#switchport mode trunk

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

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

sw(config-if)#end

sw#wr

Building configuration...

[OK]

2、在路由器上配置子接口,并封装802.1Q。

Router>en

Router#config t

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

Router(config)#

Router(config)#int f0/0

Router(config-if)#no sh

%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)#exi

Router(config)#int f0/0.1

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

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

Router(config-subif)#en

Router(config-subif)#encapsulation ?

dot1Q IEEE 802.1Q Virtual LAN

Router(config-subif)#encapsulation d

Router(config-subif)#encapsulation dot1Q ?

<1-1005> IEEE 802.1Q VLAN ID

Router(config-subif)#encapsulation dot1Q 10

Router(config-subif)#ip add 192.168.1.1 255.255.255.0

Router(config-subif)#no s

Router(config-subif)#int f0/0.2

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

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

Router(config-subif)#en

Router(config-subif)#encapsulation do

Router(config-subif)#encapsulation dot1Q 20

Router(config-subif)#ip add 192.168.2.1 255.255.255.0

Router(config-subif)#en

% Ambiguous command: "en"

Router(config)#end

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

Router#wr

Building configuration...

[OK]

3、在PC上配置IP和网关,并检测结果;

PC>ping 192.168.1.2

Pinging 192.168.1.2 with 32 bytes of data:

Request timed out.

Reply from 192.168.1.2: bytes=32 time=111ms TTL=127

Reply from 192.168.1.2: bytes=32 time=125ms TTL=127

Reply from 192.168.1.2: bytes=32 time=125ms TTL=127

Ping statistics for 192.168.1.2:

Packets: Sent = 4, Received = 3, Lost = 1 (25% loss),

Approximate round trip times in milli-seconds:

Minimum = 111ms, Maximum = 125ms, Average = 120ms

相关文档
最新文档