实验目的:
实现2层交换机之间VLAN间的通信,把二层的vlan封装与路由器的子接口进行对应。
2600 IOS需求:IP Plus (c2600-ik8s-mz-122.15.T.bin)
实验拓扑:

实验内容:
交换机配置
3512xl#show running-config
Building configuration...
Current configuration:
!
version 12.0
no service pad
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname 3512xl
!
no logging console
enable password mysecret
!
!
!
!
!
ip subnet-zero
!
!
!
interface FastEthernet0/1
switchport mode trunk
!
!-- If 802.1Q is configured,
!-- you will instead see the following output
!-- under interface FastEthernet0/1:
!-- interface FastEthernet0/1
!-- switchport trunk encapsulation dot1q
!-- switchport mode trunk
!
interface FastEthernet0/2
switchport access vlan 2
spanning-tree portfast
!
interface FastEthernet0/3
spanning-tree portfast
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface GigabitEthernet0/1
!
interface GigabitEthernet0/2
!
interface VLAN1
ip address 10.10.10.2 255.255.255.0
no ip directed-broadcast
no ip route-cache
!
ip default-gateway 10.10.10.1
!
line con 0
transport input none
stopbits 1
line vty 0 4
password mysecret
login
line vty 5 15
login
!
end
路由器配置
Current configuration:
!
version 12.1
service timestamps debug uptime
service timestamps log uptime
no service password-encryption
!
hostname c2600
!
no logging console
enable password mysecret
!
!
!
!
!
ip subnet-zero
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.1配置子接口,每一个子接口对应交换机的一个VLAN的封装。这样子接口的IP地址就是你交换机下面所连接PC的网关。
encapsulation isl 1
ip address 10.10.10.1 255.255.255.0
no ip redirects
!
!-- If 802.1Q is configured,
!-- you will instead see the following output
!-- under interface FastEthernet0/0.1:
!-- interface FastEthernet0/0.1
!-- encapsulation dot1Q 1 native
!-- ip address 10.10.10.1 255.255.255.0
!
!
interface FastEthernet0/0.2
encapsulation isl 2
ip address 10.10.11.1 255.255.255.0
no ip redirects
!
!-- If 802.1Q is configured,
!-- you will instead see the following output
!-- under interface FastEthernet0/0.2:
!-- interface FastEthernet0/0.2
!-- encapsulation dot1Q 2
!-- ip address 10.10.11.1 255.255.255.0
!
interface FastEthernet0/1
no ip address
shutdown
duplex auto
speed auto
!
ip classless
no ip http server
!
!
!
line con 0
transport input none
line aux 0
line vty 0 4
password mysecret
login
!
no scheduler allocate
end
实验总结:
这个实验虽然在工程项目中是不会出现的,但是在我们日常的实验中,单臂路由是经常使用的,这些使用的命令也是大家对VLAN和子接口的一个升华。

转载于:https://blog.51cto.com/lanyue24/31626

