SW1
sysname SW1
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 GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan all
SW2
sysname SW2
dhcp enable
vlan batch 10 20 30 40 123
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan all
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan all
interface GigabitEthernet0/0/4
port link-type access
port default vlan 40
interface GigabitEthernet0/0/5
port link-type access
port default vlan 40
interface GigabitEthernet0/0/2
port link-type access
port default vlan 123
quit
interface Vlanif10
ip address 172.16.10.254 255.255.255.0
dhcp select interface
interface Vlanif20
ip address 172.16.20.254 255.255.255.0
dhcp select interface
interface Vlanif30
ip address 172.16.30.254 255.255.255.0
dhcp select interface
interface Vlanif40
ip address 10.2.40.254 255.255.255.0
interface Vlanif123
ip address 10.1.123.2 255.255.255.0
quit
ip route-static 0.0.0.0 0.0.0.0 10.1.123.1
ospf 1 router-id 6.6.6.6
area 0
network 172.16.0.0 0.0.255.255
network 10.1.123.2 0.0.0.0
network 10.2.40.254 0.0.0.0
SW3
sysname SW3
vlan batch 30
interface GigabitEthernet0/0/2
port link-type access
port default vlan 30
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan all
AR1
sysname R1
interface GigabitEthernet0/0/0
ip address 10.1.123.1 255.255.255.0
quit
ospf 1 router-id 1.1.1.1
area 0
network 10.1.123.1 0.0.0.0
quit
quit
dialer-rule
dialer-rule 1 ip permit
quit
interface Dialer 1
link-protocol ppp
ppp chap user 10086
ppp chap password cipher tanhax
dialer bundle 1
dialer-group 1
dialer user 10086
ip address ppp-negotiate
quit
interface GigabitEthernet0/0/1
pppoe-client dial-bundle-number 1
quit
acl 2000
rule permit
acl 3001
rule deny tcp source 10.2.40.252 0 destination 30.1.3.1 0 destination-port eq www
quit
interface Dialer 1
nat outbound 2000
quit
ip route-static 0.0.0.0 0 Dialer 1
interface GigabitEthernet 0/0/0
traffic-filter inbound acl 3001
ISP
sysname ISP
interface GigabitEthernet 0/0/0
ip address 14.1.14.2 24
quit
interface GigabitEthernet 0/0/2
ip address 13.1.13.2 24
quit
ospf 1 router-id 2.2.2.2
area 0
network 14.1.14.2 0.0.0.255
network 13.1.13.2 0.0.0.255
quit
ip pool ispdhcp
network 12.1.12.0 mask 26
gateway-list 12.1.12.1
dns-list 114.114.114.114
quit
interface Virtual-Template 1
ppp authentication-mode chap
ip address 12.1.12.1 26
remote address pool ispdhcp
quit
aaa
local-user 10086 password cipher tanhax
local-user 10086 service-type ppp
quit
interface GigabitEthernet 0/0/1
pppoe-server bind virtual-template 1
AR3
sysname AR3
interface GigabitEthernet 0/0/1
ip address 30.1.3.254 24
quit
interface GigabitEthernet 0/0/0
ip address 34.1.34.3 24
quit
interface GigabitEthernet 0/0/2
ip address 13.1.13.3 24
quit
ospf 1 router-id 3.3.3.3
area 0
network 30.1.3.254 0.0.0.0
network 34.1.34.3 0.0.0.0
network 13.1.13.3 0.0.0.0
AR4
sysname AR4
interface GigabitEthernet 0/0/1
ip address 40.1.4.254 24
quit
interface GigabitEthernet 0/0/0
ip address 14.1.14.4 24
quit
interface GigabitEthernet 0/0/2
ip address 34.1.34.4 24
quit
ospf 1 router-id 4.4.4.4
area 0
network 40.1.4.254 0.0.0.0
network 34.1.34.4 0.0.0.0
network 14.1.14.4 0.0.0.0
解析:
- VLAN 配置:
在SW1和SW3上使用了vlan batch命令来配置VLAN,分别指定了VLAN 10、20和30。 - 接口配置:
Access 端口配置:在SW1、SW2、SW3的一些接口上使用了port link-type access和port default vlan命令来配置访问端口和默认VLAN。
Trunk 端口配置:在SW1、SW2、SW3的一些接口上使用了port link-type trunk和port trunk allow-pass vlan all命令来配置Trunk端口,允许通过所有VLAN。 - IP 地址分配和接口配置:
在SW2上配置了多个VLAN接口(例如interface Vlanif10、interface Vlanif20等),并分配了各自的IP地址和子网掩码。
在AR3和AR4路由器上配置了物理接口(例如interface GigabitEthernet 0/0/1)并分配了IP地址。 - 静态路由配置:
在SW2交换机上使用了ip route-static命令配置了默认的静态路由。
在R1路由器上使用静态路由设置,默认网关通过 Dialer 1。 - OSPF 配置:
在R1、AR3、AR4路由器上配置了OSPF,使用了ospf命令来设置OSPF进程和区域,并使用network命令指定了路由器接口所属的网络。 - PPPoE 配置:
在ISP上配置了PPP over Ethernet(PPPoE)服务器,提供 DHCP IP 池和 DNS 设置,使用了interface Virtual-Template 1和相关的PPP配置命令。 - ACL 配置:
在AR1上配置了ACL 2000 允许所有源 IP 地址在 GigabitEthernet 0/0/1 进行 NAT 转换.
在AR1上配置了ACL 3001 阻止特定源 IP 为 10.2.40.252 的 TCP 流量访问目的地 IP 为 30.1.3.1 的端口 80, 在 GigabitEthernet 0/0/0 上应用入站流量过滤器。
评论 (0)