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

One-arm routing DHCP and VTP

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

Share

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

1. Lab Topology:

Use the GNS3 simulator (version 0.8.6)

two。 Lab requirements:

A) C1 and C3 are vlan10 members, C2 and C4 are vlan20 members

B) configure VTP to enable SW3 to automatically learn vlan information

C) configure DHCP on R1 to assign IP to all members

D) Interoperability among all members

3. The steps of the experiment:

A) IP address division:

Gateway of vlan10 member: 192.168.10.1

Gateway of vlan20 member: 192.168.20.1

B) configuration script:

The configuration of SW1 is as follows:

SW1#conf t

SW1 (config) # no ip routing / / turn off routing

SW1 (config) # vlan 10 vlan20 20 / / add vlan 10 vlan20 at the same time

SW1 (config) # int f1and1

SW1 (config-if) # switchport access vlan10 / / add f1plash 1 to vlan10 in access mode

SW1 (config-if) # int f1and2

SW1 (config-if) # switchport access vlan 20

SW1 (config-if) # int f1and3

SW1 (config-if) # switchport access vlan 10

SW1 (config-if) # int f1and11

SW1 (config-if) # switchport mode trunk / / change the f1amp 11 interface to trunk mode

SW1 (config-if) # int f1and10

SW1 (config-if) # switchport mode trunk

SW1 (config-if) # exit

SW1 (config) # vtp domain test / / create a vtp domain

SW1 (config) # vtp password abc / / VTP domain add password

SW1 (config) # vtp pruning / / configure vtp pruning

The configuration of SW2 is as follows:

SW2#conf t

SW2 (config) # no ip routing

SW2 (config) # int f1and11

SW2 (config-if) # switchport mode trunk

SW2 (config-if) # exit

SW2 (config) # vtp domain test

SW2 (config) # vtp mode client

SW2 (config) # vtp password abc

SW2 (config) # vtp pruning

SW2 (config) # int f1and1

SW2 (config-if) # switchport access vlan 20

R1 is configured as follows:

R1#conf t

R1 (config) int f0bin0

R1 (config-if) # no shut / / activate the interface

R1 (config-if) # int f0bin0.10 / / enter the subinterface

R1 (config-subif) # encapsulation dot1Q 10 / / use this subinterface as the gateway for vlan10

R1 (config-subif) # ip add 192.168.10.1255.255.255.0

R1 (config-subif) # no shut

R1 (config-subif) # int f0bin0.20

R1 (config-subif) # encapsulation dot1Q 20

R1 (config-subif) # ip add 192.168.20.1255.255.255.0

R1 (config-subif) # no shut

R1 (config-subif) # exit

R1 (config) # ip dhcp pool v10 / / defines the IP address pool as v10

R1 (dhcp-config) # network 192.168.10.0 / 24 / / dynamically assign an IP address field

R1 (dhcp-config) # default-router 192.168.10.1 / / set the gateway

R1 (dhcp-config) # dns-server 8.8.8.8 / / configure DNS

R1 (config-subif) # exit

R1 (config) # ip dhcp pool v20

R1 (dhcp-config) # network 192.168.20.0 / 24

R1 (dhcp-config) # default-router 192.168.20.1

R1 (dhcp-config) # dns-server 8.8.8.8

4. Verification results:

A) C1 and C3 belong to vlan10,C2 and C4 belong to vlan20

B) vtp automatically learns vlan information

C) DHCP allows all members to obtain IP addresses automatically

D) Network-wide interconnection

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