Huawei's comprehensive experiment

A: Overview Link aggregation
is a plurality of physical interfaces as one logical interface, to increase bandwidth and provide circuit redundancy.
Is to be taken when added Eth-Trunk: an interface member
(1) Eth-Trunk interfaces can each contain up to 8 members Interface
(2) a member of the interface and the function can not be configured separately static MAC address
(3) interface to an Eth when -Trunk, must be the default hybrid interface
(4) Eth-trunk interfaces can not be nested, i.e. a member-Trunk interfaces can not be the Eth
(. 5) a member interface Ethernet interface must be the same type, i.e., mouth and FE GE interface can not join with an Eth-trunk interfaces
(6) different Ethernet interface board of the same may be added to an Eth-trunk
(. 7) if the local device using Eth-trunk, with the interface members of the peer interface directly connected such ends must be tied to Eth-trunk interfaces for communication
(8) when the rates of the member interfaces, a smaller rate interfaces may use the actual congestion and packet loss
(9) when the interface is added to the Eth-trunk after learning the MAC address learning in accordance with Eth-trunk, not in accordance with the member interfaces when the
two: a link aggregation
manual load balancing mode and static mode LACP
Huawei's comprehensive experiment

Huawei's comprehensive experiment
主动端与被动端
在静态LACP模式下,聚合组俩段的设备中,需要选择一端为主动端,而另外一端为被动端,通常情况下,LACP优先级较高的一端为主动端,如果优先级一样,那么就选MAC地址小的一端为主动端
三:实验拓扑图
Huawei's comprehensive experiment
ip自行配置
(1)sw4,sw5,sw6,sw7,sw3的vlan和trunk的配置:
这里用sw4为例:
[sw4]vlan batch 2 to 6 //创建2,3,4,5vlan
[sw4]int g0/0/1
[sw4-GigabitEthernet0/0/1]port link-type trunk //打开中继链路
[sw4-GigabitEthernet0/0/1]port trunk allow-pass vlan all
[sw4-GigabitEthernet0/0/1]quit
[sw4]int g0/0/3
[sw4-GigabitEthernet0/0/3]port link-type access
[sw4-GigabitEthernet0/0/3]port default vlan 2
[sw4-GigabitEthernet0/0/3]quit
[sw4]int g0/0/2
[sw4-GigabitEthernet0/0/2]port link-type access
[sw4-GigabitEthernet0/0/2]port default vlan 3
[sw4-GigabitEthernet0/0/2]quit
查看vlan信息:display vlan
(2)sw1和sw2上vlan,trunk,lacp配置:
lacp配置(sw1):
[sw1]lacp priority 1000
[sw1]int Eth-Trunk 12
[sw1-Eth-Trunk12]mode lacp-static
[sw1-Eth-Trunk12]load-balance dst-mac
[sw1-Eth-Trunk12]trunkport GigabitEthernet 0/0/23
[sw1-Eth-Trunk12]trunkport GigabitEthernet 0/0/24
[sw1-Eth-Trunk12]quit
(3)vlan间配置:
[sw1]vlan batch 2 to 9
[sw1]interface Eth-Trunk 12
[sw1-Eth-Trunk12]port link-type trunk
[sw1-Eth-Trunk12]port trunk allow-pass vlan all
[sw1-Eth-Trunk12]quit
[sw1]int g0/0/2
[sw1-GigabitEthernet0/0/2]port link-type trunk
[sw1-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[sw1-GigabitEthernet0/0/2]quit

[sw1]int g0/0/3
[sw1-GigabitEthernet0/0/3]port link-type trunk
[sw1-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[sw1-GigabitEthernet0/0/3]quit

[sw1]int g0/0/1
[sw1-GigabitEthernet0/0/1]port link-type access
[sw1-GigabitEthernet0/0/1]port default vlan 7
[sw1-GigabitEthernet0/0/1]quit

interface Vlanif 2
ip address 192.168.2.1 255.255.255.0

interface Vlanif 3
ip address 192.168.3.1 255.255.255.0

interface Vlanif 4
ip address 192.168.4.1 255.255.255.0

interface Vlanif 7
ip address 192.168.7.1 255.255.255.0

(3)acp配置(sw2):
[sw2]int Eth-Trunk 12
[sw2-Eth-Trunk12]mode lacp-static
[sw2-Eth-Trunk12]trunkport GigabitEthernet 0/0/23
[sw2-Eth-Trunk12]trunkport GigabitEthernet 0/0/24
[sw2-Eth-Trunk12]quit

vlan间配置:
[sw2]vlan batch 2 to 9
[sw2]interface Eth-Trunk 12
[sw2-Eth-Trunk12]port link-type trunk
[sw2-Eth-Trunk12]port trunk allow-pass vlan all
[sw2-Eth-Trunk12]quit

[sw2]int g0/0/2
[sw2-GigabitEthernet0/0/2]port link-type trunk
[sw2-GigabitEthernet0/0/2]port trunk allow-pass vlan all
[sw2-GigabitEthernet0/0/2]quit

[sw2]int g0/0/3
[sw2-GigabitEthernet0/0/3]port link-type trunk
[sw2-GigabitEthernet0/0/3]port trunk allow-pass vlan all
[sw2-GigabitEthernet0/0/3]quit

[sw2]int g0/0/1
[sw2-GigabitEthernet0/0/1]port link-type access
[sw2-GigabitEthernet0/0/1]port default vlan 8
[sw2-GigabitEthernet0/0/1]quit

interface Vlanif 5
ip address 192.168.5.1 255.255.255.0

interface Vlanif 6
ip address 192.168.6.1 255.255.255.0

interface Vlanif 8
ip address 192.168.8.1 255.255.255.0

ospf 的配置:
分别在R2,SW1,SW2配置ospf
R2:
配置IP地址略
配置ospf:
[R2]ospf 110
[R2-ospf-110]area 0
[R2-ospf-110-area-0.0.0.0]network 192.168.7.0 0.0.0.255
[R2-ospf-110-area-0.0.0.0]network 192.168.8.0 0.0.0.255
[R2-ospf-110-area-0.0.0.0]quit
[R2-ospf-110]quit

SW1的OSPF配置
ospf 110
area 0
network 192.168.7.0 0.0.0.255
network 192.168.2.0 0.0.0.255
network 192.168.3.0 0.0.0.255
network 192.168.4.0 0.0.0.255
network 192.168.9.0 0.0.0.255
quit
quit

SW2的ospf配置:
ospf 110
area 0
network 192.168.8.0 0.0.0.255
network 192.168.9.0 0.0.0.255
network 192.168.5.0 0.0.0.255
network 192.168.6.0 0.0.0.255
quit
quit

查看ospf学习达到路由表:
display ospf routing

4、单臂路由配置
SW3配置:
[sw3]vlan batch 10 to 11
int g0/0/1
port link-type trunk
port trunk allow-pass vlan all
quit

int g0/0/2
port link-type access
port default vlan 10
quit

int g0/0/3
port link-type access
port default vlan 11
quit

R4的单臂路由配置:
int G0/0/0.10
dot1q termination vid 10
ip address 192.168.10.1 255.255.255.0
arp broadcast enable
int G0/0/0.11
dot1q termination vid 11
ip address 192.168.11.1 255.255.255.0
arp broadcast enable

5、Rip的配置
分别R2,R3,R4上配置rip:
如:R3
rip
undo summary
version 2
network 192.168.12.0
network 192.168.13.0

6、配置路由器重分发
在R2上配置:
[R2]ospf 110
[R2-ospf-110]import-route rip 1
[R2-ospf-110]rip
[R2-rip-1]import-route ospf 110
[R2-rip-1]quit

查看路由表: display ip routing-table
查看接口配置IP地址: display ip interface brief

7、配置NAT及访问控制
在R2上配置:
(1)配置默认路由去往internet
ip route-static 0.0.0.0 0.0.0.0 200.0.0.2

(2)默认路由重分发
[R2]ospf 110
[R2-ospf-110]default-route-advertise
[R2-ospf-110]quit

[R2]rip
[R2-rip-1]default-route originate
[R2-rip-1]quit

(3)配置PAT实现内网能访问internet
[R2]nat address-group 1 200.0.0.100 200.0.0.100
[R2]acl 2000
[R2-acl-basic-2000]rule 0 permit source any
[R2-acl-basic-2000]quit
[R2]int g3/0/0
[R2-GigabitEthernet3/0/0]nat outbound 2000 address-group 1
[R2-GigabitEthernet3/0/0]quit

(4) configure static NAT, will release 2.10 server to the internet.
[R2] int G3 / 0/0
[R2-GigabitEthernet / 0/0] NAT Server Global 200.0.0.200 Inside 192.168.2.10
[R2-GigabitEthernet / 0/0] quit

(5) ACL control 192.168.10.0 network can not access Internet
ACL 3000
rule 0 Where do you want the deny IP Source 200.0.0.0 192.168.10.0 0.0.0.255 0.0.0.255
rule. 5 Where do you want the deny IP Source 201.0.0.0 192.168.10.0 0.0.0.255 0.0. 0.255

[R2]int g0/0/2
[R2-GigabitEthernet0/0/2]traffic-filter inbound acl 3000
[R2-GigabitEthernet0/0/2]quit

View NAT translations: display nat session all
to see ACL information: display acl all
view ospf neighbor information: display ospf peer brief

Guess you like

Origin blog.51cto.com/14400213/2443738