NA-NP-IE系列实验50: 单臂路由实现VLAN 间路由

实验50:  单臂路由实现VLAN 间路由
1.  实验目的
通过本实验,读者可以掌握如下技能:
1)  路由器以太网接口上的子接口
2)  单臂路由实现VLAN 间路由的配置
2.  实验拓扑
拓扑图
3.  实验步骤
 
 
Switch#vlan da
% 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.
 
Switch(vlan)#vlan 2 name cisco
VLAN 2 added:
    Name: cisco
Switch(vlan)#exit
APPLY completed.
Exiting....
Switch#conf t
Enter configuration commands, one per line.  End with CNTL/Z.
Switch(config)#int f0/1
Switch(config-if)#switch mode trunk//f0/1配置成TRUNK模式
Switch(config-if)#exit
Switch(config)#int f0/2
Switch(config-if)#switch mode access
Switch(config-if)#switch access vlan 2//f0/2划分到VLAN2
Switch(config-if)#
%LINK-5-CHANGED: Interface FastEthernet0/1, changed state to up
%LINEPROTO-5-UPDOWN: Line protocol on Interface FastEthernet0/1, changed state to up
   
Router(config)#int f0/0
Router(config-if)#ip add 172.16.2.1 255.255.255.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)#exit
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 upRouter(config-subif)#enca dot1q 2封装DOT1Q,2代表VLAN2
Router(config-subif)#ip add 172.16.1.1 255.255.255.0
Router(config-subif)#no sh
Router(config-subif)#
 
PC1:
PC>ping 172.16.2.1
 
Pinging 172.16.2.1 with 32 bytes of data:
 
Reply from 172.16.2.1: bytes=32 time=110ms TTL=255
Reply from 172.16.2.1: bytes=32 time=63ms TTL=255
Reply from 172.16.2.1: bytes=32 time=63ms TTL=255
Reply from 172.16.2.1: bytes=32 time=63ms TTL=255
 
Ping statistics for 172.16.2.1:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 63ms, Maximum = 110ms, Average = 74ms
 
PC>ping 172.16.2.2
 
Pinging 172.16.2.2 with 32 bytes of data:
 
Reply from 172.16.2.2: bytes=32 time=78ms TTL=127
Reply from 172.16.2.2: bytes=32 time=125ms TTL=127
Reply from 172.16.2.2: bytes=32 time=125ms TTL=127
Reply from 172.16.2.2: bytes=32 time=125ms TTL=127
 
Ping statistics for 172.16.2.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 78ms, Maximum = 125ms, Average = 113ms
 
PC>
  PC0:
PC>ping 172.16.1.2
 
Pinging 172.16.1.2 with 32 bytes of data:
 
Reply from 172.16.1.2: bytes=32 time=172ms TTL=127
Reply from 172.16.1.2: bytes=32 time=110ms TTL=127
Reply from 172.16.1.2: bytes=32 time=125ms TTL=127
Reply from 172.16.1.2: bytes=32 time=125ms TTL=127
 
Ping statistics for 172.16.1.2:
    Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),
Approximate round trip times in milli-seconds:
    Minimum = 110ms, Maximum = 172ms, Average = 133ms
 
PC>


本文转自gauyanm 51CTO博客,原文链接:http://blog.51cto.com/gauyanm/244712,如需转载请自行联系原作者
  • 0
    点赞
  • 0
    收藏
    觉得还不错? 一键收藏
  • 0
    评论

“相关推荐”对你有帮助么?

  • 非常没帮助
  • 没帮助
  • 一般
  • 有帮助
  • 非常有帮助
提交
评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值