多个 VLAN 中的 GNS3 IP 助手

网络工程 IPv4 ip dhcp gns3
2022-02-20 14:15:19

大家好,我在从 VLAN 3 获取 VPC 以与 Vlan 3 上的 DHCP 通信时遇到问题我也尝试在路由器上配置 IP 助手,但无济于事。

GNS 3 拓扑

路由器配置转储

Router#sh run
Building configuration...

Current configuration : 947 bytes
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
!
hostname Router
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
!
!
no ip domain lookup
no ipv6 cef
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 no ip address
 duplex full
!
interface FastEthernet0/0.2
 encapsulation dot1Q 2
 ip address 192.168.2.1 255.255.255.0
 ip helper-address 192.168.2.2
!
interface FastEthernet0/0.3
 encapsulation dot1Q 3
 ip address 192.168.3.1 255.255.255.0
 ip helper-address 192.168.2.2
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line vty 0 4
 login
!
!
end

Router#

主开关配置转储

MainSwitch#sh run
Building configuration...

Current configuration : 1674 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname MainSwitch
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
archive
 log config
  hidekeys
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/0
 no ip address
 shutdown
 clock rate 2000000
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 no ip address
 shutdown
 clock rate 2000000
!
interface FastEthernet1/0
 switchport mode trunk
!
interface FastEthernet1/1
 switchport mode trunk
!
interface FastEthernet1/2
 switchport mode trunk
!
interface FastEthernet1/3
!
interface FastEthernet1/4
!
interface FastEthernet1/5
!
interface FastEthernet1/6
!
interface FastEthernet1/7
!
interface FastEthernet1/8
!
interface FastEthernet1/9
!
interface FastEthernet1/10
!
interface FastEthernet1/11
!
interface FastEthernet1/12
!
interface FastEthernet1/13
!
interface FastEthernet1/14
!
interface FastEthernet1/15
!
interface Vlan1
 no ip address
!
ip forward-protocol nd
ip route 0.0.0.0 0.0.0.0 192.168.2.1
ip route 0.0.0.0 0.0.0.0 192.168.3.1
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end

MainSwitch#

SW-Clients 配置转储

SW-Clients#sh run
Building configuration...

Current configuration : 1944 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW-Clients
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
archive
 log config
  hidekeys
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/0
 no ip address
 shutdown
 clock rate 2000000
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 no ip address
 shutdown
 clock rate 2000000
!
interface FastEthernet1/0
 switchport mode trunk
!
interface FastEthernet1/1
 switchport access vlan 3
!
interface FastEthernet1/2
 switchport access vlan 3
!
interface FastEthernet1/3
 switchport access vlan 3
!
interface FastEthernet1/4
 switchport access vlan 3
!
interface FastEthernet1/5
 switchport access vlan 3
!
interface FastEthernet1/6
 switchport access vlan 3
!
interface FastEthernet1/7
 switchport access vlan 3
!
interface FastEthernet1/8
 switchport access vlan 3
!
interface FastEthernet1/9
 switchport access vlan 3
!
interface FastEthernet1/10
 switchport access vlan 3
!
interface FastEthernet1/11
 switchport access vlan 3
!
interface FastEthernet1/12
 switchport access vlan 3
!
interface FastEthernet1/13
 switchport access vlan 3
!
interface FastEthernet1/14
 switchport access vlan 3
!
interface FastEthernet1/15
 switchport access vlan 3
!
interface Vlan1
 no ip address
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end

SW-Clients#

SW-IT 配置转储

SW-IT#sh run
Building configuration...

Current configuration : 1939 bytes
!
version 12.4
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname SW-IT
!
boot-start-marker
boot-end-marker
!
!
no aaa new-model
memory-size iomem 5
no ip icmp rate-limit unreachable
ip cef
!
!
!
!
no ip domain lookup
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
!
archive
 log config
  hidekeys
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
interface FastEthernet0/0
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/0
 no ip address
 shutdown
 clock rate 2000000
!
interface FastEthernet0/1
 no ip address
 shutdown
 duplex auto
 speed auto
!
interface Serial0/1
 no ip address
 shutdown
 clock rate 2000000
!
interface FastEthernet1/0
 switchport mode trunk
!
interface FastEthernet1/1
 switchport access vlan 2
!
interface FastEthernet1/2
 switchport access vlan 2
