华为网络设备综合配置实验

华为网络设备综合配置实验_第1张图片

一、三层交换机S1与S2
1、LACP配置
1)创建Eth-Trunk1
interface Eth-Trunk 1
quit
2)将指定端口加入Eth-Trunk 1
interface GigabitEthernet 0/0/4
eth-trunk 1
quit
interface GigabitEthernet 0/0/5
eth-trunk 1
quit
3)查看配置结果
display eth-trunk 1

2、批量配置Trunk并允许所有VLAN报文通过
interface Eth-Trunk 1
port link-type trunk
port trunk allow-pass vlan all
port-group gtrunk
group-member GigabitEthernet 0/0/1 to GigabitEthernet 0/0/3
port link-type trunk
port trunk allow-pass vlan all

3、创建VLAN并配置VLANIF
vlan batch 2 to 5
interface Vlanif 1
ip address 192.168.1.1 24
.....

4、STP设置
S1:stp mode stp
stp root primary
S2:stp mode stp
stp root secondary

5、路由接口配置
vlan 6
interface Vlanif 6
ip address 192.168.6.2 24
interface GigabitEthernet 0/0/6
port link-type trunk
port trunk pvid vlan 6
port trunk allow-pass vlan all

6、nqa设置
nqa test-instance user test
test-type icmp 
destination-address ipv4 20.20.20.2 
frequency 10 
probe-count 1 
start now

7、ip route关联nqa
ip route-static 0.0.0.0 0.0.0.0 192.168.1.253 track nqa user test 
ip route-static 0.0.0.0 0.0.0.0 192.168.1.254 preference 70

二、二层交换机S3-6
1、创建VLAN并分配端口
vlan 1
vlan 2
port-group g1
group-member Ethernet 0/0/1 to Ethernet 0/0/10
port link-type access
port default vlan 1
quit
port-group g2
group-member Ethernet 0/0/11 to Ethernet 0/0/20
port link-type access
port default vlan 2

2、设置trunk端口
interface GigabitEthernet 0/0/2
port link-type trunk
port trunk allow-pass all
quit
interface GigabitEthernet 0/0/1
port link-type trunk
port trunk allow-pass all

三、路由器配置
1、设置接口IP
int g0/0/0
ip add 10.1.1.1 255.255.255

2、设置静态路由及默认路由
ip route-static 0.0.0.0 0.0.0.0 10.1.2.2
ip route-static 10.1.4.0 255.255.255.0 10.1.2.2
PS:以太网接口只能使用下一跳地址,串口接口可直接指定出接口

3、设置NAT服务器(端口映射)
nat server protocol tcp global 10.1.1.3 80 inside 192.168.1.100 80
PS:10.1.1.3不能被路由器端口占用

四、ACL设置
acl 3000
rule 5 permit icmp source 192.168.1.0 0.0.0.255 
rule 10 permit tcp destination-port eq www 
rule 20 deny ip
int g0/0/1
traffic-filter inbound acl 3000

五、未使用知识点
1、配置vrrp(热备份路由)
[R1-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 192.168.1.250
[R1-GigabitEthernet0/0/0]vrrp vrid 1 track interface g0/0/1 reduced 50
[R2-GigabitEthernet0/0/0]vrrp vrid 1 virtual-ip 192.168.1.250
[R2-GigabitEthernet0/0/0]vrrp vrid 1 track interface g0/0/1 reduced 51

你可能感兴趣的:(网络基础)