1. Trang chủ
  2. » Kỹ Thuật - Công Nghệ

từ khóa subnets khi redistribute.

6 206 0

Đang tải... (xem toàn văn)

THÔNG TIN TÀI LIỆU

Thông tin cơ bản

Định dạng
Số trang 6
Dung lượng 59,5 KB

Các công cụ chuyển đổi và chỉnh sửa cho tài liệu này

Nội dung

R2config#router eigrp 1 R2config-router#redistribute ospf 1?. match Redistribution of OSPF routes metric Metric for redistributed routes route-map Route map reference... Bandwidth metric

Trang 1

interface Loopback1

ip address 1.1.1.1 255.255.255.0

!

interface Loopback12

ip address 12.12.12.12 255.0.0.0

!

interface FastEthernet0/0

ip address 192.168.12.1 255.255.255.0 router eigrp 1

network 1.1.1.1 0.0.0.0

network 12.12.12.12 0.0.0.0

network 192.168.12.0

no auto-summary

R2# show run

router eigrp 1

network 192.168.12.0

auto-summary

!

router ospf 1

router-id 2.2.2.2

log-adjacency-changes

network 2.2.2.0 0.0.0.255 area 0 network 192.168.23.0 0.0.0.255 area 0 R2# sh ip route

Trang 2

C 192.168.12.0/24 is directly connected, FastEthernet0/0

1.0.0.0/24 is subnetted, 1 subnets

D 1.1.1.0 [90/156160] via 192.168.12.1, 00:25:13, FastEthernet0/0

2.0.0.0/24 is subnetted, 1 subnets

C 2.2.2.0 is directly connected, Loopback1

3.0.0.0/32 is subnetted, 1 subnets

O 3.3.3.3 [110/2] via 192.168.23.2, 00:12:09, FastEthernet1/0

4.0.0.0/32 is subnetted, 1 subnets

O 4.4.4.4 [110/2] via 192.168.23.2, 00:12:09, FastEthernet1/0

C 192.168.23.0/24 is directly connected, FastEthernet1/0

D 12.0.0.0/8 [90/156160] via 192.168.12.1, 00:02:20, FastEthernet0/0

R3# show ip route

2.0.0.0/32 is subnetted, 1 subnets

O 2.2.2.2 [110/2] via 192.168.23.1, 00:14:10, FastEthernet1/0

3.0.0.0/24 is subnetted, 1 subnets

C 3.3.3.0 is directly connected, Loopback3

4.0.0.0/25 is subnetted, 1 subnets

C 4.4.4.0 is directly connected, Loopback4

C 192.168.23.0/24 is directly connected, FastEthernet1/0

Sau đó vào R2 redistribute

R2(config-router)#redistribute eigrp 1 subnets

Và vào R3 xem lại

O E2 192.168.12.0/24 [110/20] via 192.168.23.1, 00:00:53, FastEthernet1/0 1.0.0.0/24 is subnetted, 1 subnets

O E2 1.1.1.0 [110/20] via 192.168.23.1, 00:00:53, FastEthernet1/0

2.0.0.0/32 is subnetted, 1 subnets

O 2.2.2.2 [110/2] via 192.168.23.1, 00:00:53, FastEthernet1/0

3.0.0.0/24 is subnetted, 1 subnets

C 3.3.3.0 is directly connected, Loopback3

4.0.0.0/25 is subnetted, 1 subnets

C 4.4.4.0 is directly connected, Loopback4

C 192.168.23.0/24 is directly connected, FastEthernet1/0

O E2 12.0.0.0/8 [110/20] via 192.168.23.1, 00:00:53, FastEthernet1/0 Sau đó vào lại R2 gõ lệnh.

R2(config)#router ospf 1

R2(config-router)#no redistribute eigrp 1 subnets

R2(config-router)#redistribute eigrp 1

Trang 3

% Only classful networks will be redistributed

Qua R3 xem thấy route 1.1.1.0/24 đã mất.

O E2 192.168.12.0/24 [110/20] via 192.168.23.1, 00:04:23, FastEthernet1/0

2.0.0.0/32 is subnetted, 1 subnets

O 2.2.2.2 [110/2] via 192.168.23.1, 00:04:23, FastEthernet1/0

3.0.0.0/24 is subnetted, 1 subnets

C 3.3.3.0 is directly connected, Loopback3

