
关于CISCO路由配置的问题
怎麼设置能让两台PC可以PING通并且可以收发包啊!求大神! 展开
楼主看上面这张图...
主要是在中间两台路由器上配置,首先在R1 上配置,配置如下:
R1(config)#int f0/0
R1(config-if)#ip add
R1(config-if)#ip address 192.168.1.254 255.255.255.0
R1(config-if)#no shu
R1(config-if)#no shutdown
R1(config)#int f1/0
R1(config-if)#ip add
R1(config-if)#ip address 10.1.1.1 255.255.255.252
R1(config)#router ospf 1
R1(config-router)#network 10.1.1.1 0.0.0.0 a
R1(config-router)#network 10.1.1.1 0.0.0.0 area 0
R1(config-router)#network 192.168.1.0 0.0.0.255 area 0
R1(config-router)#exit
下面是R2 的配置
R2(config-if)#int f1/0
R2(config-if)#ip add
R2(config-if)#ip address 10.1.1.2 255.255.255.252
R2(config-if)#no shu
R2(config-if)#no shutdown
R2(config)#int f0/0
R2(config-if)#ip add
R2(config-if)#ip address 172.16.10.254 255.255.255.0
R2(config-if)#no shu
R2(config-if)#no shutdown
R2(config)#router ospf 1
R2(config-router)#network 10.1.1.2 0.0.0.0 a
R2(config-router)#network 10.1.1.2 0.0.0.0 area 0
R2(config-router)#network 172.16.10.0 0.0.0.255 area 0
R2(config-router)#end
好了,路由器上都配好了...在两边的PC上配上IP地址就OK,网关就指与自己连接的路由器的接口地址, 如果楼主使用路由器来模拟PC的话,必须在那台模拟PC的路由器上打上这条命令:no ip routing
并打上ip default-gateway +路由器的接口地址....
基本上就是这样.....楼主好运
第一,给PC指定IP地址,比如一台是192.168.1.1/24,网关填192.168.1.2(PC1),另外一台是192.168.2.1/24,网关填192.168.2.2(PC2)
第二,为路由器两个接口设置IP地址,与PC1相邻设置为192.168.1.2/24,与PC2相邻设置为192.168.2.2/24
如果你是想两台路由之间练习下路由协议
那么两台路由器要启rip,或者eigrp,ospf
以eigrp为例:
conf t
router eigrp 1
net 192.168.1.0
加我402337651然后我做个图给你