!
interface FastEthernet1/3
 switchport access vlan 2
!
interface FastEthernet1/4
 switchport access vlan 2
!
interface FastEthernet1/5
 switchport access vlan 2
!
interface FastEthernet1/6
 switchport access vlan 2
!
interface FastEthernet1/7
 switchport access vlan 2
!
interface FastEthernet1/8
 switchport access vlan 2
!
interface FastEthernet1/9
 switchport access vlan 2
!
interface FastEthernet1/10
 switchport access vlan 2
!
interface FastEthernet1/11
 switchport access vlan 2
!
interface FastEthernet1/12
 switchport access vlan 2
!
interface FastEthernet1/13
 switchport access vlan 2
!
interface FastEthernet1/14
 switchport access vlan 2
!
interface FastEthernet1/15
 switchport access vlan 2
!
interface Vlan1
 no ip address
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
no cdp log mismatch duplex
!
!
!
!
!
!
control-plane
!
!
!
!
!
!
!
!
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
line vty 0 4
 login
!
!
end

SW-IT#

有没有人知道我做错了什么?

我对网络很陌生

感谢您提前帮助我。

编辑 2: 为了澄清,我将在这里转储所有 vlan 和 VTP 配置

主交换机 VLAN 和 VTP 转储

MainSwitch#sh vlan-switch

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active    Fa1/3, Fa1/4, Fa1/5, Fa1/6
                                                Fa1/7, Fa1/8, Fa1/9, Fa1/10
                                                Fa1/11, Fa1/12, Fa1/13, Fa1/14
                                                Fa1/15
2    IT                               active
3    Clients                          active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        1002   1003
2    enet  100002     1500  -      -      -        -    -        0      0
3    enet  100003     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      -      -        -    -        1      1003
1003 tr    101003     1500  1005   0      -        -    srb      1      1002
1004 fdnet 101004     1500  -      -      1        ibm  -        0      0
1005 trnet 101005     1500  -      -      1        ibm  -        0      0

MainSwitch#sh vtp status
    VTP Version                     : 2
    Configuration Revision          : 2
    Maximum VLANs supported locally : 36
    Number of existing VLANs        : 7
    VTP Operating Mode              : Server
    VTP Domain Name                 : NSFW
    VTP Pruning Mode                : Disabled
    VTP V2 Mode                     : Disabled
    VTP Traps Generation            : Disabled
    MD5 digest                      : 0x0C 0xA9 0xB5 0xF6 0x72 0xC4 0xEF 0x3C
    Configuration last modified by 0.0.0.0 at 3-1-02 00:04:54
    Local updater ID is 0.0.0.0 (no valid interface found)
    MainSwitch#

SW-Clients VLAN 和 VTP 配置\

SW-Clients#sh vlan-switch

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active
2    IT                               active
3    Clients                          active    Fa1/1, Fa1/2, Fa1/3, Fa1/4
                                                Fa1/5, Fa1/6, Fa1/7, Fa1/8
                                                Fa1/9, Fa1/10, Fa1/11, Fa1/12
                                                Fa1/13, Fa1/14, Fa1/15
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        1002   1003
2    enet  100002     1500  -      -      -        -    -        0      0
3    enet  100003     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      0      -        -    -        1      1003
1003 tr    101003     1500  1005   0      -        -    srb      1      1002
1004 fdnet 101004     1500  -      -      1        ibm  -        0      0
1005 trnet 101005     1500  -      -      1        ibm  -        0      0

SW-Clients#sh vtp status
    VTP Version                     : 2
    Configuration Revision          : 2
    Maximum VLANs supported locally : 36
    Number of existing VLANs        : 7
    VTP Operating Mode              : Server
    VTP Domain Name                 : NSFW
    VTP Pruning Mode                : Disabled
    VTP V2 Mode                     : Disabled
    VTP Traps Generation            : Disabled
    MD5 digest                      : 0x0C 0xA9 0xB5 0xF6 0x72 0xC4 0xEF 0x3C
    Configuration last modified by 0.0.0.0 at 3-1-02 00:04:54
    Local updater ID is 0.0.0.0 (no valid interface found)
    SW-Clients#

SW-IT VLAN 和 VTP 配置

