【网络】CCNA实验一:Vlan、Trunk

要求:
1:不同楼层物理隔离,但逻辑相连
2:相同楼层物理相连,但逻辑隔离
3:主机可以动态获取IP地址
4:不同VLAN间可以进行通信
5:主机最终访问www.esafenet.com弹出"Test By Peterpan"字样
配置sw1:
VLAN:
sw1(config)#vlan 10
sw1(config-vlan)#name HR
sw1(config)#vlan 20
sw1(config-vlan)#name KF
VTP:
sw1(config)#vtp domain esafenet
sw1(config)#vtp mode server
Trunk:
sw1(config)#int f0/1
sw1(config-if)#switchport trunk encapsulation dot1q
sw1(config-if)#switchport mode trunk
sw1(config)#int f0/2
sw1(config-if)#switchport trunk encapsulation dot1q
sw1(config-if)#switchport mode trunk
sw1(config)#int f0/3
sw1(config-if)#switchport trunk encapsulation dot1q
sw1(config-if)#switchport mode trunk
Access:
sw1(config)#int f0/4
sw1(config-if)#switchport mode access
sw1(config-if)#switchport access vlan 10
sw1(config)#int f0/5
sw1(config-if)#switchport mode access
sw1(config-if)#switchport access vlan 20
配置sw2:
VTP:
sw2(config)#vtp domain esafenet
sw2(config)#vtp mode client
vlan和trunk(直接简写了):
sw2(config)#int f0/1
sw2(config-if)#sw tr en do
sw2(config-if)#sw mo tr
sw2(config-if)#int f0/2
sw2(config-if)#sw mo ac
sw2(config-if)#sw ac vl 10
sw2(config-if)#int f0/3
sw2(config-if)#sw mo ac
sw2(config-if)#sw ac vl 20
配置sw3:
VTP:
sw3(config)#vtp domain esafenet
sw3(config)#vtp mode client
vlan和trunk(直接简写了):
sw3(config)#int f0/1
sw3(config-if)#sw tr en do
sw3(config-if)#sw mo tr
sw3(config-if)#int f0/2
sw3(config-if)#sw mo ac
sw3(config-if)#sw ac vl 10
sw3(config-if)#int f0/3
sw3(config-if)#sw mo ac
sw3(config-if)#sw ac vl 20
配置r1:
r1(config)#ip dhcp pool HR
r1(dhcp-config)#network 192.168.1.0 255.255.255.0
r1(dhcp-config)#default-r1 192.168.1.254
r1(dhcp-config)#dns-server 10.1.1.1
r1(config)#ip dh pool KF
r1(dhcp-config)#network 192.168.2.0 255.255.255.0
r1(dhcp-config)#default-r1 192.168.2.254
r1(dhcp-config)#dns-server 10.1.1.1
虚拟子接口(实现vlan间通信):
r1(config)#int g0/0.1
r1(config-subif)#encapsulation dot1Q 10
r1(config-subif)#ip address 192.168.1.254 255.255.255.0
r1(config)#int g0/0.2
r1(config-subif)#encapsulation dot1Q 20
r1(config-subif)#ip address 192.168.2.254 255.255.255.0
打开接口:
r1(config)#int g0/0
r1(config-if)#no shutdown
加一条默认路由:
r1(config)#ip route 0.0.0.0 0.0.0.0 172.16.12.2
配置r2:
加一条默认路由:
r2(config)#ip route 0.0.0.0 0.0.0.0 172.16.12.1
简单配置下web和dns服务器:
测试结果:

