码迷,mamicode.com
首页 > 其他好文 > 详细

配置单臂路由实现vlan间通信实验报告

时间:2017-06-14 02:41:00      阅读:711      评论:0      收藏:0      [点我收藏+]

标签:实验报告   交换机   路由器   接口   通信   

实验环境:

技术分享

实验要求:PC1在192.168.10.0/24网段

      PC2在192.168.20.0/24网段

      PC3在192.168.30.0/24网段

    路由器f0/0.1网关为192.168.10.1/24

    路由器f0/0.2网关为192.168.20.1/24

    路由器f0/0.3网关为192.168.30.1/24


实验过程:

1.    去除交换机sw1路由功能

sw1#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

sw1(config)#no ip routing


技术分享

2.    创建vlan10,vlan20,vlan30

sw1(config)#vlan 10

sw1(config-vlan)#exit

sw1(config)#vlan 20

sw1(config-vlan)#exit

sw1(config)#vlan 30

sw1(config-vlan)#exit

技术分享

3.    开启sw1中f1/0接口的trunk模式

sw1(config)#int f1/0

sw1(config-if)#sw mo tr

sw1(config-if)#sw

sw1(config-if)#sw tr en do

sw1(config-if)#no sh

技术分享

4.    在f/1接口中做access口vlan10

sw1(config-if)#int f1/1

sw1(config-if)#sw mo acc

sw1(config-if)#sw acc vlan 10

sw1(config-if)#no sh

技术分享

5.    在f1/2接口中做access口vlan20

sw1(config-if)#int f1/2

sw1(config-if)#sw mo acc

sw1(config-if)#sw acc vlan 20

技术分享

6.    在f1/3接口中做access口vlan30

sw1(config-if)#int f1/3

sw1(config-if)#sw mo acc

sw1(config-if)#sw acc vlan 30

sw1(config-if)#no sh

技术分享

7.    在路由器R1上配置f0/0.1接口模式和IP地址

R1#conf t

Enter configuration commands, one per line.  End with CNTL/Z.

R1(config)#int f0/0.1

R1(config-subif)#en do 10

R1(config-subif)#ip add 192.168.10.1 255.255.255.0

技术分享

8.    配置f0/0.2接口模式和IP地址

R1(config-subif)#int f0/0.2

R1(config-subif)#en do 20

R1(config-subif)#ip add 192.168.20.1 255.255.255.0

R1(config-subif)#no sh

技术分享

9.    配置f0/0.3接口模式和IP地址

R1(config-subif)#int f0/0.3

R1(config-subif)#en do 30

R1(config-subif)#ip add 192.168.30.1 255.255.255.0

R1(config-subif)#no sh

技术分享

10.  将f0/0接口开启

R1(config)#int f0/0

R1(config-if)#no sh

技术分享

11.  分别配置vlan10,vlan20,vlan30的DHCP

R1(config)#ip dhcp pool vlan10

R1(dhcp-config)#netw

R1(dhcp-config)#network 192.168.10.0 255.255.255.0

R1(dhcp-config)#de

R1(dhcp-config)#default-router 192.1568

*Mar  100:06:49.999: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered onFastEthernet0/0 (not full duplex), with sw1 FastEthernet1/0 (full duplex).

R1(dhcp-config)#default-router 192.168.10.1

R1(dhcp-config)#dns

R1(dhcp-config)#dns-server

R1(dhcp-config)#dns-server 114.114.114.114 8.8.8.8

R1(dhcp-config)#le

R1(dhcp-config)#lease 5

R1(dhcp-config)#exit

R1(config)#ip dhcp po

R1(config)#ip dhcp pool

*Mar  100:07:49.975: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered onFastEthernet0/0 (not full duplex), with sw1 FastEthernet1/0 (full duplex).

R1(config)#ip dhcp pool vlan20

R1(dhcp-config)#netw

R1(dhcp-config)#network 192.168.20.0 255.255.255.0

R1(dhcp-config)#de

R1(dhcp-config)#default-router 192.168.20.1

R1(dhcp-config)#dns

R1(dhcp-config)#dns-server 114.114.114.114 8.8.8.8

R1(dhcp-config)#le

R1(dhcp-config)#lease 5

*Mar  100:08:49.971: %CDP-4-DUPLEX_MISMATCH: duplex mismatch discovered onFastEthernet0/0 (not full duplex), with sw1 FastEthernet1/0 (full duplex).

R1(dhcp-config)#exit

R1(config)#ip dhcp po

R1(config)#ip dhcp pool vlan30

R1(dhcp-config)#netw

R1(dhcp-config)#network 192.168.30.0 255.255.255.0

R1(dhcp-config)#de

R1(dhcp-config)#default-router 192.168.30.1

R1(dhcp-config)#dns

R1(dhcp-config)#dns-server 114.114.114.114 8.8.8.8

R1(dhcp-config)#le

R1(dhcp-config)#lease 5

技术分享

技术分享

技术分享

12.  让PC机自动获取DHCP地址

VPCS[1]> ip dhcp

DDORA IP 192.168.10.2/24 GW 192.168.10.1

 

VPCS[1]> 2

VPCS[2]> ip dhcp

DDORA IP 192.168.20.2/24 GW 192.168.20.1

 

VPCS[2]> 3

VPCS[3]> ip dhcp

DDORA IP 192.168.30.2/24 GW 192.168.30.1

技术分享

13.  Ping通实验

VPCS[3]> ping 192.168.20.2

  1. 192.168.20.2 icmp_seq=1 ttl=63 time=32.149 ms

  2. 192.168.20.2 icmp_seq=2 ttl=63 time=48.299 ms

  3. 192.168.20.2 icmp_seq=3 ttl=63 time=32.283 ms

  4. 192.168.20.2 icmp_seq=4 ttl=63 time=47.820 ms

  5. 192.168.20.2 icmp_seq=5 ttl=63 time=32.510 ms

 

VPCS[3]> ping 192.168.10.2

  1. 192.168.10.2 icmp_seq=1 ttl=63 time=79.000 ms

  2. 192.168.10.2 icmp_seq=2 ttl=63 time=47.737 ms

  3. 192.168.10.2 icmp_seq=3 ttl=63 time=32.385 ms

  4. 192.168.10.2 icmp_seq=4 ttl=63 time=48.887 ms

  5. 192.168.10.2 icmp_seq=5 ttl=63 time=33.041 ms

技术分享


 

能互相通信,实验完成。

 

实验总结: 通过实验了解单臂路由的原理以及实现单臂路由的命令,dhcp的设置过程,

能在不同网段下vlan直接的互通。


配置单臂路由实现vlan间通信实验报告

标签:实验报告   交换机   路由器   接口   通信   

原文地址:http://jigang.blog.51cto.com/12902771/1935133

(0)
(0)
   
举报
评论 一句话评论(0
登录后才能评论!
© 2014 mamicode.com 版权所有  联系我们:gaon5@hotmail.com
迷上了代码!