VLAN Name                             Status    Ports
---- -------------------------------- --------- -------------------------------
1    default                          active
2    IT                               active    Fa1/1, Fa1/2, Fa1/3, Fa1/4
                                                Fa1/5, Fa1/6, Fa1/7, Fa1/8
                                                Fa1/9, Fa1/10, Fa1/11, Fa1/12
                                                Fa1/13, Fa1/14, Fa1/15
3    Clients                          active
1002 fddi-default                     act/unsup
1003 token-ring-default               act/unsup
1004 fddinet-default                  act/unsup
1005 trnet-default                    act/unsup

VLAN Type  SAID       MTU   Parent RingNo BridgeNo Stp  BrdgMode Trans1 Trans2
---- ----- ---------- ----- ------ ------ -------- ---- -------- ------ ------
1    enet  100001     1500  -      -      -        -    -        1002   1003
2    enet  100002     1500  -      -      -        -    -        0      0
3    enet  100003     1500  -      -      -        -    -        0      0
1002 fddi  101002     1500  -      0      -        -    -        1      1003
1003 tr    101003     1500  1005   0      -        -    srb      1      1002
1004 fdnet 101004     1500  -      -      1        ibm  -        0      0
1005 trnet 101005     1500  -      -      1        ibm  -        0      0

SW-IT#sh vtp status
    VTP Version                     : 2
    Configuration Revision          : 2
    Maximum VLANs supported locally : 36
    Number of existing VLANs        : 7
    VTP Operating Mode              : Server
    VTP Domain Name                 : NSFW
    VTP Pruning Mode                : Disabled
    VTP V2 Mode                     : Disabled
    VTP Traps Generation            : Disabled
    MD5 digest                      : 0x0C 0xA9 0xB5 0xF6 0x72 0xC4 0xEF 0x3C
    Configuration last modified by 0.0.0.0 at 3-1-02 00:04:54
    Local updater ID is 0.0.0.0 (no valid interface found)

编辑 3:DHCP 服务器转储

根据要求,转储 IOS 路由器伪装成 DHCP 服务器

DHCP 服务器配置转储

DHCP-SERVER#sh run
Building configuration...

Current configuration : 1061 bytes
!
! Last configuration change at 14:42:48 UTC Sun Jun 3 2018
!
version 15.2
service timestamps debug datetime msec
service timestamps log datetime msec
!
hostname DHCP-SERVER
!
boot-start-marker
boot-end-marker
!
!
!
no aaa new-model
no ip icmp rate-limit unreachable
ip cef
!
!
!
ip dhcp excluded-address 192.168.2.1 192.168.2.10
ip dhcp excluded-address 192.168.3.1 192.168.3.10
!
ip dhcp pool IT
 network 192.168.2.0 255.255.255.0
 default-router 192.168.2.1
!
ip dhcp pool Clients
 network 192.168.3.0 255.255.255.0
 default-router 192.168.3.1
!
!
!
no ip domain lookup
no ipv6 cef
!
!
multilink bundle-name authenticated
!
!
!
!
!
!
!
!
!
ip tcp synwait-time 5
!
!
!
!
!
!
!
!
!
!
!
!
interface FastEthernet0/0
 ip address 192.168.2.2 255.255.255.0
 duplex full
!
ip forward-protocol nd
!
!
no ip http server
no ip http secure-server
!
!
!
!
control-plane
!
!
line con 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line aux 0
 exec-timeout 0 0
 privilege level 15
 logging synchronous
 stopbits 1
line vty 0 4
 login
!
!
end

DHCP-SERVER#
1个回答

根据我们的聊天,问题似乎是您使用的是路由器,而不是交换机。您有路由问题,因为您可以 ping VLAN 的路由器子接口,但不能 ping 另一个 VLAN 的路由器子接口。

尝试在路由器中使用交换机模块,就好像它是真正的交换机一样,您将遇到各种类型的问题和限制。例如,路由器交换机模块无法进行通道,并且在实际交换机中运行良好的路由器交换机模块中缺少或不工作的许多其他功能。路由器中的交换机模块根本不具备交换机的所有功能。

如果您有实际的交换机,您所尝试的应该可以工作,但似乎“交换机”正在尝试路由,并且没有到目标网络的路由,路由器将丢弃数据包。尝试 ping 路由器中的另一个子接口不起作用,因为路由器没有收到数据包,我认为“交换机”正在丢弃它们,因为它实际上是一个路由器。我在默认启用路由的交换机上遇到了这样的问题,我必须禁用交换机上的路由才能正常工作。