
-
交换部分:
-
路由部分:
-
访问控制部分:
-
交换部分
-
SW-1
[SW-1int Eth-Trunk 12
[SW-1-Eth-Trunk12]trunkport Ethernet 0/0/5 to 0/0/6
[SW-1-Eth-Trunk12]quit
-
SW-2
[SW-2]int Eth-Trunk 12
[SW-2-Eth-Trunk12]trunkport Ethernet 0/0/5 to 0/0/6
[SW-2-Eth-Trunk12]quit
-
SW-1
[SW-1]int Eth-Trunk 12
[SW-1-Eth-Trunk12]port link-type trunk
[SW-1-Eth-Trunk12]port trunk allow-pass vlan all
[SW-1-Eth-Trunk12]dis th
#
interface Eth-Trunk12
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
return
[SW-1-Eth-Trunk12]int e0/0/3
[SW-1-Ethernet0/0/3] port link-type trunk
[SW-1-Ethernet0/0/3] port trunk allow-pass vlan 2 to 4094
[SW-1-Ethernet0/0/3]int e0/0/4
[SW-1-Ethernet0/0/4] port link-type trunk
[SW-1-Ethernet0/0/4] port trunk allow-pass vlan 2 to 4094
[SW-1-Ethernet0/0/4]quit
-
SW-2
[SW-2]int Eth-Trunk 12
[SW-2-Eth-Trunk12]port link-type trunk
[SW-2-Eth-Trunk12]port trunk allow-pass vlan all
[SW-2-Eth-Trunk12]dis th
#
interface Eth-Trunk12
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
return
[SW-2-Eth-Trunk12]int e0/0/3
[SW-2-Ethernet0/0/3]port link-type trunk
[SW-2-Ethernet0/0/3] port trunk allow-pass vlan 2 to 4094
[SW-2-Ethernet0/0/3]int e0/0/4
[SW-2-Ethernet0/0/4]port link-type trunk
[SW-2-Ethernet0/0/4] port trunk allow-pass vlan 2 to 4094
[
SW-2-Ethernet0/0/4]quit
-
SW-3
[SW-3]int e0/0/3
[SW-3-Ethernet0/0/3] port link-type trunk
[SW-3-Ethernet0/0/3] port trunk allow-pass vlan 2 to 4094
[SW-3-Ethernet0/0/3]int e0/0/4
[SW-3-Ethernet0/0/4] port link-type trunk
[SW-3-Ethernet0/0/4] port trunk allow-pass vlan 2 to 4094
-
SW-4
[SW-4]int e0/0/3
[SW-4-Ethernet0/0/3] port link-type trunk
[SW-4-Ethernet0/0/3] port trunk allow-pass vlan 2 to 4094
[SW-4-Ethernet0/0/3]int e0/0/4
[SW-4-Ethernet0/0/4] port link-type trunk
[SW-4-Ethernet0/0/4] port trunk allow-pass vlan 2 to 4094
-
SW-1
-
SW-2
-
SW-3
[int e0/0/1 ]
[ ]port link-type access
[default vlan 10 ]port
[int e0/0/2 ]
[ ]port link-type access
[default vlan 20 ]port
[SW-4]int e0/0/1
[SW-4-Ethernet0/0/1] port link-type access
[SW-4-Ethernet0/0/1] port default vlan 10
[SW-4-Ethernet0/0/1]int e0/0/2
[SW-4-Ethernet0/0/2] port link-type access
[SW-4-Ethernet0/0/2] port default vlan 20
[SW-1]int vlan 10
[SW-1-Vlanif10]ip add 10.1.10.254 24
[SW-1-Vlanif10]quit
[SW-1]int vlan 20
[SW-1-Vlanif20]ip add 10.1.20.254 24
[SW-1-Vlanif20]quit
[SW-2]int vlan 10
[SW-2-Vlanif10]ip add 10.1.10.253 24
[SW-2-Vlanif10]quit
[SW-2]int vlan 20
[SW-2-Vlanif20]ip add 10.1.20.253 24
[SW-2-Vlanif20]quit
[SW-1]int e0/0/1
[SW-1-Ethernet0/0/1]port link-type access
[SW-1-Ethernet0/0/1]port default vlan 11
[SW-1-Ethernet0/0/1]quit
[SW-1]int vlan 11
[SW-1-Vlanif11]ip add 10.1.11.1 24
[SW-1-Vlanif11]quit
[SW-2]int e0/0/1
[SW-2-Ethernet0/0/1]port link-type access
[SW-2-Ethernet0/0/1]port default vlan 12
[SW-2-Ethernet0/0/1]quit
[SW-2]int vlan 12
[SW-2-Vlanif12]ip add 10.1.12.1 24
[R1]int gig 0/0/0
[R1-GigabitEthernet0/0/0]ip add 10.1.11.254 24
[R1-GigabitEthernet0/0/0]quit
[R1]int gig 0/0/1
[R1-GigabitEthernet0/0/1]ip add 10.1.12.254 24
[R1-GigabitEthernet0/0/1]quit
[R1]int g0/0/2
[R1-GigabitEthernet0/0/2]ip add 12.1.1.1 24
[R1-GigabitEthernet0/0/2]quit
[R2]int g0/0/2
[R2-GigabitEthernet0/0/2]ip add 12.1.1.2 24
[R2-GigabitEthernet0/0/2]quit
[R2]int g0/0/0
[R2-GigabitEthernet0/0/0]ip add 20.1.1.254 24
[R2-GigabitEthernet0/0/0]quit
-
SW-1
[SW-1]ospf 100
[SW-1-ospf-100]area 0
[SW-1-ospf-100-area-0.0.0.0]network 10.1.11.0 0.0.0.255
[SW-1-ospf-100-area-0.0.0.0]network 10.1.10.0 0.0.0.255
[SW-1-ospf-100-area-0.0.0.0]network 10.1.20.0 0.0.0.255
[SW-1-ospf-100-area-0.0.0.0]quit
-
SW-2
[SW-2]ospf 100
[SW-2-ospf-100]area 0
[SW-2-ospf-100-area-0.0.0.0]network 10.1.12.0 0.0.0.255
[SW-2-ospf-100-area-0.0.0.0]network 10.1.10.0 0.0.0.255
[SW-2-ospf-100-area-0.0.0.0]network 10.1.20.0 0.0.0.255
[SW-2-ospf-100-area-0.0.0.0]quit
-
R1
[R1]ospf 100
[R1-ospf-100]area 0
[R1-ospf-100-area-0.0.0.0]network 10.1.11.0 0.0.0.255
[R1-ospf-100-area-0.0.0.0]network 10.1.12.0 0.0.0.255
[R1-ospf-100-area-0.0.0.0]quit
[R1]ip route-static 0.0.0.0 0 12.1.1.2
[R1]ospf 100
[R1-ospf-100]default-route-advertise
[R1-ospf-100]quit
[R1]ospf 200
[R1-ospf-200]area 0
[R1-ospf-200-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[R1-ospf-200-area-0.0.0.0]quit
[R2]ospf 200
[R2-ospf-200]area 0
[R2-ospf-200-area-0.0.0.0]network 12.1.1.0 0.0.0.255
[R2-ospf-200-area-0.0.0.0]network 20.1.1.0 0.0.0.255
[R2-ospf-200-area-0.0.0.0]quit
[R1]nat address-group 0 12.1.1.10 12.1.1.10 //配置公网地址池
[R1]acl 2000
[R1-acl-basic-2000]rule permit source 10.1.10.0 0.0.0.255
[R1-acl-basic-2000]rule permit source 10.1.20.0 0.0.0.255 //ACL 定义私网地址
[R1]int g0/0/2
[R1-GigabitEthernet0/0/2]nat outbound 2000 address-group 0 //外网接口调用 ACL 规则
[R1-GigabitEthernet0/0/2]quit
[R1]acl 3000
[R1-acl-adv-3000]rule permit tcp source 10.1.10.0 0.0.0.255 destination 20.1.1.1 0 destination-port eq 80
[R1-acl-adv-3000]rule deny tcp source 10.1.20.0 0.0.0.255 destination 20.1.1.1 0 destination-port eq 21
[R1-acl-adv-3000]rule permit tcp source 10.1.20.0 0.0.0.255 destination 20.1.1.1 0 destination-port eq 21
[R1-acl-adv-3000]rule deny tcp source 10.1.20.0 0.0.0.255 destination 20.1.1.1 0 destination-port eq 80
[R1]int g0/0/2
[R1-GigabitEthernet0/0/2]traffic-filter outbound acl 3000
版权声明:本文内容由互联网用户自发贡献,该文观点仅代表作者本人。本站仅提供信息存储空间服务,不拥有所有权,不承担相关法律责任。如发现本站有涉嫌侵权/违法违规的内容, 请发送邮件至 举报,一经查实,本站将立刻删除。
文章由极客之音整理,本文链接:https://www.bmabk.com/index.php/post/249146.html