Network Security Internet Technology Development Database Servers Mobile Phone Android Software Apple Software Computer Software News IT Information

In addition to Weibo, there is also WeChat

Please pay attention

WeChat public account

Shulou

DHCP+VLAN multi-segment comprehensive experiment

2025-01-31 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Network Security >

Share

Shulou(Shulou.com)06/01 Report--

The topology diagram is as follows:

SW:SW#sh runBuilding configuration... Current configuration : 1538 bytes! version 12.2no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption! hostname Switch!!!!! ip routing!!!!!!!!!! spanning-tree mode pvst!!!! interface FastEthernet0/1 switchport trunk encapsulation dot1q switchport mode trunk! interface FastEthernet0/2 switchport trunk encapsulation dot1q switchport mode trunk! interface FastEthernet0/3 switchport trunk encapsulation dot1q switchport mode trunk! interface FastEthernet0/4 switchport trunk encapsulation dot1q switchport mode trunk! 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! interface GigabitEthernet0/2! interface Vlan1 ip address 192.168.0.254 255.255.255.0! interface Vlan10 ip address 192.168.10.254 255.255.255.0 ip helper-address 192.168.0.20! interface Vlan20 ip address 192.168.20.254 255.255.255.0 ip helper-address 192.168.0.20! ip classless!!!!!!! line con 0! line aux 0! line vty 0 4 login!!! endSW# ------------------------------------------------------------------------------------------------------------------------------------------------------------------------SW1: SW1#show run Building configuration... Current configuration : 1809 bytes! version 12.1no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption! hostname SW1!! spanning-tree mode pvst! interface FastEthernet0/1 switchport mode trunk! interface FastEthernet0/2 switchport access vlan 10! interface FastEthernet0/3 switchport access vlan 10! interface FastEthernet0/4 switchport access vlan 10! interface FastEthernet0/5 switchport access vlan 10! interface FastEthernet0/6 switchport access vlan 10! interface FastEthernet0/7 switchport access vlan 10! interface FastEthernet0/8 switchport access vlan 10! interface FastEthernet0/9 switchport access vlan 10! interface FastEthernet0/10 switchport access vlan 10! interface FastEthernet0/11 switchport access vlan 10! interface FastEthernet0/12 switchport access vlan 10! interface FastEthernet0/13 switchport access vlan 20! interface FastEthernet0/14 switchport access vlan 20! interface FastEthernet0/15 switchport access vlan 20! interface FastEthernet0/16 switchport access vlan 20! interface FastEthernet0/17 switchport access vlan 20! interface FastEthernet0/18 switchport access vlan 20! interface FastEthernet0/19 switchport access vlan 20! interface FastEthernet0/20 switchport access vlan 20! interface FastEthernet0/21 switchport access vlan 20! interface FastEthernet0/22 switchport access vlan 20! interface FastEthernet0/23 switchport access vlan 20! interface FastEthernet0/24 switchport access vlan 20! interface GigabitEthernet1/1! interface GigabitEthernet1/2! interface Vlan1 no ip address! interface Vlan10 no ip address! interface Vlan20 no ip address!! line con 0! line vty 0 4 loginline vty 5 15 login!! endSW1#----------------------------------------------------------------------------------------------------------------------------------------------------------------------- SW2: SW2#SH RUNBuilding configuration... Current configuration : 1742 bytes! version 12.1no service timestamps log datetime msecno service timestamps debug datetime msecno service password-encryption! hostname SW2!! spanning-tree mode pvst! interface FastEthernet0/1 switchport mode trunk! interface FastEthernet0/2 switchport access vlan 10! interface FastEthernet0/3 switchport access vlan 10! interface FastEthernet0/4 switchport access vlan 10! interface FastEthernet0/5 switchport access vlan 10! interface FastEthernet0/6 switchport access vlan 10! interface FastEthernet0/7 switchport access vlan 10! interface FastEthernet0/8 switchport access vlan 10! interface FastEthernet0/9 switchport access vlan 10! interface FastEthernet0/10 switchport access vlan 10! interface FastEthernet0/11 switchport access vlan 10! interface FastEthernet0/12 switchport access vlan 10! interface FastEthernet0/13 switchport access vlan 20! interface FastEthernet0/14 switchport access vlan 20! interface FastEthernet0/15 switchport access vlan 20! interface FastEthernet0/16 switchport access vlan 20! interface FastEthernet0/17 switchport access vlan 20! interface FastEthernet0/18 switchport access vlan 20! interface FastEthernet0/19 switchport access vlan 20! interface FastEthernet0/20 switchport access vlan 20! interface FastEthernet0/21 switchport access vlan 20! interface FastEthernet0/22 switchport access vlan 20! interface FastEthernet0/23 switchport access vlan 20! interface FastEthernet0/24 switchport access vlan 20! interface GigabitEthernet1/1! interface GigabitEthernet1/2! interface Vlan1 no ip address shutdown! interface Vlan10 no ip address! interface Vlan20 no ip address!! line con 0! line vty 0 4 loginline vty 5 15 login!! endSW2#-------------------------------------------------------------------------------------------------------------------------------------------------------------------Note: DHCP DISCOVER is broadcast, and its situation can only be carried out within the same network segment, because routers will not forward Layer 2 broadcast packets. DHCP relay agent (ip helper-address) is required

Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.

Views: 0

*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.

Share To

Network Security

Wechat

© 2024 shulou.com SLNews company. All rights reserved.

12
Report