用一台路由器连通两个局域网络,它们的IP段分别为192.168.1.x/24,192.168.2.x/24。

用Cisco Packet Tracer做 求图。

只有图 你看看行不. 

我设了两个DHCP 

ip dhcp pool DHCP1

network 192.168.1.1 255.255.255.0

default-router 192.168.1.1

exit

ip dhcp pool DHCP2

network 192.168.2.1 255.255.255.0

default-router 192.168.2.1

温馨提示:答案为网友推荐,仅供参考
第1个回答  2011-11-21

f0/0 为192.168.1.1  左边的电脑网关为192.168。1.1 

f0/1 为192.168.2.1 右边电脑网关为192.168.2.1 

配好后 就可以ping通了

我要分。。。

第2个回答  2011-12-05
OK两个局域网都要通吗 那你就单臂路由吧 我图片传不上 给你配置
路由:
!
!
!
!
interface FastEthernet0/0
no ip address
duplex auto
speed auto
!
interface FastEthernet0/0.1
encapsulation dot1Q 2
ip address 192.168.1.1 255.255.255.0
!
interface FastEthernet0/0.2
encapsulation dot1Q 3
ip address 192.168.2.1 255.255.255.0
交换机:Current configuration : 1079 bytes
!
version 12.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
!
interface FastEthernet0/1
switchport mode trunk
!
interface FastEthernet0/2
!
interface FastEthernet0/3
switchport access vlan 2
switchport mode access
!
interface FastEthernet0/4
switchport access vlan 3
!
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 FastEthernet0/16 电脑1接f0/3 电脑2接F0/4 PING 192.168.2.1 通 ping 192.168.2.2 通(电脑1IP192.168.1.2/24 电脑2ip 192.168.2.2/24)
第3个回答  2011-11-21
配合楼上的图
int f0/1
ip add 192.168.1.1 255.255.255.0
no shut

int f0/2
ip add 192.168.2.1 255.255.255.0
no shut本回答被网友采纳
第4个回答  2011-11-21
enable
conf t
infer f0/1
接口模式下:

int f0/1
ip add 192.168.1.1 255.255.255.0
no shut

int f0/2
ip add 192.168.2.1 255.255.255.0
no shut

exit
ip route 192.168.1.0 192.168.2.0
ip route 192.168.2.0 192.168.1.0
或者
ip route 0.0.0.0 0.0.0.0 (所有IP)
no shut
相似回答