一、實驗結果:
1、 内網使用者可以上外網(模拟ISP)。
2、 外網使用者可以通過R1公網位址通路内網FTP、WWW伺服器。
3、 内網所有路由器和網段通過OSPF路由協定通信。
4、 雙出口資料分流,PC1 PC2出口預設通過2.1.1.1 ,PC3出口預設通過1.1.1.1實作資料向不同營運商分流 。
二、實驗拓撲:
篇幅精力有限,僅提供重要配置資訊R1、R4作為參考,如有需求留言我私發所有配置資訊。
重點提供R1的配置資訊,同時提供R4配置做為其他路由器配置代表。
R1配置資訊
di cu
sysname R1
acl number 2000
rule 1 permit source 192.168.0.0 0.0.255.255 (定義NAT轉換流量)
acl number 2002 (定義政策路由的流量)
rule 4 permit source 192.168.2.0 0.0.0.255
rule 5 permit source 192.168.1.0 0.0.0.255
acl number 2003 (定義政策路由的流量)
rule 4 permit source 192.168.3.0 0.0.0.255
#
traffic classifier FW12 operator or
if-match acl 2002 (流量分類)
traffic classifier FW3 operator or
if-match acl 2003 (定義流量分類)
#
traffic behavior liantong (定義流量流量行為)
redirect ip-nexthop 1.1.1.1
traffic behavior dianxin
redirect ip-nexthop 2.1.1.1
#
traffic policy P1 (定義流量政策)
classifier FW12 behavior dianxin
classifier FW3 behavior liantong
#
interface GigabitEthernet0/0/0
ip address 10.1.1.1 255.255.255.0
traffic-policy P1 inbound (政策路由應用至接口)
#
interface GigabitEthernet0/0/1
ip address 10.1.2.1 255.255.255.0
traffic-policy P1 inbound (政策路由應用至接口)
#
interface GigabitEthernet0/0/2
ip address 1.1.1.2 255.255.255.0
nat outbound 2000 (NAT應用)
#
interface GigabitEthernet2/0/0
ip address 2.1.1.2 255.255.255.0
nat outbound 2000(NAT應用)
#
ospf 1 (OSPF配置)
default-route-advertise
area 0.0.0.0
network 10.1.1.0 0.0.0.255
network 10.1.2.0 0.0.0.255
#
ip route-static 0.0.0.0 0.0.0.0 1.1.1.1 (出口預設路由)
ip route-static 0.0.0.0 0.0.0.0 2.1.1.1 (出口預設路由)
#
return
-------我-是-分-割-線----------
R4配置資訊:
di cu
sysname R4
#
interface Ethernet0/0/0
ip address 10.1.6.1 255.255.255.0
#
interface Ethernet0/0/1
ip address 10.1.7.1 255.255.255.0
#
interface GigabitEthernet0/0/0
ip address 10.1.8.1 255.255.255.0
#
interface GigabitEthernet0/0/1
ip address 10.1.2.2 255.255.255.0
#
interface GigabitEthernet0/0/2
ip address 172.18.1.1 255.255.255.0
#
ospf 1 (OSPF配置)
area 0.0.0.0
network 10.1.8.0 0.0.0.255
network 172.18.1.0 0.0.0.255
network 10.1.2.0 0.0.0.255
network 10.1.6.0 0.0.0.255
network 10.1.7.0 0.0.0.255
return