|
社区居民

- UID
- 146073
- 帖子
- 25
- 精华
- 0
- 积分
- 126
- 菊花元
- 126 元
- 威望
- 0 点
- 阅读权限
- 15
- 在线时间
- 5 小时
- 注册时间
- 2007-1-10
- 最后登录
- 2007-6-6
|
顶楼
大 中
小 发表于 2007-3-18 23:59 只看该作者
玩转-单臂路由!!!
ITAA学员设计实验 www.one-tom.com/bbs
应某新学员要求,今仿真了一个单臂路由实验台,希望对其有所帮助。另申请加入等级一实验手册------交换部分,丰富其内容。实验拓扑如下:
单臂路由,实验目的:
2600单接口,通过逻辑上的子接口,实现VLAN间通讯;
步骤如下:
< 1 > 我们拿三台路由器,仿真每个VLAN里的一台主机;
< 2 > 在Cisco2900 上划分三个VLAN,分别为:VLAN 10 、20 、30;这个时候不同VLAN里的主机是无法通讯的,想通讯就得接入路由设备;
< 3 > 2600 只有一个以太口,我们可以通过划分子接口,来实现目的;
值得注意的是:此以太口必须运行在Trunk模式,且封装相同的Trunk协议 和对应的VLAN号;这样才能正确起地址;
< 4 > 这时把每个VLAN内部主机的 缺省网关指向 2600对应的子接口地址,OK!
配置如下:
R1、R2、R3 配置就不用说了,配个地址,no ip routing ,指个网关就好。下面重点看一下2600和2900 的配置:
2900交换机配置如下:
SW-1#vlan database
SW-1(vlan)#vlan 10 name reeper-1
VLAN 10 modified:
Name: reeper-1
SW-1(vlan)#vlan 20 name reeper-2
VLAN 20 modified:
Name: reeper-2
SW-1(vlan)#vlan 30 name reeper-3
VLAN 30 modified:
Name: reeper-3
SW-1(vlan)#exit
APPLY completed.
Exiting....
SW-1(config)#interface fastEthernet 0/1
SW-1(config-if)#spanning-tree portfast
SW-1(config-if)#switchport mode access
SW-1(config-if)#switchport access vlan 10
SW-1(config)#interface fastEthernet 0/2
SW-1(config-if)#switchport mode access
SW-1(config-if)#spanning-tree portfast
SW-1(config-if)#switchport access vlan 20
SW-1(config)#interface fastEthernet 0/3
SW-1(config-if)#switchport mode access
SW-1(config-if)#spanning-tree portfast
SW-1(config-if)#switchport access vlan 30
SW-1(config)#interface fastEthernet 0/12
SW-1(config-if)#switchport mode trunk
SW-1(config-if)#switchport trunk encapsulation dot1q
SW-1#sh vlan
VLAN Name Status Ports
---- -------------------------------- --------- -------------------------------
1 default active Fa0/4, Fa0/5, Fa0/6, Fa0/7,
Fa0/8, Fa0/9, Fa0/10, Fa0/11,
Fa0/12
10 reeper-1 active Fa0/1
20 reeper-2 active Fa0/2
30 reeper-3 active Fa0/3
2600 路由器配置:
2600(config)#interface ethernet 0/0
2600(config-if)#no sh
2600(config-if)#interface e0/0.1
2600(config-subif)#encapsulation dot1Q 10
2600(config-subif)#ip address 172.16.1.254 255.255.255.0
2600(config-subif)#int e0/0.2
2600(config-subif)#enc dot 20
2600(config-subif)#ip add 172.16.2.254 255.255.255.0
2600(config-subif)#int e0/0.3
2600(config-subif)#enc dot 30
2600(config-subif)#ip add 172.16.3.254 255.255.255.0
2600#sh ip ro
Codes: C - connected, S - static, I - IGRP, R - RIP, M - mobile, B - BGP
D - EIGRP, EX - EIGRP external, O - OSPF, IA - OSPF inter area
N1 - OSPF NSSA external type 1, N2 - OSPF NSSA external type 2
E1 - OSPF external type 1, E2 - OSPF external type 2, E - EGP
i - IS-IS, su - IS-IS summary, L1 - IS-IS level-1, L2 - IS-IS level-2
ia - IS-IS inter area, * - candidate default, U - per-user static route
o - ODR, P - periodic downloaded static route
Gateway of last resort is not set
172.16.0.0/24 is subnetted, 3 subnets
C 172.16.1.0 is directly connected, Ethernet0/0.1
C 172.16.2.0 is directly connected, Ethernet0/0.2
C 172.16.3.0 is directly connected, Ethernet0/0.3
配置完成,我们做一下测试,在R1---VLAN 10,ping VLAN20里的R2,和VLAN 30 的R3 !
R-1#ping 172.16.2.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.2.1, timeout is 2 seconds:
..!!!
Success rate is 60 percent (3/5), round-trip min/avg/max = 4/10/20 ms
R-1#ping 172.16.3.1
Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 172.16.3.1, timeout is 2 seconds:
..!!!
Success rate is 60 percent (3/5), round-trip min/avg/max = 4/10/20 ms
还可以做以下扩展,加入 VTP的话 等级一的交换部分的实验就都包括了; 在上个实验加一台交换机, 起Trunk ,相互学习VLAN信息,拓扑如下:

具体实验,希望等级一学员积极参与一下,配置我会跟贴 上来。
搜索更多相关主题的帖子:
路由 单臂
QQ:346220942 群:14053628 www.one-tom.com/bbs
|