cisco rip route

使用rip
(config)#router rip

(config-router)#version 2 //若要使用rip v1則省略此行
(config-router)#network < ip>
ps:rip1會自動決定subnet
ex:讓192.168.1.0/24與192.168.100.0/24網路使用ripv1
(config)#router rip
(config-router)#network 192.168.1.0
(config-router)#network 192.168.100.0
ex:讓192.168.10.128/27和192.168.10.32/27網路使用ripv1
(config)#router rip
(config-router)#network 192.168.10.0

設定被動rip
(config-router)#passive-interface < interface>
讓介面只接收訊息而不送出訊息
ps:因為沒有eighbor架構,所以不像eigrp和ospf一樣停止接收hello封包

設定rip平衡幾條同成本路徑負載的能力
(config-router)#maximum-paths < maximum>
maximum值為1-6,通常系統預設為4
各路徑需相同成本,也就是hop值要相同

定義鄰近的路由器可交換rip路由資訊
(config-router)#neighbor < ip>
在非廣播網路中設定rip,需取得其他鄰近rip路由器的資訊

ps:
(config-router)#?
network   Enable routing on an IP network
exit   Exit from routing protocol configuration mode
version   Set routing protocol version
redistribute   Redistribute information from another routing protocol
default-metric   Set metric of redistributed routes
distribute-list   Filter networks in routing updates
default-information   Control distribution of default information
distance   Control distribution of default information
passive-interface   Suppress routing updates on an interface
auto-summary   Enable automatic network number summarization

 

控制rip封包處理方式
(config-if)#ip rip < action> version < number>
action有send和receive,number可設1,2或1 2
ex:設定介面讓它只接受ripv1或ripv2封包
(config-if)#ip rip receive version 1 2


.......................

開啟rip偵錯模式
#[no] debug ip rip
顯示路由器處理rip的更新資訊

畫面大致如下
RIP protocol debugging is on
RIP: received update from 192.168.10.5 on Serial0/0 //serial0/0收到192.168.10.5來的空rip資訊
RIP: received update from 192.168.1.1 on Serial0/1 //serial0/1收到下面2行的rip資訊
 192.168.20.0 in 1 hops
 192.169.30.0 in 16 hops(inaccesable) //metric為16,該路徑無法到達,可能被poison

RIP: sending update to 255.255.255.255 via Serial0/0 (192.168.10.1) //將下面3行的rip資訊從serial0/0送出
 subnet 192.168.1.0, metric 1 //送出的rip資訊是:192.168.1.0,該網路直接相連的,也就是serial0/1的網路
 subnet 192.168.20.0, metric 2 //送出的網路不是相連的,必須還要越過一個router
 subnet 192.168.30.0, metric 16 //poison這route並宣傳出去

RIP: sending update to 255.255.255.255 via Serial0/1 (192.168.1.2) //將下面1行的rip資訊送出
 subnet 192.168.10.0, metric 1 //送出直接相連的serial0/0的網路
 subnet 192.168.20.0, metric 2 //將資訊送往從得到該資訊的界面,若出現此行表示沒啟動split-horizon機制

顯示rip相關資訊
#show ip protocols
畫面大致如下
Routing Protocol is "rip" //目前使用rip
Sending updates every 30 seconds, next due in 15 seconds //每30秒更新
Invalid after 180 seconds, hold down 180, flushed after 240
Outgoing update filter list for all interfaces is
Incoming update filter list for all interfaces is
Redistributing: rip
Default version control: send version 1, receive any version
 Interface Send Recv Key-chain
 Serial0 1 1 2
 Ethernet0 1 1 2
Routing for Networks:
 192.168.10.0 //路由的網段,這表示有執行network 192.168.10.0

Routing Information Sources:
Distance: (default is 120) //ad值為120

顯示rip路由表
#show ip route
...省略
C 192.168.100.0 is directly connected, Ethernet0
C 192.168.1.0 is directly connected, Ethernet1
R 192.168.2.0 [120/1] via 192.168.100.1, 00:00:21, Ethernet0

.........................................

啟用ripng
(config)# ipv6 router rip < process-name>
ps:運作ripng前,ipv6 unicast-routing指令需要被執行
(config-if)# ipv6 rip < process-name> enable
ps:介面啟用ripng前,介面需先啟用ipv6,否則會被拒絕執行


# show ipv6 route 2099::/64
Routing entry for 2099::/64
 Known via "rip barney", distance 120, metric 3
 Route count is 2/2, share count 0
 Routing paths:
  FE80::22FF:FE22:2222, Serial0/0/0.2 //到達2099::/64的next hop為FE80::22FF:FE22:2222(fe80表示為link local ipv6)
   Last updated 00:27:12 ago
  FE80::11FF:FE11:1111, Serial0/0/0.1
   Last updated 00:27:10 ago


# show ipv6 route rip
IPv6 Routing Table - Default - 19 entries
Codes: C - Connected, L - Local, S - Static, U - Per-user Static route
 B - BGP, M - MIPv6, R - RIP, I1 - ISIS L1
[omit]
R 2099::/64 [120/3]
via FE80::22FF:FE22:2222, Serial0/0/0.2 //到達2099::/64的NEXT HOP為FE80::22FF:FE22:2222(fe80表示為link local ipv6)
via FE80::11FF:FE11:1111, Serial0/0/0.1

 
# show ipv6 protocols
IPv6 Routing Protocol is "connected"
IPv6 Routing Protocol is "rip com1" //使用ripng的process-name為com1
 Interfaces:              //使用ripng的介面有3個
  Serial0/0/0.2 
  Serial0/0/0.1
  FastEthernet0/0
 Redistribution:
 None
該指令輸出的資訊比show ip protocols輸出的資訊少



# show ipv6 rip
RIP process "com1", port 521, multicast-group FF02::9, pid 258
 Administrative distance is 120. Maximum paths is 16
 Updates every 30 seconds, expire after 180 //30秒更新一次
 Holddown lasts 0 seconds, garbage collect after 120
 Split horizon is on; poison reverse is off
 Default routes are not generated
 Periodic updates 57, trigger updates 10
Interfaces: //使用ripng的介面有3個
 Serial0/0/0.2
 Serial0/0/0.1
 FastEthernet0/0
Redistribution:
 None

# show ipv6 rip next-hops
RIP process "com1", Next Hops //next hops都為link local位址
 FE80::11FF:FE11:1111/Serial0/0/0.1 [9 paths]
 FE80::44FF:FE44:4444/FastEthernet0/0 [3 paths]
 FE80::22FF:FE22:2222/Serial0/0/0.2 [9 paths]
顯示"Routing Information Sources" heading

RIPng使用link local ipv6做為next hop
為使link local位址容易辨識,可使用如下方法
1將mac改為好記的名字,讓系統使用eui64產生好記的link local位址
ex:mac設成0200.1111.1111,經過eui64計算後會成為0000:11ff:fe11:1111
2使用指令ipv6 address link-local手動指定好記的link local位址

 

2008-10-09 22:50:12發表 2012-12-16 18:22:47修改   

數據分析
程式開發
計算機組織與結構
資料結構與演算法
Database and MySql
manage tool
windows
unix-like
linux service
network
network layer3
network layer2
network WAN
network service
作業系統
數位鑑識
資訊安全解決方案
資訊安全威脅
Cisco security
Cisco network
Cisco layer3

Cisco layer2



  登入      [牛的大腦] | [單字我朋友] Powered by systw.net