网络工程师交换试验手册之二十一:单臂路由的配置实例相关推荐

  1. 网络工程师交换试验手册之二十五:详细讲授利用xmodem来恢复IOS

    实验目的: 我们一般在工作中,经常会遇到IOS莫名其妙的丢失,有时候很突然,有时候很棘手,如果网络因为你的失误而中断,你的责任会很重要,所以大家一定要掌握恢复IOS的方法. 实验拓扑: pc 实验步骤 ...

  2. 网络工程师交换试验手册之十八:SWITCH的基本配置

    实验目的  熟悉交换机的基本操作  为定义控制台密码  为交换更改主机名称  为交换机控制台的添加IP地址和默认网关等 实验设备: 1912交换机和2924交换机. 1900系列交换机的基本配 ...

  3. 单臂路由配置实验同一交换机上vlan间ping不通_【干货】什么是单臂路由?如何配置?...

    交换机配置如下: SW#vlan database SW(vlan)#vlan 2 VLAN 2 added: Name: VLAN0002 SW(vlan)#vlan 3 VLAN 3 added: ...

  4. 网络实战之单臂路由与三层交换机配置

    目录 一.单臂路由 1.单臂路由目的 2.单臂路由链路类型 3.单臂路由实验配置 ①实验目的 ②实验工具及机器 ③实验拓扑 ④实验步骤 二.三层交换机 1.三层交换机作用 2.三层交换机实验配置 ①实 ...

  5. 二、VLAN,单臂路由

    交换机 交换机工作原理 基于数据报文的源MAC地址学习 形成MAC地址表 思科:show mac-address-table 华为:disp mac-add 基于数据报文的目的MAC转发 MAC寻址 ...

  6. 秒懂!!单臂路由!网络如此简单

    目录 一.单臂路由的介绍 1.单臂路由的工作原理 2.单臂路由的局限 二.单臂路由实验设计 三.单臂路由配置 一.单臂路由的介绍 1.单臂路由的工作原理 单臂路由的原理: 默认情况下,不同网段之间是不 ...

  7. 【教女朋友学网络系列5】之VLAN与Trunk、单臂路由

    交换机基本配置 序言 一.vlan 1.vlan概述 2.vlan的优势 3.vlan的种类 4.VLAN的范围 5.跨交换机相同VLAN通信工作过程 6.不同VLAN间通信 6.配置静态VLAN的步 ...

  8. 计算机网络自顶向下方法课程实验二华为三层交换机路由器配置vlan单臂路由以及三层交换

    一 实验目的 1.配置vlan单臂路由. 2.配置三层交换. 3.掌握VLAN路由的应用场景. 4.掌握VLAN路由的工作原理. 5.掌握VLAN路由的基本配置. 二 实验原理: 三层交换机就是具有部 ...

  9. HCNP-路由交换:单臂路由、VLAN路由、VLANIF

    一. 不同VLAN间的互通 同一VLAN的终端可以互相通信,但不同VLAN间的终端不能二层互通,要想让不同VLAN间的终端互通,需要借助三层路由,目前有以下两种方式实现: 在三层交换机上通过VLANI ...

最新文章

  1. Mosquitto配置文件说明
  2. spring boot 异常(exception)处理
  3. 异常-自定义异常 和 throw和throws的区别
  4. 对正在运行的mysql进行监控
  5. DNS 服务器地址大全
  6. 小白带你入坑xamarin系列之环境搭建和准备
  7. Google和百度都无法替代的10大深网搜索引擎
  8. java怎么兼容switch_java – Switch语句给出了不兼容类型错误
  9. android中将自己的自定义组件打成JAR包
  10. 秋风到,ModelArts“ AI市场算法Fast-SCNN指南”秋膘贴起来
  11. Numpy、SciPy、MatPlotLib在Python2.7.9下的安装与配置
  12. 图片降噪Topaz DeNoise AI 安装小技巧
  13. 精益产品开发—精益思想
  14. Windows之外的天空 非主流操作系统Top10
  15. error: cannot lock ref ‘refs/remotes/origin/release/xxxx‘: ‘refs/remotes/origin/release‘ 已存在,无法创建
  16. (Lightweight multi-scale aggregated residual attention networks for image super-resolution)阅读笔记
  17. 牛客IOI周赛27-普及组
  18. VMWare安装使用、Linux命令、Docker安装和Linux项目部署
  19. 利用PR将视频保存成一系列图片
  20. BS架构说明以及网页组成

热门文章

  1. 操作SD卡,获取文件目录及文件工具类Android,listView
  2. activiti流程信号捕获事件触发signalEventReceived
  3. spring Bean的作用域(注解 单例 多例)
  4. gulp html页面路径,通过gulp-connect部署静态页面,html页面中include路径无法get!
  5. 奥特曼传奇英雄存档丢了怎么找回_热血传奇:法师前期跨级刷怪到底划不划算?...
  6. AWT_事件监听2(Java)
  7. H5中 video 使用border-radius失效解决方法
  8. 微信小程序文本溢出省略号(···)
  9. THREEJS - 动态标签(texture纹理方式)
  10. PCL之在Debian10下配置pcl.1.9.1