华为练习3

LSW2:

#

vlan batch 10 20

#

interface Ethernet0/0/1

port link-type access

port default vlan 10

#

interface Ethernet0/0/2

port link-type access

port default vlan 20

#

interface Ethernet0/0/3

port link-type trunk

port trunk allow-pass vlan 2 to 4094

#

LSW3:

#

vlan batch 10 20

#

acl number 3000 //PC3不能访问web服务器

rule 5 deny ip source 192.168.10.0 0.0.0.255 destination 192.168.20.105 0

#

interface Ethernet0/0/1

port link-type access

port default vlan 10

traffic-filter inbound acl 3000 //ACL应用到接口上

#

interface Ethernet0/0/2

port link-type access

port default vlan 20

#

interface Ethernet0/0/3

port link-type trunk

port trunk allow-pass vlan 2 to 4094

#

LSW1:

#

vlan batch 10 20 30

#

dhcp enable //开启DHCP功能

#

ip pool vlan10 //配置地址池

gateway-list 192.168.10.254

network 192.168.10.0 mask 255.255.255.0

#

ip pool vlan20 //配置地址池

gateway-list 192.168.20.254

network 192.168.20.0 mask 255.255.255.0

#

interface Vlanif10

ip address 192.168.10.254 255.255.255.0

dhcp select global

#

interface Vlanif20

ip address 192.168.20.254 255.255.255.0

dhcp select global

#

interface Vlanif30

ip address 192.168.30.1 255.255.255.0

##

interface Eth-Trunk1 //端口聚合

Trunkport GigabitEthernet 0/0/1 to 0/0/2

port link-type access

port default vlan 30

#

interface GigabitEthernet0/0/3

port link-type trunk

port trunk allow-pass vlan 2 to 4094

#

interface GigabitEthernet0/0/4

port link-type trunk

port trunk allow-pass vlan 2 to 4094

##

rip 1

version 2

network 192.168.10.0

network 192.168.20.0

network 192.168.30.0

#

AR1:

#

interface Eth-Trunk1 //端口聚合

undo portswitch //将聚合组二层端口关闭才能给聚合组配置IP地址

Trunkport GigabitEthernet 0/0/1 to 0/0/2 //将端口1和2 添加为聚合组的成员

ip address 192.168.30.254 255.255.255.0

#

interface GigabitEthernet0/0/0

ip address 10.0.10.1 255.255.255.0

#

rip 1

version 2

network 192.168.30.0

network 10.0.0.0

AR2:

#

interface GigabitEthernet0/0/0

ip address 10.0.10.2 255.255.255.0

#

interface GigabitEthernet0/0/1

ip address 200.0.10.254 255.255.255.0

#

rip 1

version 2

network 10.0.0.0

network 200.0.10.0

#

评论
添加红包

请填写红包祝福语或标题

红包个数最小为10个

红包金额最低5元

当前余额3.43前往充值 >
需支付:10.00
成就一亿技术人!
领取后你会自动成为博主和红包主的粉丝 规则
hope_wisdom
发出的红包
实付
使用余额支付
点击重新获取
扫码支付
钱包余额 0

抵扣说明:

1.余额是钱包充值的虚拟货币,按照1:1的比例进行支付金额的抵扣。
2.余额无法直接购买下载,可以购买VIP、付费专栏及课程。

余额充值