「已注销」 2023-01-30 17:43 采纳率: 50%
浏览 58
已结题

单臂路由与三层不同网段通信

路由的三个网段如何配置才能与接口F0/1、F0/2通信?
设备均为思科:三层3560V2 网关2811

img

  • 写回答

2条回答 默认 最新

  • m0_54204465 2023-01-30 18:56
    关注

    需要在两个端口(F0/1和F0/2)上配置相同的VLAN,并将其设置为TRUNK模式,以允许数据包在这两个端口之间进行路由。然后在路由器上创建VLAN,并在该VLAN上配置相应的IP地址,以进行互相ping通。

    本回答被题主选为最佳回答 , 对您是否有帮助呢?
    评论
  • IT民工金鱼哥 运维领域新星创作者 2023-01-31 10:00
    关注

    你的上个问题,就提示过你,要好好学习,这些都是很基础的,看来你真没做实验。。。
    这里,我截图一下笔记上的,你参考一下吧(原理一样):


    img


    拓扑要求:

    1. 交换机下联2 台PC,又连接一台路由器。路由器作为内网VLAN10、VLAN20 用户的网关。交换机增加一个VLAN255 用于其自身的设备管理,交换机的管理IP 为192.168.255.1,网关在路由器上;
    2. 交换机创建VLAN10、VLAN20,这是用户VLAN,是PC 用户的VLAN;
    3. 路由器FE0/0 口划分子接口做单臂,作为VLAN10、VLAN20 及VLAN255 的网关;
    4. 要求VLAN10、VLAN20 之间的用户能够互访,同时只允许VLAN10 的用户Telnet 交换机进
      行设备的管理。

    原理提示:

    img

    然后对上面这拓扑的理解:

    img


    交换机的配置:
    switch# config terminal
    switch(config)# vlan 10
    switch(config-vlan)# exit
    switch(config)# vlan 20
    switch(config-vlan)# exit
    switch(config)# vlan 255 # 管理VLAN
    switch(config-vlan)# exit
    switch(config)# interface fastethernet0/1
    switch(config-if)# swtichport mode access
    switch(config-if)# swtichport access vlan 10
    switch(config-if)# interface fastethernet0/2
    switch(config-if)# swtichport mode access
    switch(config-if)# swtichport access vlan 20
    switch(config-if)# interface fastethernet0/15
    switch(config-if)# switchport trunk encapsulation dot1q
    switch(config-if)# switchport mode trunk
    switch(config-if)# exit
    switch(config)# interface vlan 255
    switch(config-if)# ip address 192.168.255.1 255.255.255.0 # 给VLAN255 配置IP 地址,这个IP 地址就是交换机的管理IP
    switch(config-if)# exit
    switch(config)# ip default-gateway 192.168.255.254 # 为交换机指定网关
    switch(config)# line vty 0 4 # 配置VTY
    switch(config-line)# password ccietea
    switch(config-line)# login
    switch(config-line)# exit
    switch(config)#


    路由器的配置:
    Router(config)# hostname GW
    GW(router)# interface fastethernet 0/0
    GW(router-if)# no shutdown # 注意一定要将物理接口打开
    GW(router)# interface fastethernet 0/0.10 # 这个子接口作为VLAN10 的网关
    GW(router-if)# encapsulation dot1Q 10
    GW(router-if)# ip address 192.168.10.254 255.255.255.0
    GW(router-if)# interface fastethernet 0/0.20 # 这个子接口作为VLAN20 的网关
    GW(router-if)# encapsulation dot1Q 20
    GW(router-if)# ip address 192.168.20.254 255.255.255.0
    GW(router-if)# interface fastethernet 0/0.255 # 这个子接口作为VLAN255 的网关
    GW(router-if)# encapsulation dot1Q 255
    GW(router-if)# ip address 192.168.255.254 255.255.255.0


    然后,就算用你那边,一样的原理方式去配置,你先好好理解,再来玩耍,加油!

    评论 编辑记录
查看更多回答(1条)

报告相同问题?

问题事件

  • 系统已结题 2月14日
  • 已采纳回答 2月6日
  • 修改了问题 1月31日
  • 修改了问题 1月31日
  • 展开全部

悬赏问题

  • ¥15 我用C语言easyx图形库绘制了一个3d游戏方框透视,但进入游戏时候鼠标准星对准方框边缘 鼠标光标就会弹出来这是啥情况怎样让光标对准绘制的方框点击鼠标不弹出光标好烦这样
  • ¥20 用Power Query整合的问题
  • ¥20 基于python进行多背包问题的多值编码
  • ¥15 相同型号电脑与配置,发现主板有一台貌似缺少了好多元器件似的,会影响稳定性和使用寿命吗?
  • ¥15 要求编写稀疏矩阵A的转置矩阵的算法
  • ¥15 编写满足以下要求的停车场管理程序,设停车场只有一个可停放n辆车的狭窄通道且只有一个大门可供车辆进出。
  • ¥15 C语言:数据子序列基础版
  • ¥20 powerbulider 导入excel文件,显示不完整
  • ¥15 用keil调试程序保证结果进行led相关闪烁
  • ¥15 paddle训练自己的数据loss降不下去