5
Prepared by wichets – 0923921991 | E-SPACE TECHNOLOGIES CORPORATION การคอนฟิกส์ OSPF บน UBNT EDGE ROUTER ตัวอย่างเน็ตเวิร์คคอนฟิกส์ ไดอะแกรมประด้วย 3 เร้าเตอร์ที่ต้องการคอนฟิกส์เร้าให้เป็นแบบ OSPF

การคอนฟิกส์ OSPF บน Ubiquiti Edge Router

Embed Size (px)

Citation preview

Page 1: การคอนฟิกส์ OSPF บน Ubiquiti Edge Router

Prepared by wichets – 0923921991 | E-SPACE TECHNOLOGIES CORPORATION

การคอนฟกส OSPF บน UBNT EDGE ROUTER

ตวอยางเนตเวรคคอนฟกส

ไดอะแกรมประดวย 3 เราเตอรทตองการคอนฟกสเราใหเปนแบบ OSPF

Page 2: การคอนฟิกส์ OSPF บน Ubiquiti Edge Router

Prepared by wichets – 0923921991 | E-SPACE TECHNOLOGIES CORPORATION

ตงคาเราเตอร (R1)

ตงคา IP addresses.

ubnt@R1#set interfaces ethernet eth1 address 10.0.50.1/24

ตงคา OSPF.

ubnt@R1#set protocols ospf parameters router-id 10.0.50.1

ubnt@R1#set protocols ospf area 0.0.0.0 network 10.0.50.0/24

ตงคาเราเตอร (R2)

ตงคา IP addresses.

ubnt@R2#set interfaces ethernet eth1 address 10.0.50.2/24

ubnt@R2#set interfaces ethernet eth2 address 10.0.60.2/24

ตงคา OSPF.

ubnt@R2#set protocols ospf parameters router-id 10.0.50.2

ubnt@R2#set protocols ospf area 0.0.0.0 network 10.0.50.0/24

ubnt@R2#set protocols ospf area 0.0.0.0 network 10.0.60.0/24

Page 3: การคอนฟิกส์ OSPF บน Ubiquiti Edge Router

Prepared by wichets – 0923921991 | E-SPACE TECHNOLOGIES CORPORATION

ตงคาเราเตอร (R3)

ตงคา IP addresses.

ubnt@R3#set interfaces ethernet eth0 address 10.0.60.3/24

ตงคา OSPF.

ubnt@R3#set protocols ospf parameters router-id 10.0.60.3

ubnt@R3#set protocols ospf area 0.0.0.0 network 10.0.60.0/24

หลงจากตงคาคอนฟกสแลวท ากรตรวจสอบการเราวาถงกนหรอไม เราเตอร R1 จะเรยนรเนตเวรค 10.0.60.0/24 เนตจะเราไปถงโดย 10.0.50.2

ubnt@R1:~$ show ip route

Codes: K - kernel route, C - connected, S - static, R - RIP, O - OSPF,

I - ISIS, B - BGP, > - selected route, * - FIB route

S>* 0.0.0.0/0 [210/0] via 192.168.0.1, eth5

O 10.0.50.0/24 [110/10] is directly connected, eth1, 00:00:27

C>* 10.0.50.0/24 is directly connected, eth1

O>* 10.0.60.0/24 [110/20] via 10.0.50.2, eth1, 00:00:11

C>* 127.0.0.0/8 is directly connected, lo

C>* 172.16.3.0/24 is directly connected, eth2

ubnt@R1:~$ ping 10.0.60.3

PING 10.0.60.3 (10.0.60.3) 56(84) bytes of data.

64 bytes from 10.0.60.3: icmp_req=1 ttl=63 time=18.1 ms

^C

--- 10.0.60.3 ping statistics ---

1 packets transmitted, 1 received, 0% packet loss, time 0ms

rtt min/avg/max/mdev = 18.175/18.175/18.175/0.000 ms

ubnt@R1:~$ traceroute 10.0.60.3

traceroute to 10.0.60.3 (10.0.60.3), 30 hops max, 60 byte packets

