Chinaunix首页 | 论坛 | 博客
  • 博客访问: 68023
  • 博文数量: 2
  • 博客积分: 1420
  • 博客等级: 上尉
  • 技术积分: 145
  • 用 户 组: 普通用户
  • 注册时间: 2006-11-07 15:41
文章分类
文章存档

2008年(2)

我的朋友
最近访客

分类: 系统运维

2008-08-04 17:32:49

Dynamips 模拟器做单臂路由

配置见清单

实验当中碰到的问题

1:模拟pc的Router要配置no ip routing
2:模拟的PC要配置默认网关。否则还是无法ping通对方VLAN
3子接口必须是模拟PC的默认网关,否则无法通。

刚开始交换机和路由器还有PC都配置好后,PC只能ping通自己的网关,但是ping不到另外一个vlan,后来检查了一下配置,发现没什么问题,又到网上找了点资料,发现在这个虚拟环境下面,替代PC机的路由器要用no ip routing命令关闭路由功能。使用该命令后后一切正常,不太理解其中奥秘。。。

 
配置清单
配置清单:
ROUTER1:
Router#show run
Building configuration...

Current configuration : 577 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
       
!
interface FastEthernet0/0
 no ip address
 duplex auto
 speed auto
!
interface FastEthernet0/0.1
 encapsulation dot1Q 10
 ip address 192.168.1.1 255.255.255.0
!
interface FastEthernet0/0.2
 encapsulation dot1Q 20
 ip address 192.168.2.1 255.255.255.0
!
ip http server
!
!
!
!
!
control-plane
!
       
line con 0
line aux 0
line vty 0 4
!
end
------------------------------------------------------------------
SWITCH:
Router#show run
Building configuration...

Current configuration : 937 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
!
!
ip cef
!
!
!
!
       
!
interface FastEthernet0/0
 switchport mode trunk
!
interface FastEthernet0/1
 switchport access vlan 10
 duplex full
 speed 100
!
interface FastEthernet0/2
 switchport access vlan 20
 duplex full
 speed 100
!
interface FastEthernet0/3
!
interface FastEthernet0/4
!
interface FastEthernet0/5
!
interface FastEthernet0/6
!
interface FastEthernet0/7
!
interface FastEthernet0/8
!
interface FastEthernet0/9
!
interface FastEthernet0/10
!
interface FastEthernet0/11
!
interface FastEthernet0/12
!
interface FastEthernet0/13
!
interface FastEthernet0/14
!
interface FastEthernet0/15
!
interface Vlan1
 no ip address
!
ip http server
!
       
!
!
!
control-plane
!
!
line con 0
line aux 0
line vty 0 4
!
end
------------------------------------------------------------------
PC1:
Router#show run

interface FastEthernet0/0
 ip address 192.168.1.10 255.255.255.0
 no ip route-cache
 duplex auto
 speed auto
!
ip default-gateway 192.168.1.1
ip http server
------------------------------------------------------------------
PC2:
Router#show run

interface FastEthernet0/0
 ip address 192.168.2.10 255.255.255.0
 no ip route-cache
 duplex auto
 speed auto
!
ip default-gateway 192.168.2.1
ip http server
-------------------------------------------------------------------
测试:
PC1 ping PC2
Router#ping 192.168.2.10

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.2.10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 204/290/372 ms

PC2 ping PC1
Router#ping 192.168.1.10

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.10, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 104/233/360 ms

成功。
阅读(2070) | 评论(0) | 转发(0) |
0

上一篇:没有了

下一篇:应该要养成的习惯

给主人留下些什么吧!~~