要求如图所示
1.配置VLAN以及接口
[L1]vlan batch 2 to 6
[L2]vlan batch 2 to 6
[L3]vlan batch 2 to 6
L1:
[L1]int g 0/0/1
[L1-GigabitEthernet0/0/1]po
[L1-GigabitEthernet0/0/1]port lin
[L1-GigabitEthernet0/0/1]port link-
[L1-GigabitEthernet0/0/1]port link-flap
[L1-GigabitEthernet0/0/1]port link-type ac
[L1-GigabitEthernet0/0/1]port link-type access
[L1-GigabitEthernet0/0/1]
May 20 2024 20:05:05-08:00 L1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 6, the ch
ange loop count is 0, and the maximum number of records is 4095.
[L1-GigabitEthernet0/0/1]pr
[L1-GigabitEthernet0/0/1]po
[L1-GigabitEthernet0/0/1]port de
[L1-GigabitEthernet0/0/1]port default v
[L1-GigabitEthernet0/0/1]port default vlan 2
[L1-GigabitEthernet0/0/1]q
[L1]
May 20 2024 20:05:35-08:00 L1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 7, the ch
ange loop count is 0, and the maximum number of records is 4095.int g 0/0/2
[L1-GigabitEthernet0/0/2]pr
[L1-GigabitEthernet0/0/2]po
[L1-GigabitEthernet0/0/2]port hy
[L1-GigabitEthernet0/0/2]port hybrid p
[L1-GigabitEthernet0/0/2]port hybrid pvid v
[L1-GigabitEthernet0/0/2]port hybrid pvid vlan 3
[L1-GigabitEthernet0/0/2]po
[L1-GigabitEthernet0/0/2]port
May 20 2024 20:06:05-08:00 L1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 8, the ch
ange loop count is 0, and the maximum number of records is 4095.jy
[L1-GigabitEthernet0/0/2]port hy
[L1-GigabitEthernet0/0/2]port hybrid un
[L1-GigabitEthernet0/0/2]port hybrid untagged v
[L1-GigabitEthernet0/0/2]port hybrid untagged vlan 3 to 6
[L1-GigabitEthernet0/0/2]
May 20 2024 20:06:25-08:00 L1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 9, the ch
ange loop count is 0, and the maximum number of records is 4095.q
[L1]int g 0/0/3
[L1-GigabitEthernet0/0/3]po
[L1-GigabitEthernet0/0/3]port t
[L1-GigabitEthernet0/0/3]port type a
[L1-GigabitEthernet0/0/3]port type all
[L1-GigabitEthernet0/0/3]port lin
[L1-GigabitEthernet0/0/3]port link-
[L1-GigabitEthernet0/0/3]port link-flap
[L1-GigabitEthernet0/0/3]port link-type t
[L1-GigabitEthernet0/0/3]port link-type trunk
[L1-GigabitEthernet0/0/3]po
[L1-GigabitEthernet0/0/3]port t
May 20 2024 20:07:05-08:00 L1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 10, the c
hange loop count is 0, and the maximum number of records is 4095.
[L1-GigabitEthernet0/0/3]port trunk a
[L1-GigabitEthernet0/0/3]port trunk allow-pass v
[L1-GigabitEthernet0/0/3]port trunk allow-pass vlan 2 to 6
[L1-GigabitEthernet0/0/3]
May 20 2024 20:07:15-08:00 L1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 11, the c
hange loop count is 0, and the maximum number of records is 4095.q
[L1]int g 0/0/4
[L1-GigabitEthernet0/0/4]po
[L1-GigabitEthernet0/0/4]port ht
[L1-GigabitEthernet0/0/4]port hy
[L1-GigabitEthernet0/0/4]port hybrid un
[L1-GigabitEthernet0/0/4]port hybrid untagged v
[L1-GigabitEthernet0/0/4]port hybrid untagged vlan 3 to 6
[L1-GigabitEthernet0/0/4]
May 20 2024 20:07:45-08:00 L1 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 12, the c
hange loop count is 0, and the maximum number of records is 4095.po
[L1-GigabitEthernet0/0/4]port hy
[L1-GigabitEthernet0/0/4]port hybrid t
[L1-GigabitEthernet0/0/4]port hybrid tagged v
[L1-GigabitEthernet0/0/4]port hybrid tagged vlan 2
[L1-GigabitEthernet0/0/4]
L2:
[L2]int g 0/0/1
[L2-GigabitEthernet0/0/1]po
[L2-GigabitEthernet0/0/1]port lin
[L2-GigabitEthernet0/0/1]port link-
[L2-GigabitEthernet0/0/1]port link-flap
[L2-GigabitEthernet0/0/1]port link-type ac
[L2-GigabitEthernet0/0/1]port link-type access
[L2-GigabitEthernet0/0/1]po
[L2-GigabitEthernet0/0/1]port de
[L2-GigabitEthernet0/0/1]port default v
[L2-GigabitEthernet0/0/1]port default vlan 2
[L2-GigabitEthernet0/0/1]
May 20 2024 20:09:36-08:00 L2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 8, the ch
ange loop count is 0, and the maximum number of records is 4095.
[L2-GigabitEthernet0/0/1]q
[L2]int g 0/0/2
[L2-GigabitEthernet0/0/2]po
[L2-GigabitEthernet0/0/2]port hy
[L2-GigabitEthernet0/0/2]port hybrid p
[L2-GigabitEthernet0/0/2]port hybrid pvid v
[L2-GigabitEthernet0/0/2]port hybrid pvid vlan 4
[L2-GigabitEthernet0/0/2]po
[L2-GigabitEthernet0/0/2]port hy
[L2-GigabitEthernet0/0/2]port hybrid un
[L2-GigabitEthernet0/0/2]port hybrid untagged v
[L2-GigabitEthernet0/0/2]port hybrid untagged vlan 3
May 20 2024 20:10:06-08:00 L2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 9, the ch
ange loop count is 0, and the maximum number of records is 4095.to 6
[L2-GigabitEthernet0/0/2]q
[L2]int
May 20 2024 20:10:16-08:00 L2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 10, the c
hange loop count is 0, and the maximum number of records is 4095.
[L2]interface g 0/0/3
[L2-GigabitEthernet0/0/3]po
[L2-GigabitEthernet0/0/3]port lin
[L2-GigabitEthernet0/0/3]port link-
[L2-GigabitEthernet0/0/3]port link-flap
[L2-GigabitEthernet0/0/3]port link-
[L2-GigabitEthernet0/0/3]port link-flap
[L2-GigabitEthernet0/0/3]port link-type tr
[L2-GigabitEthernet0/0/3]port link-type trunk
[L2-GigabitEthernet0/0/3]po
[L2-GigabitEthernet0/0/3]port t
May 20 2024 20:10:36-08:00 L2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 11, the c
hange loop count is 0, and the maximum number of records is 4095.
[L2-GigabitEthernet0/0/3]port trunka
[L2-GigabitEthernet0/0/3]port trunk a
[L2-GigabitEthernet0/0/3]port trunk allow-pass v
[L2-GigabitEthernet0/0/3]port trunk allow-pass vlan 2 to 6
[L2-GigabitEthernet0/0/3]q
[L2]int g
May 20 2024 20:10:46-08:00 L2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 12, the c
hange loop count is 0, and the maximum number of records is 4095.0/0/4
[L2-GigabitEthernet0/0/4]po
[L2-GigabitEthernet0/0/4]port lin
[L2-GigabitEthernet0/0/4]port link-
[L2-GigabitEthernet0/0/4]port link-flap
[L2-GigabitEthernet0/0/4]port link-type tr
[L2-GigabitEthernet0/0/4]port link-type trunk
[L2-GigabitEthernet0/0/4]po
[L2-GigabitEthernet0/0/4]port t
[L2-GigabitEthernet0/0/4]port trunk a
[L2-GigabitEthernet0/0/4]port trunk allow-pass v
[L2-GigabitEthernet0/0/4]port trunk allow-pass vlan 2 to
May 20 2024 20:11:06-08:00 L2 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 13, the c
hange loop count is 0, and the maximum number of records is 4095.6
[L2-GigabitEthernet0/0/4]q
L3:
[L3]int g 0/0/1
[L3-GigabitEthernet0/0/1]po
[L3-GigabitEthernet0/0/1]port hy
[L3-GigabitEthernet0/0/1]port hybrid p
[L3-GigabitEthernet0/0/1]port hybrid pvid v
[L3-GigabitEthernet0/0/1]port hybrid pvid vlan 5
[L3-GigabitEthernet0/0/1]
May 20 2024 20:12:07-08:00 L3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 6, the ch
ange loop count is 0, and the maximum number of records is 4095.po
[L3-GigabitEthernet0/0/1]port hy
[L3-GigabitEthernet0/0/1]port hybrid un
[L3-GigabitEthernet0/0/1]port hybrid untagged v
[L3-GigabitEthernet0/0/1]port hybrid untagged vlan 3 to 5
[L3-GigabitEthernet0/0/1]q
[L3]int g
May 20 2024 20:12:28-08:00 L3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 7, the ch
ange loop count is 0, and the maximum number of records is 4095.0/0/2
[L3-GigabitEthernet0/0/2]po
[L3-GigabitEthernet0/0/2]port hy
[L3-GigabitEthernet0/0/2]port hybrid p
[L3-GigabitEthernet0/0/2]port hybrid pvid v
[L3-GigabitEthernet0/0/2]port hybrid pvid vlan 6
[L3-GigabitEthernet0/0/2]po
[L3-GigabitEthernet0/0/2]port hy
[L3-GigabitEthernet0/0/2]port hybrid un
[L3-GigabitEthernet0/0/2]port hybrid untagged
May 20 2024 20:12:48-08:00 L3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 8, the ch
ange loop count is 0, and the maximum number of records is 4095.v
[L3-GigabitEthernet0/0/2]port hybrid untagged vlan 3 4 6
[L3-GigabitEthernet0/0/2]q
[L3]
May 20 2024 20:12:58-08:00 L3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 9, the ch
ange loop count is 0, and the maximum number of records is 4095.dis
[L3]int g 0/0/3
[L3-GigabitEthernet0/0/3]po
[L3-GigabitEthernet0/0/3]port li
[L3-GigabitEthernet0/0/3]port link-
[L3-GigabitEthernet0/0/3]port link-flap
[L3-GigabitEthernet0/0/3]port link-type tr
[L3-GigabitEthernet0/0/3]port link-type trunk
[L3-GigabitEthernet0/0/3]po
[L3-GigabitEthernet0/0/3]port t
[L3-GigabitEthernet0/0/3]port trunk a
[L3-GigabitEthernet0/0/3]port trunk allow-pass v
[L3-GigabitEthernet0/0/3]port trunk allow-pass vlan 2 to 6
[L3-GigabitEthernet0/0/3]
May 20 2024 20:13:18-08:00 L3 DS/4/DATASYNC_CFGCHANGE:OID 1.3.6.1.4.1.2011.5.25.
191.3.1 configurations have been changed. The current change number is 11, the c
hange loop count is 0, and the maximum number of records is 4095.
[L3-GigabitEthernet0/0/3]q
2.配置路由器
R1:
[R1]int g 0/0/0
[R1-GigabitEthernet0/0/0]ip ad
[R1-GigabitEthernet0/0/0]ip address 192.168.1.1 24
May 20 2024 20:14:05-08:00 R1 %%01IFNET/4/LINK_STATE(l)[0]:The line protocol IP
on the interface GigabitEthernet0/0/0 has entered the UP state.
[R1-GigabitEthernet0/0/0]q
[R1]int g 0/0/0.1
[R1-GigabitEthernet0/0/0.1]ip ad
[R1-GigabitEthernet0/0/0.1]ip address 192.168.2.1 24
[R1-GigabitEthernet0/0/0.1]do
[R1-GigabitEthernet0/0/0.1]dot1q ter
[R1-GigabitEthernet0/0/0.1]dot1q termination v
[R1-GigabitEthernet0/0/0.1]dot1q termination vid 2
May 20 2024 20:14:33-08:00 R1 %%01IFNET/4/LINK_STATE(l)[1]:The line protocol IP
on the interface GigabitEthernet0/0/0.1 has entered the UP state.
[R1-GigabitEthernet0/0/0.1]ar
[R1-GigabitEthernet0/0/0.1]arp br
[R1-GigabitEthernet0/0/0.1]arp broadcast e
[R1-GigabitEthernet0/0/0.1]arp broadcast enable
[R1-GigabitEthernet0/0/0.1]q
[R1]dh
[R1]dhcp en
[R1]dhcp enable
Info: The operation may take a few seconds. Please wait for a moment.done.
[R1]ip p
[R1]ip policy-based-route
[R1]ip pool aa
Info: It's successful to create an IP address pool.
[R1-ip-pool-aa]ne
[R1-ip-pool-aa]netbios-typeq
[R1-ip-pool-aa]netbios-type
[R1-ip-pool-aa]netbios-type
[R1-ip-pool-aa]net
[R1-ip-pool-aa]network 192.168.2.0 m
[R1-ip-pool-aa]network 192.168.2.0 mask 24
[R1-ip-pool-aa]ge
[R1-ip-pool-aa]get
[R1-ip-pool-aa]ga
[R1-ip-pool-aa]gateway-list 192.168.1.1
Error:The network section should be within the subnet of the pool.
[R1-ip-pool-aa]gateway-list 192.168.2.1
[R1-ip-pool-aa]dns
[R1-ip-pool-aa]dns-list 8.8.8.8
[R1-ip-pool-aa]q
[R1]int g 0/0/0.1
[R1-GigabitEthernet0/0/0.1]dh
[R1-GigabitEthernet0/0/0.1]dhcp s
[R1-GigabitEthernet0/0/0.1]dhcp select g
[R1-GigabitEthernet0/0/0.1]dhcp select global
[R1-GigabitEthernet0/0/0.1]q
[R1]ip poo
[R1]ip pool bb
Info: It's successful to create an IP address pool.
[R1-ip-pool-bb]net
[R1-ip-pool-bb]netw
[R1-ip-pool-bb]network 192.168.1.0 ms
[R1-ip-pool-bb]network 192.168.1.0 ma
[R1-ip-pool-bb]network 192.168.1.0 mask 24
[R1-ip-pool-bb]ga
[R1-ip-pool-bb]gateway-list 192.168.1.1
[R1-ip-pool-bb]dn
[R1-ip-pool-bb]dns-list 8.8.8.8
[R1-ip-pool-bb]q
[R1]int g0/0/0
[R1-GigabitEthernet0/0/0]dh
[R1-GigabitEthernet0/0/0]dhcp s
[R1-GigabitEthernet0/0/0]dhcp select g
[R1-GigabitEthernet0/0/0]dhcp select global
[R1-GigabitEthernet0/0/0]q
[R1]
配置完成之后打开pc检查是否获得ip
检查题目中PC互ping是否正常,并观察PC的ip地址是否符合题目中要求不在同一网段
实验结束