4.0.0.0/25 is subnetted, 1 subnets

C 4.4.4.0 is directly connected, Loopback4

C 192.168.23.0/24 is directly connected, FastEthernet1/0

O E2 12.0.0.0/8 [110/20] via 192.168.23.1, 00:04:23, FastEthernet1/0

Kết Luận:

Redistribute có dùng từ khóa subnets sẽ redistribute tất cả các route

Redistribute không dùng từ khóa subnets chỉ redistribute những mạng nào là major thôi [Không có từ khóa subnets]

Sau đó vào R2 bỏ redistribute qua R3

R2(config-router)#no redistribute eigrp 1 subnets

R2(config-router)#no redistribute eigrp 1

R2# show ip route

C 192.168.12.0/24 is directly connected, FastEthernet0/0

1.0.0.0/24 is subnetted, 1 subnets

D 1.1.1.0 [90/156160] via 192.168.12.1, 00:03:48, FastEthernet0/0

2.0.0.0/24 is subnetted, 1 subnets

C 2.2.2.0 is directly connected, Loopback1

3.0.0.0/32 is subnetted, 1 subnets

O 3.3.3.3 [110/2] via 192.168.23.2, 00:01:10, FastEthernet1/0

4.0.0.0/32 is subnetted, 1 subnets

O 4.4.4.4 [110/2] via 192.168.23.2, 00:01:10, FastEthernet1/0

C 192.168.23.0/24 is directly connected, FastEthernet1/0

D 12.0.0.0/8 [90/156160] via 192.168.12.1, 00:03:48, FastEthernet0/0

Ta thấy R2 học mạng loopback qua R3 chỉ toàn là /32 vì OSPF là giao thức linkstate nên nó sẽ quảng bá trạng thái link qua LSA chứ không quảng bá route.

Nên OSPF hiểu mạng loopback không kết nối bất cứ ai nên nó sẽ /32.

R3#sh ip os interface

Loopback3 is up, line protocol is up

Trang 4

Internet Address 3.3.3.3/8, Area 0

Process ID 1, Router ID 3.3.3.3, Network Type LOOPBACK, Cost: 1

Loopback interface is treated as a stub Host

Loopback4 is up, line protocol is up

Internet Address 4.4.4.4/25, Area 0

Process ID 1, Router ID 3.3.3.3, Network Type LOOPBACK, Cost: 1

Loopback interface is treated as a stub Host

Nên do đó ta chuyển Network Type LOOPBACK về dạng point-to-point để R2 học OSPF qua đúng /24 và /25.

R3(config)#int loopback 3

R3(config-if)#ip ospf network point-to-point

R3(config)#int loopback 4

R3(config-if)#ip ospf network point-to-point

Loopback4 is up, line protocol is up

Internet Address 4.4.4.4/25, Area 0

Process ID 1, Router ID 3.3.3.3, Network Type POINT_TO_POINT, Cost: 1

Transmit Delay is 1 sec, State POINT_TO_POINT,

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

oob-resync timeout 40

Index 2/2, flood queue length 0

Next 0x0(0)/0x0(0)

Last flood scan length is 0, maximum is 0

Last flood scan time is 0 msec, maximum is 0 msec

Neighbor Count is 0, Adjacent neighbor count is 0

Suppress hello for 0 neighbor(s)

Loopback3 is up, line protocol is up

Internet Address 3.3.3.3/8, Area 0

Process ID 1, Router ID 3.3.3.3, Network Type POINT_TO_POINT, Cost: 1

Transmit Delay is 1 sec, State POINT_TO_POINT,

Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5

oob-resync timeout 40

Index 1/1, flood queue length 0

Next 0x0(0)/0x0(0)

Last flood scan length is 0, maximum is 0

Last flood scan time is 0 msec, maximum is 0 msec

Neighbor Count is 0, Adjacent neighbor count is 0

Suppress hello for 0 neighbor(s)

Qua R2 xem lại.

R2#sh ip rou

C 192.168.12.0/24 is directly connected, FastEthernet0/0

1.0.0.0/24 is subnetted, 1 subnets

D 1.1.1.0 [90/156160] via 192.168.12.1, 00:14:30, FastEthernet0/0

2.0.0.0/24 is subnetted, 1 subnets

Trang 5

C 2.2.2.0 is directly connected, Loopback1

