实验02 VLAN与单臂路由
2010-02-05 14:04
357 查看
[align=center]实验02 VLAN与单臂路由[/b][/align]
一、拓扑图[/b]
[/b]
二、实验目标[/b]
1. 实现小型企业局域网二层广播域VLAN隔离和三层全网全连通。
2. 掌握VLAN、Trunk、单臂路由的配置方法。
3. 分析PC1 ping PC4 的三层通信过程和二层通信过程。
4. 分析PC4 ping SW4网管地址的三层通信过程和二层通信过程。
[/b]
三、实验内容[/b]
(1)SW3,SW4,RT5的基本信息配置[/b]
Switch(config-line)# logging synchronous
Switch(config-line)# exec-timeout 0 0
Switch(config-line)# no login
Switch(config-line)#line aux 0
Switch(config-line)# logging synchronous
Switch(config-line)# exec-timeout 0 0
Switch(config-line)# no login
Switch(config-line)# privilege level 15
Switch(config-line)#line vty 0 4
Switch(config-line)# no login
Switch(config-line)# privilege level 15
Switch(config-line)#exit
Switch(config)#no cdp run
Switch(config)#no ip http server
(2)创建Vlan[/b]
SW4#vlan database
SW4(vlan)#vlan 8
VLAN 8 added:
Name: VLAN0008
SW4(vlan)#vlan 10
VLAN 10 added:
Name: VLAN0010
SW4(vlan)#vlan 11
VLAN 11 added:
Name: VLAN0011
SW4(vlan)#exi
APPLY completed.
Exiting....
SW3#vlan database
SW3(vlan)#vlan 8
VLAN 8 added:
Name: VLAN0008
SW3(vlan)#vlan 10
VLAN 10 added:
Name: VLAN0010
SW3(vlan)#vlan 11
VLAN 11 added:
Name: VLAN0011
SW3(vlan)#exi
APPLY completed.
Exiting....
(3)SW3的二层接口配置[/b]
SW3(config)#interface fastEthernet 0/10
SW3(config-if)#switchport mode access
SW3(config-if)#switchport access vlan 10
SW3(config-if)#exit
SW3(config)#interface fastEthernet 0/11
SW3(config-if)#switchport mode access
SW3(config-if)#switchport access vlan 11
SW3(config-if)#exit
SW3(config)#interface fastEthernet 0/1
SW3(config-if)#switchport trunk encapsulation dot1q
SW3(config-if)#switchport mode trunk
*Mar 1 00:03:59.883: %DTP-5-TRUNKPORTON: Port Fa0/1 has become dot1q trunk
SW3(config-if)#switchport trunk allowed vlan all
SW3(config-if)#switchport trunk native vlan 8
SW3(config-if)#exit
SW3(config)#interface fastEthernet 0/3
SW3(config-if)#switchport trunk encapsulation dot1q
SW3(config-if)#switchport mode trunk
*Mar 1 00:04:43.355: %DTP-5-TRUNKPORTON: Port Fa0/3 has become dot1q trunk
SW3(config-if)#switchport trunk allowed vlan all
SW3(config-if)#exit
SW4[/b]的二层接口配置[/b]
SW4(config)#interface fastEthernet 0/10
SW4(config-if)#switchport mode access
SW4(config-if)#switchport access vlan 10
SW4(config-if)#exit
SW4(config)#interface fastEthernet 0/11
SW4(config-if)#switchport mode access
SW4(config-if)#switchport access vlan 11
SW4(config-if)#exit
SW4(config)#interface fastEthernet 0/3
SW4(config-if)#switchport trunk encapsulation dot1q
SW4(config-if)#switchport mode trunk
*Mar 1 00:12:18.667: %DTP-5-TRUNKPORTON: Port Fa0/3 has become dot1q trunk
SW4(config-if)#switchport trunk allowed vlan all
SW4(config-if)#exit
(4)SW3[/b]网管IP[/b]
SW3(config)#interface vlan 8
*Mar 1 00:04:56.091: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan8, changed state to up
SW3(config-if)#ip address 192.168.8.130 255.255.255.128
SW3(config-if)#no shutdown
SW3(config-if)#exit
SW3(config)#ip default-gateway 192.168.8.129
SW4[/b]网管IP[/b]
SW4(config)#interface vlan 8
*Mar 1 00:12:29.119: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan8, changed state to up
SW4(config-if)#ip add 192.168.8.131 255.255.255.128
SW4(config-if)#no shutdown
SW4(config-if)#exit
SW4(config)#ip default-gateway 192.168.8.129
(5)RT5[/b]的三层接口配置[/b]
RT5(config)#interface ethernet 0/0
RT5(config-if)#ip ad
RT5(config-if)#ip address 192.168.8.129 255.255.255.128
RT5(config-if)#no shutdown
*Mar 1 00:31:00.243: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
*Mar 1 00:31:01.243: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up
RT5(config-if)#exit
RT5(config-subif)#interface ethernet 0/0.10
RT5(config-subif)#encapsulation dot1Q 10
RT5(config-subif)#ip address 192.168.10.1 255.255.255.0
RT5(config-subif)#no shutdown
RT5(config-subif)#exit
RT5(config)#interface ethernet 0/0.11
RT5(config-subif)#encapsulation dot1Q 11
RT5(config-subif)#ip address 192.168.11.1 255.255.255.0
RT5(config-subif)#no shutdown
RT5(config-subif)#exit
RT5#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 192.168.8.129 YES manual up up
Ethernet0/0.10 192.168.10.1 YES manual up up
Ethernet0/0.11 192.168.11.1 YES manual up up
Ethernet0/1 unassigned YES unset administratively down down
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
四、测试结果[/b]
五、遇到的问题及思考[/b]
在配置虚拟子接口的时候忘记输入encapsulation dot1q 10/11的命令,总查找不到已经配入的IP,后来才发现原因。这句命令的作用是允许 Vlan10/Vlan11的数据进入,并给出去的数据打上Vlan10/Vlan11的标签。
[align=left]六、实验心得[/b][/align]
[align=left]单臂路由是一个简单却很重要的技术,这个实验虽然简单,却让我们很好的了解了单臂路由的原理以及基本配置方法,但是方法虽然简单,一些细节部分还是要注意。[/align]本文出自 “IT入门” 博客,谢绝转载!
一、拓扑图[/b]
[/b]
二、实验目标[/b]
1. 实现小型企业局域网二层广播域VLAN隔离和三层全网全连通。
2. 掌握VLAN、Trunk、单臂路由的配置方法。
3. 分析PC1 ping PC4 的三层通信过程和二层通信过程。
4. 分析PC4 ping SW4网管地址的三层通信过程和二层通信过程。
[/b]
三、实验内容[/b]
(1)SW3,SW4,RT5的基本信息配置[/b]
Switch(config-line)# logging synchronous
Switch(config-line)# exec-timeout 0 0
Switch(config-line)# no login
Switch(config-line)#line aux 0
Switch(config-line)# logging synchronous
Switch(config-line)# exec-timeout 0 0
Switch(config-line)# no login
Switch(config-line)# privilege level 15
Switch(config-line)#line vty 0 4
Switch(config-line)# no login
Switch(config-line)# privilege level 15
Switch(config-line)#exit
Switch(config)#no cdp run
Switch(config)#no ip http server
(2)创建Vlan[/b]
SW4#vlan database
SW4(vlan)#vlan 8
VLAN 8 added:
Name: VLAN0008
SW4(vlan)#vlan 10
VLAN 10 added:
Name: VLAN0010
SW4(vlan)#vlan 11
VLAN 11 added:
Name: VLAN0011
SW4(vlan)#exi
APPLY completed.
Exiting....
SW3#vlan database
SW3(vlan)#vlan 8
VLAN 8 added:
Name: VLAN0008
SW3(vlan)#vlan 10
VLAN 10 added:
Name: VLAN0010
SW3(vlan)#vlan 11
VLAN 11 added:
Name: VLAN0011
SW3(vlan)#exi
APPLY completed.
Exiting....
(3)SW3的二层接口配置[/b]
SW3(config)#interface fastEthernet 0/10
SW3(config-if)#switchport mode access
SW3(config-if)#switchport access vlan 10
SW3(config-if)#exit
SW3(config)#interface fastEthernet 0/11
SW3(config-if)#switchport mode access
SW3(config-if)#switchport access vlan 11
SW3(config-if)#exit
SW3(config)#interface fastEthernet 0/1
SW3(config-if)#switchport trunk encapsulation dot1q
SW3(config-if)#switchport mode trunk
*Mar 1 00:03:59.883: %DTP-5-TRUNKPORTON: Port Fa0/1 has become dot1q trunk
SW3(config-if)#switchport trunk allowed vlan all
SW3(config-if)#switchport trunk native vlan 8
SW3(config-if)#exit
SW3(config)#interface fastEthernet 0/3
SW3(config-if)#switchport trunk encapsulation dot1q
SW3(config-if)#switchport mode trunk
*Mar 1 00:04:43.355: %DTP-5-TRUNKPORTON: Port Fa0/3 has become dot1q trunk
SW3(config-if)#switchport trunk allowed vlan all
SW3(config-if)#exit
SW4[/b]的二层接口配置[/b]
SW4(config)#interface fastEthernet 0/10
SW4(config-if)#switchport mode access
SW4(config-if)#switchport access vlan 10
SW4(config-if)#exit
SW4(config)#interface fastEthernet 0/11
SW4(config-if)#switchport mode access
SW4(config-if)#switchport access vlan 11
SW4(config-if)#exit
SW4(config)#interface fastEthernet 0/3
SW4(config-if)#switchport trunk encapsulation dot1q
SW4(config-if)#switchport mode trunk
*Mar 1 00:12:18.667: %DTP-5-TRUNKPORTON: Port Fa0/3 has become dot1q trunk
SW4(config-if)#switchport trunk allowed vlan all
SW4(config-if)#exit
(4)SW3[/b]网管IP[/b]
SW3(config)#interface vlan 8
*Mar 1 00:04:56.091: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan8, changed state to up
SW3(config-if)#ip address 192.168.8.130 255.255.255.128
SW3(config-if)#no shutdown
SW3(config-if)#exit
SW3(config)#ip default-gateway 192.168.8.129
SW4[/b]网管IP[/b]
SW4(config)#interface vlan 8
*Mar 1 00:12:29.119: %LINEPROTO-5-UPDOWN: Line protocol on Interface Vlan8, changed state to up
SW4(config-if)#ip add 192.168.8.131 255.255.255.128
SW4(config-if)#no shutdown
SW4(config-if)#exit
SW4(config)#ip default-gateway 192.168.8.129
(5)RT5[/b]的三层接口配置[/b]
RT5(config)#interface ethernet 0/0
RT5(config-if)#ip ad
RT5(config-if)#ip address 192.168.8.129 255.255.255.128
RT5(config-if)#no shutdown
*Mar 1 00:31:00.243: %LINK-3-UPDOWN: Interface Ethernet0/0, changed state to up
*Mar 1 00:31:01.243: %LINEPROTO-5-UPDOWN: Line protocol on Interface Ethernet0/0, changed state to up
RT5(config-if)#exit
RT5(config-subif)#interface ethernet 0/0.10
RT5(config-subif)#encapsulation dot1Q 10
RT5(config-subif)#ip address 192.168.10.1 255.255.255.0
RT5(config-subif)#no shutdown
RT5(config-subif)#exit
RT5(config)#interface ethernet 0/0.11
RT5(config-subif)#encapsulation dot1Q 11
RT5(config-subif)#ip address 192.168.11.1 255.255.255.0
RT5(config-subif)#no shutdown
RT5(config-subif)#exit
RT5#show ip interface brief
Interface IP-Address OK? Method Status Protocol
Ethernet0/0 192.168.8.129 YES manual up up
Ethernet0/0.10 192.168.10.1 YES manual up up
Ethernet0/0.11 192.168.11.1 YES manual up up
Ethernet0/1 unassigned YES unset administratively down down
Ethernet0/2 unassigned YES unset administratively down down
Ethernet0/3 unassigned YES unset administratively down down
四、测试结果[/b]
设备 | PC1 | PC2 | PC3 | PC4 | SW3 | SW4 | RT5 |
192.168.10.10 | √ | √ | √ | √ | √ | √ | √ |
192.168.10.20 | √ | √ | √ | √ | √ | √ | √ |
192.168.11.10 | √ | √ | √ | √ | √ | √ | √ |
192.168.11.20 | √ | √ | √ | √ | √ | √ | √ |
192.168.8.130 | √ | √ | √ | √ | √ | √ | √ |
192.168.8.131 | √ | √ | √ | √ | √ | √ | √ |
192.168.8.129 | √ | √ | √ | √ | √ | √ | √ |
192.168.10.1 | √ | √ | √ | √ | √ | √ | √ |
192.168.11.1 | √ | √ | √ | √ | √ | √ | √ |
在配置虚拟子接口的时候忘记输入encapsulation dot1q 10/11的命令,总查找不到已经配入的IP,后来才发现原因。这句命令的作用是允许 Vlan10/Vlan11的数据进入,并给出去的数据打上Vlan10/Vlan11的标签。
[align=left]六、实验心得[/b][/align]
[align=left]单臂路由是一个简单却很重要的技术,这个实验虽然简单,却让我们很好的了解了单臂路由的原理以及基本配置方法,但是方法虽然简单,一些细节部分还是要注意。[/align]本文出自 “IT入门” 博客,谢绝转载!
相关文章推荐
- 用boson做vlan的单臂路由实验
- 实验四 利用单臂路由实现VLAN间路由
- 实验4 利用单臂路由实现VLAN间路由
- Vlan间路由实验(单臂路由实现法)
- Vlan间路由实验(单臂路由实现法)
- Vlan间路由实验(单臂路由实现法)
- 思科单臂路由实验配置,实现跨vlan通讯
- CCNA实验:VLan间路由实验配置 (单臂路由)
- Cisco 3550交换机 Vlan间路由实验(单臂路由实现法)
- Vlan间路由实验(单臂路由实现法)
- 实验三:利用单臂路由实现VLAN间路由
- 配置单臂路由实现vlan间通信实验报告
- 实验 21 VLAN 间的路由—单臂路由
- CCNA实验之---单臂路由实现VLAN间路由
- 实验四:利用单臂路由实现VLAN间路由
- 三层交换单臂路由vlan间通信综合实验之降龙要点[转]
- VLAN及单臂路由实验
- NA-NP-IE系列实验50: 单臂路由实现VLAN 间路由
- 实验4 利用单臂路由实现vlan间路由
- 实验4 利用单臂路由实现VLAN间路由