【网络】CCNA实验一:Vlan、Trunk的更多相关文章
- CCNA实验2.VLAN
一. 二.配置主VTP上的信息 sw2上配置为domain server,sw1上配置为domain client,sw2上增加vlan并命名和添加描述 conf t vtp domain corp ...
- CCNA实验(6) -- VLAN & SPT
交换机的作用主要有两个:1.维护CAM(ContextAddress Memory)表,该表是MAC地址和交换机端口的映射表2.根据CAM进行数据帧的转发 交换机对数据帧的处理有三种:1.Forwar ...
- Packet Tracer 5.0 构建CCNA实验(2)—— 配置VLAN
Packet Tracer 5.0 构建CCNA实验(2)—— 配置VLAN Vlan(Virtual Local Area Network) 即虚拟局域网.VLAN可以把同一个物理网络划分为多个逻辑 ...
- 2.1-VLAN/TRUNK/VTP
2.1-VLAN/TRUNK/VTP 注意:配置VLAN时要退出VLAN配置模式才会执行 如果VLAN被删除或者shutdown,那么属于这个vlan的接口将被阻塞(灯一直是橙色,变不了绿色) ...
- 网络对抗实验一 逆向及Bof基础实践
网络对抗实验一 逆向及Bof基础实践 一.实验目的 本次实践的对象是一个名为pwn1的linux可执行文件. 该程序正常执行流程是:main调用foo函数,foo函数会简单回显任何用户输入的字符串. ...
- 20155328 网络攻防 实验五:MSF基础应用
20155328 网络攻防 实验五:MSF基础应用 实践内容及过程记录 一.Windows服务渗透攻击----ms08_067 攻击机:kali 靶机:WindowsXP(英文版) 第一步,分别查看攻 ...
- 网络CCNA基础了解
关于网络 CCNA.CCNP.CCIE 中的 CCNA 一.逻辑与.或.非 AND --> "与"计算 1 AND 1 = 1(取严) 1 AND 0 = 0 0 AND 1 ...
- 配置网卡为vlan trunk
http://www.microhowto.info/tutorials/802.1q.html Configure an Ethernet interface as a VLAN trunk hos ...
- vlan trunk配置
vlan trunk配置 Trunk:中继干道 作用:一条链路能承载多个vlan的流量,并对不同vlan的流量进行不同标记 trunk能够使vlan跨越交换机 PT配置 配置vlan:两台交换机同样的 ...
随机推荐
- eclipse——配置maven插件
Step 1 配置installations installations:指定Maven核心程序的位置 从本地磁盘中找到本地maven的位置 Step 2 配置user settings user ...
- Python基础-5
目录 time &datetime模块 random os sys shutil json & picle shelve xml处理 yaml处理 hashlib re正则表达式 模块 ...
- web端测试点汇总
前言 前面一篇文章讲解了app测试一些功能点.那么相应的也梳理一下web测试相关的功能的测试点吧,此篇文章只是给你们一个思路,如果要涉及web端每个测试点,基本不可能实现的,所以只是提供一个设计的思路 ...
- 【Azure Active Directory】单一登录 (SAML 协议)
Azure Active Directory 支持 SAML 2.0 Web 浏览器单一登录 (SSO) 配置文件. 若要请求 Azure Active Directory 对用户进行身份验证时,云服 ...
- JavaScript必备:Google发布的JS代码规范(转)
[翻译]关于Google发布的JS代码规范,你需要了解什么? 翻译 | WhiteYin 译文 | https://github.com/WhiteYin/translation/issues/10 ...
- java IO Nio 文件拷贝工具类Files
public static void main(String[] args) throws Exception { Files.copy(Paths.get("file/text.txt&q ...
- GCC 显示所有的warning option
此事需求的来源是有要求调查,gcc中的那些warning是有问题的,代码必须要修改,那些事需要确认的,就要显示所有的warning选项是什么 查了下,方法如下 显示所有的warning和warning ...
- LSI SAS3008 RAID配置方法
7.1 概述 LSI SAS3008 RAID 控制卡(以下简称LSI SAS3008)是基于Fusion-MPT™ (消息传递技术)架构的8端口12Gbit/s SAS控制器,并采用PCIe3.0 ...
- 【BlockingQueue】BlockingQueue 阻塞队列实现
前言: 在新增的Concurrent包中,BlockingQueue很好的解决了多线程中,如何高效安全“传输”数据的问题.通过这些高效并且线程安全的队列类,为我们快速搭建高质量的多线程程序带来极大的便 ...
- Configure MongoDB Replica Set
Table of Contents Introduction Requirements Create Replica Set Add Secondary Members Add an Arbiter ...