10324
查看次数
28
有帮助
8
回复
路由器:
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname lee
!
!
!
enable secret 5 $1$mERr$jCCB43K21G38QjtTn1TN90
!
!
!
!
!
aaa new-model
!
aaa authentication login SSH local
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
username cisco privilege 15 secret 5 $1$mERr$jCCB43K21G38QjtTn1TN90
!
!
license udi pid CISCO2911/K9 sn FTX1524453N
!
!
!
!
!
!
!
!
!
ip domain-name cisco.com
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/1
ip address 10.0.0.1 255.255.255.248
ip nat inside
duplex auto
speed auto
!
interface GigabitEthernet0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
ip route 192.168.0.0 255.255.255.0 10.0.0.2
!
ip flow-export version 9
!
!
ip access-list standard nat
permit 192.168.0.0 0.0.0.255
permit any
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
transport input ssh
privilege level 15
!
!
!
end
三层:
version 12.2(37)SE1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
enable secret 5 $1$mERr$jCCB43K21G38QjtTn1TN90
!
!
!
ip dhcp pool vlan3
network 192.168.0.0 255.255.255.0
default-router 192.168.0.1
dns-server 202.106.0.20
!
!
!
!
!
username cisco privilege 15 secret 5 $1$mERr$jCCB43K21G38QjtTn1TN90
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
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 FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
switchport access vlan 2
switchport mode access
!
interface GigabitEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface Vlan1
ip address 10.0.2.1 255.255.255.248
!
interface Vlan2
mac-address 0001.6333.b901
ip address 10.0.0.2 255.255.255.248
!
interface Vlan3
mac-address 0001.6333.b902
ip address 192.168.0.1 255.255.255.0
!
interface Vlan4
mac-address 0001.6333.b903
ip address 192.168.1.1 255.255.255.0
!
interface Vlan5
mac-address 0001.6333.b904
ip address 192.168.2.1 255.255.255.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.0.0.1
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
两个无法互相ping通,请问是什么问题?
version 15.1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname lee
!
!
!
enable secret 5 $1$mERr$jCCB43K21G38QjtTn1TN90
!
!
!
!
!
aaa new-model
!
aaa authentication login SSH local
!
!
!
!
!
!
!
ip cef
no ipv6 cef
!
!
!
username cisco privilege 15 secret 5 $1$mERr$jCCB43K21G38QjtTn1TN90
!
!
license udi pid CISCO2911/K9 sn FTX1524453N
!
!
!
!
!
!
!
!
!
ip domain-name cisco.com
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface GigabitEthernet0/0
no ip address
duplex auto
speed auto
shutdown
!
interface GigabitEthernet0/1
ip address 10.0.0.1 255.255.255.248
ip nat inside
duplex auto
speed auto
!
interface GigabitEthernet0/2
no ip address
duplex auto
speed auto
shutdown
!
interface Vlan1
no ip address
shutdown
!
ip classless
ip route 192.168.0.0 255.255.255.0 10.0.0.2
!
ip flow-export version 9
!
!
ip access-list standard nat
permit 192.168.0.0 0.0.0.255
permit any
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
transport input ssh
privilege level 15
!
!
!
end
三层:
version 12.2(37)SE1
no service timestamps log datetime msec
no service timestamps debug datetime msec
no service password-encryption
!
hostname Switch
!
!
enable secret 5 $1$mERr$jCCB43K21G38QjtTn1TN90
!
!
!
ip dhcp pool vlan3
network 192.168.0.0 255.255.255.0
default-router 192.168.0.1
dns-server 202.106.0.20
!
!
!
!
!
username cisco privilege 15 secret 5 $1$mERr$jCCB43K21G38QjtTn1TN90
!
!
!
!
!
!
!
!
!
!
!
spanning-tree mode pvst
!
!
!
!
!
!
interface FastEthernet0/1
!
interface FastEthernet0/2
!
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 FastEthernet0/16
!
interface FastEthernet0/17
!
interface FastEthernet0/18
!
interface FastEthernet0/19
!
interface FastEthernet0/20
!
interface FastEthernet0/21
!
interface FastEthernet0/22
!
interface FastEthernet0/23
!
interface FastEthernet0/24
!
interface GigabitEthernet0/1
switchport access vlan 2
switchport mode access
!
interface GigabitEthernet0/2
switchport trunk encapsulation dot1q
switchport mode trunk
!
interface Vlan1
ip address 10.0.2.1 255.255.255.248
!
interface Vlan2
mac-address 0001.6333.b901
ip address 10.0.0.2 255.255.255.248
!
interface Vlan3
mac-address 0001.6333.b902
ip address 192.168.0.1 255.255.255.0
!
interface Vlan4
mac-address 0001.6333.b903
ip address 192.168.1.1 255.255.255.0
!
interface Vlan5
mac-address 0001.6333.b904
ip address 192.168.2.1 255.255.255.0
!
ip classless
ip route 0.0.0.0 0.0.0.0 10.0.0.1
!
ip flow-export version 9
!
!
!
!
!
!
!
line con 0
!
line aux 0
!
line vty 0 4
login
!
!
!
end
两个无法互相ping通,请问是什么问题?
已解决! 转到解答。
标签:
- 标签:
-
其它路由相关
1 个已接受解答
已接受的解答
1、不理解你在路由器G0/0上做NAT的意义何在?即使你要做NAT,你的映射条目在哪儿?你的outside在哪儿?在路由器上完全没有体现。
2、你要是想做单臂路由,那你就在路由器上开启子接口,封装相对应的VLAN;在三层交换机上联口配置trunk模式;
3、你要是想使用三层交换机的路由功能,首先开启ip routing保证三层交换机各个int vlan互相能通信。其次在路由器的g0/0口与三层交换机的int vlan1配置同一网段,保证路由器可以与三层交换机通信。最后在三层交换机和路由器上指默认路由
2、你要是想做单臂路由,那你就在路由器上开启子接口,封装相对应的VLAN;在三层交换机上联口配置trunk模式;
3、你要是想使用三层交换机的路由功能,首先开启ip routing保证三层交换机各个int vlan互相能通信。其次在路由器的g0/0口与三层交换机的int vlan1配置同一网段,保证路由器可以与三层交换机通信。最后在三层交换机和路由器上指默认路由
8 条回复8
1、不理解你在路由器G0/0上做NAT的意义何在?即使你要做NAT,你的映射条目在哪儿?你的outside在哪儿?在路由器上完全没有体现。
2、你要是想做单臂路由,那你就在路由器上开启子接口,封装相对应的VLAN;在三层交换机上联口配置trunk模式;
3、你要是想使用三层交换机的路由功能,首先开启ip routing保证三层交换机各个int vlan互相能通信。其次在路由器的g0/0口与三层交换机的int vlan1配置同一网段,保证路由器可以与三层交换机通信。最后在三层交换机和路由器上指默认路由
2、你要是想做单臂路由,那你就在路由器上开启子接口,封装相对应的VLAN;在三层交换机上联口配置trunk模式;
3、你要是想使用三层交换机的路由功能,首先开启ip routing保证三层交换机各个int vlan互相能通信。其次在路由器的g0/0口与三层交换机的int vlan1配置同一网段,保证路由器可以与三层交换机通信。最后在三层交换机和路由器上指默认路由