interface FastEthernet0 ip address dhcp ip nat outside ip virtual-reassembly ! interface FastEthernet1 no ip address pppoe enable no cdp enable ! interface FastEthernet2 no cdp enable ! ! interface Vlan1 description LAN Interface ip address 192.168.108.1 255.255.255.0 ip nat inside ip virtual-reassembly ip tcp adjust-mss 1452 !---Define LAN-facing interfaces with "ip nat inside". ! ! Interface Dialer 0 description PPPoX dialer ip address negotiated ip nat outside ip virtual-reassembly ip tcp adjust-mss !---Define ISP-facing interfaces with "ip nat outside". ! ip route 0.0.0.0 0.0.0.0 dialer 0 track 123 ! ! ip nat inside source route-map fixed-nat interface Dialer0 overload ip nat inside source route-map dhcp-nat interface FastEthernet0 overload ! !--- Configure NAT overload (PAT) in order to use route-maps. ! access-list 110 permit ip 192.168.108.0 0.0.0.255 any ! !--- Define ACLs for traffic that are NATed to !--- the ISP connections. ! route-map fixed-nat permit 10 match ip address 110 match interface Dialer0 ! route-map dhcp-nat permit 10 match ip address 110 match interface FastEthernet0
啟用Load balancing
conf t
no ip cef
啟用端口追蹤
conf t # 設定sla偵測方式 ip sla 100 icmp-echo dest-ip source-ip local-ip frequency 5 timeout 5000 threshhold 5000 #啟用此sla偵測,不啟用無法偵測 ip sla schechdule 100 start-time now #將sla偵測套用至追蹤動作 track 105 ip sla 100 reachability #在路由設定上,將IP追蹤加入 ip route 0.0.0.0 0.0.0.0 e0/0 100.100.100.1 track 105
靜態one-to-one source NAT
ip nat inside source static inside-local-ip inside-global-ip