2015年5月13日 星期三

RIP 選徑規劃 Version 2

客戶的LAN 192.168.1.0/24
視訊 192.168.1.100
設計目的:192.168.1.100走E0/2,192.168.1.0/24走E0/1。
需求1:在E0/2斷線時會走回至E0/1。(視訊線路斷線時,能走回一般線路)
需求2:E0/1斷線時,要走回E0/2 (這可能做不出來)
補充說明:這是使用IOU模擬器作的,也許是因為是模擬的關係offset往不同interface設定ofset的功能一直測不出來。(老實說是不太穩定,偶爾會浮出來)
只好放棄用offset的作法,否則的話...我覺得需求2應該可以做的出來。

*****************************************************************
測試架構:
PE1 -------------- PE2 ------------------ CE ----------------LAN

PE1#show ip interface brief | exclude unas
Interface                  IP-Address      OK? Method Status                Protocol
Loopback1                  192.168.2.1     YES NVRAM  up                    up

PE2#show ip interface brief  | e unass
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0/1                172.32.0.1      YES NVRAM  up                    up
Ethernet0/2                172.32.0.5      YES NVRAM  up                    up

CE#show ip interface brief | exclude unass
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0/0                172.31.0.1      YES NVRAM  up                    up
Ethernet0/1                172.32.0.2      YES NVRAM  up                    up
Ethernet0/2                172.32.0.6      YES NVRAM  up                    up

LAN#show ip interface brief | exclude unass
Interface                  IP-Address      OK? Method Status                Protocol
Ethernet0/0                172.31.0.2      YES NVRAM  up                    up
Loopback0                  192.168.1.100   YES NVRAM  up                    up


*****************************************
CE config:
interface Ethernet0/0
 ip address 172.31.0.1 255.255.255.252
!
interface Ethernet0/1
 ip address 172.32.0.2 255.255.255.252
!
interface Ethernet0/2
 ip address 172.32.0.6 255.255.255.252

router rip
 version 2
 redistribute static
 passive-interface default
 no passive-interface Ethernet0/1
 no passive-interface Ethernet0/2
 network 172.32.0.0
 distribute-list 1 out Ethernet0/1 (測試時發現若不在ACL 1加入deny 192.168.1.100,則會被帶入e0/1放過去對口,原因可能是因為192.168.1.100也是屬於192.168.1.0/24的關係,會被放行)
 distribute-list 2 out Ethernet0/2 (不下這行的話,則192.168.1.0/24和192.168.1.100/32的路由表在對口e0/2都會學到)
 no auto-summary
!
ip route 192.168.1.0 255.255.255.0 172.31.0.2
ip route 192.168.1.100 255.255.255.255 172.31.0.2
!
access-list 1 deny   192.168.1.100
access-list 1 permit 192.168.1.0 0.0.0.255
access-list 2 permit 192.168.1.100

PE1#ping vrf test 192.168.1.100

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 16/16/16 ms

PE2#
      192.168.1.0/24 is variably subnetted, 2 subnets, 2 masks
R        192.168.1.0/24 [120/1] via 172.32.0.2, 00:00:13, Ethernet0/1
R        192.168.1.100/32 [120/1] via 172.32.0.6, 00:00:13, Ethernet0/2

**************************************************************************
測試1:
我們將CE e0/2 IP拿掉,經過一段時間後,測試正常!!

PE2:
R     192.168.1.0/24 [120/1] via 172.32.0.2, 00:00:29, Ethernet0/1

PE1#ping vrf test 192.168.1.100

Type escape sequence to abort.
Sending 5, 100-byte ICMP Echos to 192.168.1.100, timeout is 2 seconds:
!!!!!
Success rate is 100 percent (5/5), round-trip min/avg/max = 12/15/16 ms
**************************************************************************
測試2:
我們將CE e0/1 IP拿掉。
但192.168.1.0/24就是浮不出來 (不過這個是一定的)





沒有留言:

張貼留言