三层交换机应用实例

一、拓扑图

1、拓扑图

在这里插入图片描述

2、要求

  ①、PC自动连接IP,可访问内外网

二、配置接入层交换机

1、连接Trunk链路

	SW1:confifgure terminal 
		 interface f0/3
		 switchport mode trunk
		 exit
	SW2:confifgure terminal 
		 interface f0/3
		 switchport mode trunk
		 exit
	SW3:confifgure terminal 
		 interface f0/2
		 switchport mode trunk
		 exit

2、接口划分VLAN

  ①、在核心交换机上配置完VLAN的创建后

	SW1:configure terminal
		interface f0/1
		switchport access vlan 10
		exit
		interface f0/2
		switchport access vlan 20
		exit
	SW2:configure terminal
		interface f0/1
		switchport access vlan 30
		exit
		interface f0/2
		switchport access vlan 10
		exit	
	SW3:configure terminal
		interface f0/1
		switchport access vlan 40

三、配置核心交换机

1、创建Trunk

			interface range f0/x-x
			switchport trunk encapsulation dot1q
			switchport mode trunk
			exit

2、VTP创建VLAN

			vtp domain MONKEY
			vlan 10
			exit
			vlan 20
			exit
			vlan 30
			exit 
			vlan 40
			exit

3、启用虚拟链路

	interface vlan 10
	ip address 123.0.0.254  255.255.255.0
	no shutdown
	exit
	interface vlan 20
	ip address 124.0.0.254  255.255.255.0
	no shutdown
	exit
	interface vlan 30
	ip address 125.0.0.254  255.255.255.0
	no shutdown
	exit
	interface vlan 40
	ip address 126.0.0.254  255.255.255.0
	no shutdown
	exit

4、设置DHCP中继

	configure terminal
	interface vlan 10
	ip helper-address 126.0.0.1
	exit
	interface vlan 20
	ip helper-address 126.0.0.1
	exit
	interface vlan 30
	ip helper-address 126.0.0.1
	exit

5、设置外网连接

  ①、升级与路由连接的端口

		configure terminal
		interface f0/x
		no switchport
		exit

  ②、设置三层交换机路由表

		configuer terminal
		ip route 0.0.0.0  0.0.0.0  192.0.0.2
		//ip route  网段  子网掩码  目标IP

  ③、设置连接外网的路由

		configure terminal
		ip route 123.0.0.0  255.255.255.0  192.0.0.1
		ip route 124.0.0.0  255.255.255.0  192.0.0.1
		ip route 125.0.0.0  255.255.255.0  192.0.0.1
		ip route 126.0.0.0  255.255.255.0  192.0.0.1
		ip route 203.0.0.0  255.255.255.0  202.0.0.2
  • 1
    点赞
  • 10
    收藏
    觉得还不错? 一键收藏
  • 打赏
    打赏
  • 0
    评论

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

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

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包

打赏作者

风云小虾米

你的鼓励将是我创作的最大动力

¥1 ¥2 ¥4 ¥6 ¥10 ¥20
扫码支付:¥1
获取中
扫码支付

您的余额不足,请更换扫码支付或充值

打赏作者

实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

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

余额充值