1、VLAN10、20的PC自动获取IP地址,DHCP服务器为LSW1
2、配置服务器,使内部VLAN10、20的PC可通过域名访问内部网站及互联网网站
3、使内部VLAN0、20的PC访问互联网使用AR3的G0/0/0的IP地址
4、要求互联网的服务器可访问内部服务器WWW.zibin.COM
5、配置互联网的设备,AR3与AR5不属于互联网设备
6、配置LSW1为根桥,LSW2的RP为G0/0/5,LSW3的根桥为G0/0/5,LSW2的G0/0/2口为阻塞
7、配置分支机构网络,使分支机构可访问互联网及总部WWW.zibin.COM,且IP地址被转换到AR5的G0/0/1接口IP
8、内部PC不可直接访问外部服务器,互联网不能有服务器的具体路由条目
LSW1相关配置
#
vlan batch 10 20 100 103 200
#
stp mode stp
stp instance 0 root primary
#
dhcp enable
#
interface Vlanif1
#
interface Vlanif10
ip address 192.168.10.254 255.255.255.0
dhcp select interface
dhcp server dns-list 192.168.200.1
#
interface Vlanif20
ip address 192.168.20.254 255.255.255.0
dhcp select interface
dhcp server dns-list 192.168.200.1
#
interface Vlanif100
ip address 192.168.100.254 255.255.255.0
#
interface Vlanif103
ip address 103.1.1.1 255.255.255.0
#
interface Vlanif200
ip address 192.168.200.254 255.255.255.0
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 103
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 200
#
interface GigabitEthernet0/0/5
port link-type access
port default vlan 100
#
interface GigabitEthernet0/0/6
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/7
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
ospf 1
area 0.0.0.0
network 103.1.1.0 0.0.0.255
network 192.168.10.0 0.0.0.255
network 192.168.20.0 0.0.0.255
network 192.168.200.0 0.0.0.255
network 192.168.100.0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 103.1.1.3
LSW2相关配置
#
vlan batch 10 20 290
#
stp mode stp
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
stp instance 0 cost 40000
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 2 to 4094
LSW3相应配置
#
vlan batch 10 20 209
#
stp mode stp
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/4
port link-type access
port default vlan 20
#
interface GigabitEthernet0/0/5
port link-type trunk
port trunk allow-pass vlan 2 to 4094
stp instance 0 cost 1
LSW4相应配置
#
vlan batch 30 40
#
interface GigabitEthernet0/0/1
port link-type access
port default vlan 30
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 40
#
interface GigabitEthernet0/0/3
port link-type trunk
port trunk allow-pass vlan 2 to 4094
LSW5相应配置
#
vlan batch 10 20
#
interface GigabitEthernet0/0/1
port link-type trunk
port trunk allow-pass vlan 2 to 4094
#
interface GigabitEthernet0/0/2
port link-type access
port default vlan 10
#
interface GigabitEthernet0/0/3
port link-type access
port default vlan 20
R1相应配置
#
interface GigabitEthernet0/0/0
ip address 12.1.1.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 13.1.1.1 255.255.255.0
#
ospf 1
area 0.0.0.0
network 12.1.1.0 0.0.0.255
network 13.1.1.0 0.0.0.255
R2相应配置
#
interface GigabitEthernet0/0/0
ip address 12.1.1.2 255.255.255.0
nat static global 12.1.1.10 inside 192.168.10.1 netmask 255.255.255.255
nat static global 12.1.1.20 inside 192.168.20.1 netmask 255.255.255.255
#
interface GigabitEthernet0/0/1
ip address 24.1.1.2 255.255.255.0
nat static global 24.1.1.10 inside 192.168.10.1 netmask 255.255.255.255
nat static global 24.1.1.20 inside 192.168.20.1 netmask 255.255.255.255
#
interface GigabitEthernet0/0/2.10
dot1q termination vid 10
ip address 192.168.10.254 255.255.255.0
arp broadcast enable
#
interface GigabitEthernet0/0/2.20
dot1q termination vid 20
ip address 192.168.20.254 255.255.255.0
arp broadcast enable
#
ospf 1
import-route rip 1
area 0.0.0.0
network 12.1.1.0 0.0.0.255
#
rip 1
version 2
network 24.0.0.0
import-route ospf 1 cost 10
R3相应配置
#
acl number 2000
rule 5 permit source 192.168.10.0 0.0.0.255
rule 10 permit source 192.168.20.0 0.0.0.255
rule 15 permit source 192.168.200.0 0.0.0.255
#
interface GigabitEthernet0/0/0
ip address 13.1.1.3 255.255.255.0
nat static global 13.1.1.100 inside 192.168.100.1 netmask 255.255.255.255
nat outbound 2000
#
interface GigabitEthernet0/0/1
ip address 103.1.1.3 255.255.255.0
#
ospf 1
area 0.0.0.0
network 103.1.1.0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 13.1.1.1
R4相应配置
#
interface GigabitEthernet0/0/0
ip address 24.1.1.4 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 45.1.1.4 255.255.255.0
#
rip 1
version 2
network 24.0.0.0
network 45.0.0.0
R5相应配置
#
acl number 2000
rule 5 permit source 192.168.30.0 0.0.0.255
rule 10 permit source 192.168.40.0 0.0.0.255
#
interface GigabitEthernet0/0/0.30
dot1q termination vid 30
ip address 192.168.30.254 255.255.255.0
arp broadcast enable
#
interface GigabitEthernet0/0/0.40
dot1q termination vid 40
ip address 192.168.40.254 255.255.255.0
arp broadcast enable
#
interface GigabitEthernet0/0/1
ip address 45.1.1.5 255.255.255.0
nat outbound 2000
#
ip route-static 0.0.0.0 0.0.0.0 45.1.1.4