2 月 262014
 

双WAN线路接入,不同服务通过映射走不同WAN口进入内部网络
链路冗余,主线路中断后流量切换至第二条线路(出站)

通过show run查看接口和VLAN划分情况

interface Vlan1
 nameif inside
 security-level 100
 ip address 192.168.15.1 255.255.255.0
 !
interface Vlan2
 nameif outside
 security-level 0
 ip address 192.168.3.100 255.255.252.0
 !
interface Vlan3
 nameif outside1
 security-level 0
 ip address 172.16.19.2 255.255.255.0

定义两个网络对象

object network obj_any
 subnet 0.0.0.0 0.0.0.0
object network obj_172
 subnet 0.0.0.0 0.0.0.0

用来进行OUTSIDE口IP映射的内部主机192.168.15.11 端口3389

OUTSIDE(0/0)口IP 192.168.3.100 使用的映射IP 192.168.3.101
OUTSIDE1(0/1)口IP 172.16.19.2 使用的映射IP 172.16.19.13

object network 192.168.15.11
 host 192.168.15.11
object network 192.168.15.11-2
 host 192.168.15.11
object-group service 192.168.3.101
 service-object tcp-udp destination eq 3389
object-group service 172.16.19.13
 service-object tcp-udp destination eq 3389

访问控制列表规则

access-list outside_access extended permit object-group 192.168.3.101 any object 192.168.15.11
access-list outside_access extended permit object-group 172.16.19.13 any object 192.168.15.11-2
access-list outside_access_in extended permit ip any any

NAT规则

object network obj_any
 nat (inside,outside) dynamic interface
object network 192.168.15.11
 nat (inside,outside) static 192.168.3.101 dns
object network obj_172
 nat (inside,outside1) dynamic interface
object network 192.168.15.11-2
 nat (inside,outside1) static 172.16.19.13 dns

在接口上应用规则

access-group outside_access_in in interface outside control-plane
access-group outside_access in interface outside
access-group outside_access_in in interface outside1 control-plane
access-group outside_access in interface outside1

两条外部接口的静态路由,默认路由接口为OUTSIDE(0/0)

route outside 0.0.0.0 0.0.0.0 192.168.1.254 1
route outside1 0.0.0.0 0.0.0.0 172.16.19.1 2
2 月 212014
 

Switch#show run
Building configuration…

Current configuration : 4399 bytes
!
version 12.2
no service pad
service timestamps debug datetime msec
service timestamps log datetime msec
no service password-encryption
!
hostname Switch
!
boot-start-marker
boot-end-marker
!
enable secret 5 $1$U1PF$YnQ2uAaiC1YK6UZIkDAeV.
!
no aaa new-model
system mtu routing 1500
ip subnet-zero
!
!
!
!
crypto pki trustpoint TP-self-signed-1979330816
enrollment selfsigned
subject-name cn=IOS-Self-Signed-Certificate-1979330816
revocation-check none
rsakeypair TP-self-signed-1979330816
!
!
crypto pki certificate chain TP-self-signed-1979330816
certificate self-signed 01
3082023F 308201A8 A0030201 02020101 300D0609 2A864886 F70D0101 04050030
31312F30 2D060355 04031326 494F532D 53656C66 2D536967 6E65642D 43657274
69666963 6174652D 31393739 33333038 3136301E 170D3933 30333031 30303031
31325A17 0D323030 31303130 30303030 305A3031 312F302D 06035504 03132649
4F532D53 656C662D 5369676E 65642D43 65727469 66696361 74652D31 39373933
33303831 3630819F 300D0609 2A864886 F70D0101 01050003 818D0030 81890281
8100DDE1 913626E2 19F3DDA8 5F258129 D06B5954 5F8FEAD0 486F5CCA 5B1F0D84
75112D9C A499D22B 43402FF8 27BA06BA 38BE32B8 17EB1AFA 4E2CFBA8 25B123F3
9CB7A5C0 9A874B8D F673622B 30DAF4DF 27A657FC 8DBC4DC3 9BF9700E 3C055E4F
7ED26B5C CBE1C956 999BACDD 9D7A465D A9EB0530 953964C0 ACA0EF13 08081350
9B910203 010001A3 67306530 0F060355 1D130101 FF040530 030101FF 30120603
551D1104 0B300982 07537769 7463682E 301F0603 551D2304 18301680 14374436
B41F70D7 AE9DB2F2 F465D9B9 B4536F55 2A301D06 03551D0E 04160414 374436B4
1F70D7AE 9DB2F2F4 65D9B9B4 536F552A 300D0609 2A864886 F70D0101 04050003
818100D9 66FD616B 342193AB 9C8A7BEB 7A130BC1 16F9A1F1 325539F3 0432D77C
9B3175A1 463315A3 4DA71799 9EE07075 3F166684 BE5EC920 651A4D06 31149E88
63EE9B1A 385A340D CF4A3186 A317033A 7BCF1CE2 55B6EC0E F5C2F9AD 3A6CFEC7
2E320916 BB702AFD 7CF954A3 95B6225A D79DAB79 870E40A5 95AEAB0A 041494F7 163F1A
quit
!
!
!
!
!
spanning-tree mode pvst
spanning-tree extend system-id
!
vlan internal allocation policy ascending
!
!
!
interface Port-channel1
switchport access vlan 11
switchport mode access
!
interface GigabitEthernet0/1
switchport mode trunk
!
interface GigabitEthernet0/2
switchport mode trunk
!
interface GigabitEthernet0/3
switchport mode trunk
!
interface GigabitEthernet0/4
switchport mode trunk
!
interface GigabitEthernet0/5
switchport mode trunk
!
interface GigabitEthernet0/6
switchport mode trunk
!
interface GigabitEthernet0/7
switchport mode trunk
!
interface GigabitEthernet0/8
switchport mode trunk
!
interface GigabitEthernet0/9
switchport mode trunk
!
interface GigabitEthernet0/10
switchport mode trunk
!
interface GigabitEthernet0/11
switchport access vlan 11
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/12
switchport access vlan 11
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/13
switchport access vlan 11
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/14
switchport access vlan 11
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/15
switchport access vlan 11
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/16
switchport access vlan 11
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/17
switchport access vlan 11
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/18
switchport access vlan 11
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/19
switchport access vlan 11
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/20
switchport access vlan 11
switchport mode access
spanning-tree portfast
!
interface GigabitEthernet0/21
switchport access vlan 11
switchport mode access
!
interface GigabitEthernet0/22
switchport access vlan 11
switchport mode access
!
interface GigabitEthernet0/23
switchport access vlan 11
switchport mode access
!
interface GigabitEthernet0/24
switchport access vlan 11
switchport mode access
!
interface Vlan1
no ip address
no ip route-cache
!
interface Vlan11
ip address 192.168.11.254 255.255.255.0
no ip route-cache
!
ip default-gateway 192.168.11.1
ip http server
ip http secure-server
!
control-plane
!
!
line con 0
logging synchronous
line vty 0 4
password *******
login
line vty 5 15
login
!
end