O 3.0.0.0/8 [110/2] via 192.168.23.2, 00:01:37, FastEthernet1/0

4.0.0.0/25 is subnetted, 1 subnets

O 4.4.4.0 [110/2] via 192.168.23.2, 00:01:37, FastEthernet1/0

C 192.168.23.0/24 is directly connected, FastEthernet1/0

D 12.0.0.0/8 [90/156160] via 192.168.12.1, 00:14:30, FastEthernet0/0

Bây giờ ta bắt đầu redistribute từ OSPF qua EIGRP [tiến hành trên R2 ]

R2# sh interface f0/0

FastEthernet0/0 is up, line protocol is up

Hardware is DEC21140, address is ca01.0204.0000 (bia ca01.0204.0000)

Internet address is 192.168.12.2/24

MTU 1500 bytes, BW 100000 Kbit, DLY 100 usec,

reliability 255/255, txload 1/255, rxload 1/255

Encapsulation ARPA, loopback not set

Keepalive set (10 sec)

Half-duplex, 100Mb/s, 100BaseTX/FX

ARP type: ARPA, ARP Timeout 04:00:00

Last input 00:00:01, output 00:00:04, output hang never

Last clearing of "show interface" counters never

Input queue: 0/75/0/0 (size/max/drops/flushes); Total output drops: 0

Queueing strategy: fifo

Output queue: 0/40 (size/max)

5 minute input rate 0 bits/sec, 0 packets/sec

5 minute output rate 0 bits/sec, 0 packets/sec

291 packets input, 27945 bytes

Received 289 broadcasts, 0 runts, 0 giants, 0 throttles

0 input errors, 0 CRC, 0 frame, 0 overrun, 0 ignored

0 watchdog

0 input packets with dribble condition detected

408 packets output, 34906 bytes, 0 underruns

0 output errors, 0 collisions, 0 interface resets

0 babbles, 0 late collision, 0 deferred

0 lost carrier, 0 no carrier

0 output buffer failures, 0 output buffers swapped out

Vì ta những route được redistribute từ R2 qua R1 sẽ chỉ qua cổng f0/0 nên ta show

sh interface f0/0 để xem những thông số về metric hồi đánh vào lúc redistribute R2(config)#router eigrp 1

R2(config-router)#redistribute ospf 1 ?

match Redistribution of OSPF routes

metric Metric for redistributed routes

route-map Route map reference

Trang 6

vrf VPN Routing/Forwarding Instance

R2(config-router)#redistribute ospf 1 metric ?

<1-4294967295> Bandwidth metric in Kbits per second

R2(config-router)#redistribute ospf 1 metric 100000 ?

<0-4294967295> EIGRP delay metric, in 10 microsecond units

R2(config-router)#redistribute ospf 1 metric 100000 100 ?

<0-255> EIGRP reliability metric where 255 is 100% reliable

R2(config-router)#redistribute ospf 1 metric 100000 100 255 ?

<1-255> EIGRP Effective bandwidth metric (Loading) where 255 is 100% loaded

R2(config-router)#redistribute ospf 1 metric 100000 100 255 1 ?

<1-65535> EIGRP MTU of the path

R2(config-router)#redistribute ospf 1 metric 100000 10 255 1 1500

Kết luận:

-Ta cũng thấy rõ là redistribute bất cứ giao thức nào vào EIGRP đều không có từ khóa subnets [nhưng EIGRP vẫn redistribue tất cả các subnet vào]

Vậy nếu R2 nối thêm một router R24 cũng chạy EIGRP với AS2 nữa chẳng hạn, thì

ta chỉ cần vào mode router EIGRP 2 mà redistribute từ OSPF vào EIGRP2.

Nhưng rủi cả R1 và R24 cùng chạy EIGRP 1 và cần thấy mạng R3 với một bên nối serial và một bên là fast internet thì chỉnh metric ra sao đây? Thì ta cứ việc chỉnh metric 1 1 1 1 1 Chỉnh metric chỉ có tác dụng cho R1 và R24 hiểu đúng metric đến mạng của R3 thôi.

-Và Delay mặc dầu trong interface là 100 nhưng ta chỉ gõ 10 là vì delay trong câu lệnh metric tính theo đơn vị 10.

Ngày đăng: 16/11/2014, 19:45

TỪ KHÓA LIÊN QUAN

w