1 10.0.50.2 (10.0.50.2) 0.251 ms 0.219 ms 0.175 ms

2 10.0.60.3 (10.0.60.3) 0.287 ms 0.248 ms 0.266 ms

Page 4: การคอนฟิกส์ OSPF บน Ubiquiti Edge Router

Prepared by wichets – 0923921991 | E-SPACE TECHNOLOGIES CORPORATION

ค าสงอนๆทใช

ค าสงใหแสดง ขอมลไอพของ OSPF

ubnt@R1:~$ show ip ospf

OSPF Routing Process, Router ID: 10.0.50.1

Supports only single TOS (TOS0) routes

This implementation conforms to RFC2328

RFC1583Compatibility flag is disabled

OpaqueCapability flag is disabled

Initial SPF scheduling delay 200 millisec(s)

Minimum hold time between consecutive SPFs 1000 millisec(s)

Maximum hold time between consecutive SPFs 10000 millisec(s)

Hold time multiplier is currently 1

SPF algorithm last executed 3m57s ago

SPF timer is inactive

Refresh timer 10 secs

Number of external LSA 0. Checksum Sum 0x00000000

Number of opaque AS LSA 0. Checksum Sum 0x00000000

Number of areas attached to this router: 1

Area ID: 0.0.0.0 (Backbone)

Number of interfaces in this area: Total: 1, Active: 1

Number of fully adjacent neighbors in this area: 1

Area has no authentication

SPF algorithm executed 3 times

Number of LSA 5

Number of router LSA 3. Checksum Sum 0x0000d444

Number of network LSA 2. Checksum Sum 0x00007d31

Number of summary LSA 0. Checksum Sum 0x00000000

Number of ASBR summary LSA 0. Checksum Sum 0x00000000

Number of NSSA LSA 0. Checksum Sum 0x00000000

Number of opaque link LSA 0. Checksum Sum 0x00000000

Number of opaque area LSA 0. Checksum Sum 0x00000000

Page 5: การคอนฟิกส์ OSPF บน Ubiquiti Edge Router

Prepared by wichets – 0923921991 | E-SPACE TECHNOLOGIES CORPORATION

ค าสงส าหรบใหแสดงสอบฐานขอมลไอพของ OSPF

ubnt@R1:~$ show ip ospf database

OSPF Router with ID (10.0.50.1)

Router Link States (Area 0.0.0.0)

Link ID ADV Router Age Seq# CkSum Link count

10.0.50.1 10.0.50.1 259 0x80000003 0x1f33 1

10.0.50.2 10.0.50.2 259 0x80000006 0x7131 2

10.0.60.3 10.0.60.3 279 0x80000003 0x43e0 1

Net Link States (Area 0.0.0.0)

Link ID ADV Router Age Seq# CkSum

10.0.50.2 10.0.50.2 260 0x80000001 0x283a

10.0.60.2 10.0.50.2 279 0x80000001 0x54f7

ubnt@R2:~$ show ip ospf neighbor

Neighbor ID Pri State Dead Time Address Interface RXmtL RqstL DBsmL

10.0.50.1 1 Full/Backup 31.462s 10.0.50.1 eth1:10.0.50.2 0 0 0

10.0.60.3 1 Full/Backup 31.633s 10.0.60.3 eth2:10.0.60.2 0 0 0

ค าสงเพอแสดง OSPF interface

ubnt@R1:~$ show ip ospf interface eth1

eth1 is up

ifindex 3, MTU 1500 bytes, BW 0 Kbit

Internet Address 10.0.50.1/24, Broadcast 10.0.50.255, Area 0.0.0.0

MTU mismatch detection:enabled

Router ID 10.0.50.1, Network Type BROADCAST, Cost: 10

Transmit Delay is 1 sec, State Backup, Priority 1

Designated Router (ID) 10.0.50.2, Interface Address 10.0.50.2

Backup Designated Router (ID) 10.0.50.1, Interface Address 10.0.50.1

Multicast group memberships: OSPFAllRouters OSPFDesignatedRouters

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

Hello due in 8.940s

Neighbor Count is 1, Adjacent neighbor count is 1