首页 > 其他 > 详细

单臂路由

时间:2014-03-30 05:24:54      阅读:611      评论:0      收藏:0      [点我收藏+]
  • 实验拓扑

  • bubuko.com,布布扣

  • 交换机配置

    Switch>
    Switch>en
    Switch#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Switch(config)#vlan 10
    Switch(config-vlan)#exit
    Switch(config)#vlan 20
    Switch(config-vlan)#exit
    Switch(config)#int f 0/2
    Switch(config-if)#switchport access vlan 10
    Switch(config-if)#exit
    Switch(config)#int f 0/3
    Switch(config-if)#switchport access vlan 20
    Switch(config-if)#exit
    Switch(config)#int f 0/1
    Switch(config-if)#switchport mode trunk
    Switch(config-if)#exit
    Switch(config)#exit
    Switch#
    %SYS-5-CONFIG_I: Configured from console by console

    Switch#write
    Building configuration...
    [OK]
    Switch#

  • 路由器配置

    Router>en
    Router#conf t
    Enter configuration commands, one per line.  End with CNTL/Z.
    Router(config)#int f 0/0
    Router(config-if)#en
    Router(config-if)#exit
    Router(config)#int f 0/0.10
    Router(config-subif)#encapsulation dot1q 10
    Router(config-subif)#ip add 192.168.1.254 255.255.255.0
    Router(config-subif)#exit
    Router(config)#int f 0/0.20
    Router(config-subif)#en
    Router(config-subif)#encapsulation dot1q
    % Incomplete command.
    Router(config-subif)#encapsulation dot1q 20
    Router(config-subif)#ip add 192.168.2.254 255.255.255.0
    Router(config-subif)#exit
    Router(config)#int f 0/0
    Router(config-if)#
    no shutdown

    Router(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

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

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

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

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

    Router(config-if)#exit
    Router(config)#exit
    Router#
    %SYS-5-CONFIG_I: Configured from console by console

    Router#write
    Building configuration...
    [OK]

     

  • 测试,两台PC IP地址设定,再PING

  • bubuko.com,布布扣

  • bubuko.com,布布扣

  • bubuko.com,布布扣


题外话,查看路由器的路由表:

Router#show ip route
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
       D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
       N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
       E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
       i - IS-IS, L1 - IS-IS level-1, L2 - IS-IS level-2, ia - IS-IS inter area
       * - candidate default, U - per-user static route, o - ODR
       P - periodic downloaded static route

Gateway of last resort is not set

C    192.168.1.0/24 is directly connected, FastEthernet0/0.10
C    192.168.2.0/24 is directly connected, FastEthernet0/0.20
Router#

  • 路由器划分子端口示意图【截自培训课件】

    bubuko.com,布布扣

 

 

本文出自 “Simon.Xu” 博客,请务必保留此出处http://simonxu.blog.51cto.com/8010209/1386389

单臂路由,布布扣,bubuko.com

单臂路由

原文:http://simonxu.blog.51cto.com/8010209/1386389

(0)
(0)
   
举报
评论 一句话评论(0
关于我们 - 联系我们 - 留言反馈 - 联系我们:wmxa8@hotmail.com
© 2014 bubuko.com 版权所有
打开技术之扣,分享程序人生!