今天的学习成果,巩固一下。
LSW1
<Huawei>sy
[Huawei]vlan batch 10 20
[Huawei]int gig0/0/1
[Huawei-GigabitEthernet0/0/1]port link-type access
[Huawei-GigabitEthernet0/0/1]port default vlan 10
[Huawei-GigabitEthernet0/0/1]q
[Huawei]int gig 0/0/2
[Huawei-GigabitEthernet0/0/2]port link-type access
[Huawei-GigabitEthernet0/0/2]port default vlan 10
[Huawei-GigabitEthernet0/0/2]int gig 0/0/3
[Huawei]int gig 0/0/3
[Huawei-GigabitEthernet0/0/3]port link-type access
[Huawei-GigabitEthernet0/0/3]port default vlan 10
[Huawei-GigabitEthernet0/0/3]q
[Huawei]int gig 0/0/4
[Huawei-GigabitEthernet0/0/4]port link-type access
[Huawei-GigabitEthernet0/0/4]port default vlan 20
[Huawei-GigabitEthernet0/0/4]q
[Huawei]int gig 0/0/5
[Huawei-GigabitEthernet0/0/5]port link-type access
[Huawei-GigabitEthernet0/0/5]port default vlan 20
[Huawei-GigabitEthernet0/0/5]q
[Huawei]int gig 0/0/6
[Huawei-GigabitEthernet0/0/6]port link-type access
[Huawei-GigabitEthernet0/0/6]port default vlan 20
[Huawei-GigabitEthernet0/0/6]q
[Huawei]int gig 0/0/7
[Huawei-GigabitEthernet0/0/7]port link-type trunk
[Huawei-GigabitEthernet0/0/7]port trunk allow-pass vlan all
R3
<Huawei>sy
[Huawei]int gig0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 1.0.0.2 24
[Huawei-GigabitEthernet0/0/0]int gig0/0/1
[Huawei-GigabitEthernet0/0/1]ip address 2.0.0.1 24
[Huawei-GigabitEthernet0/0/1]q
[Huawei]rip 1
[Huawei-rip-1]version 2
[Huawei-rip-1]network 1.0.0.0
[Huawei-rip-1]network 2.0.0.0
[Huawei-rip-1]q
[Huawei]dhcp enable
[Huawei]int gig0/0/0.10
[Huawei-GigabitEthernet0/0/0.10]ip address 1.1.10.1 24
[Huawei-GigabitEthernet0/0/0.10]dot1q termination vid 10
[Huawei-GigabitEthernet0/0/0.10]arp broadcast enable
[Huawei-GigabitEthernet0/0/0.10]dhcp select relay
[Huawei-GigabitEthernet0/0/0.10]dhcp relay server-ip 3.0.0.2
[Huawei-GigabitEthernet0/0/0.10]int gig0/0/0.20
[Huawei-GigabitEthernet0/0/0.20]dot1q termination vid 20
[Huawei-GigabitEthernet0/0/0.20]ip address 1.1.20.1 24
[Huawei-GigabitEthernet0/0/0.20]arp broadcast enable
[Huawei-GigabitEthernet0/0/0.20]dhcp select relay
[Huawei-GigabitEthernet0/0/0.20]dhcp relay server-ip 3.0.0.2
R2
<Huawei>sy
[Huawei]int gig0/0/0
[Huawei-GigabitEthernet0/0/0]ip add 2.0.0.2 24
[Huawei-GigabitEthernet0/0/0]int gig0/0/1
[Huawei-GigabitEthernet0/0/1]ip add 3.0.0.1 24
[Huawei-GigabitEthernet0/0/1]q
[Huawei]rip 1
[Huawei-rip-1]version 2
[Huawei-rip-1]network 2.0.0.0
[Huawei-rip-1]network 3.0.0.0
[Huawei]dhcp enable
[Huawei]int gig0/0/0
[Huawei-GigabitEthernet0/0/0]dhcp select relay
[Huawei-GigabitEthernet0/0/0]dhcp relay server-ip 3.0.0.2
R1
<Huawei>sy
[Huawei]int gig0/0/0
[Huawei-GigabitEthernet0/0/0]ip address 3.0.0.2 24
[Huawei-GigabitEthernet0/0/0]q
[Huawei]rip 1
[Huawei-rip-1]version 2
[Huawei-rip-1]network 3.0.0.0
[Huawei-rip-1]q
[Huawei]dhcp enable
[Huawei]interface gig0/0/0
[Huawei-GigabitEthernet0/0/0]dhcp select global
[Huawei-GigabitEthernet0/0/0]q
[Huawei]ip pool vlan10
[Huawei-ip-pool-vlan10]network 1.1.10.1 mask 24
[Huawei-ip-pool-vlan10]gateway-list 1.1.10.1
[Huawei-ip-pool-vlan10]dns-list 8.8.8.8
[Huawei-ip-pool-vlan10]q
[Huawei]ip pool vlan20
[Huawei-ip-pool-vlan20]network 1.1.20.1 mask 24
[Huawei-ip-pool-vlan20]gateway-list 1.1.20.1
[Huawei-ip-pool-vlan20]dns-list 8.8.8.8