Network Diagram
Lab Content
- LAB-X01 : ตั้งค่า Hostname
- LAB-X02 : ตั้งค่า IPv4 Address
- LAB-X03 : ตั้งค่า IPv6 Address
- LAB-X04 : ตั้งค่า OSPFv2
- LAB-X05 : ตั้งค่า OSPF Network Type
- LAB-X06 : ตั้งค่า OSPF Cost
LAB-X01 : ตั้งค่า Hostname
IOS XR
RP/0/0/CPU0:ios#
RP/0/0/CPU0:ios# configure terminal
RP/0/0/CPU0:ios(config)# hostname XR1
RP/0/0/CPU0:ios(config)# commit
Tue Apr 4 13:57:17.310 UTC
RP/0/0/CPU0:XR1(config)#
RP/0/0/CPU0:XR1(config)#
IOS
Router# configure terminal
Enter configuration commands, one per line. End with CNTL/Z.
R1(config)# hostname R1
R1(config)#
LAB-X02 : ตั้งค่า IPv4 Address
IOS XR
RP/0/0/CPU0:XR1#
RP/0/0/CPU0:XR1# configure terminal
RP/0/0/CPU0:XR1(config)# interface Loopback0
RP/0/0/CPU0:XR1(config-if)# ipv4 address 2.2.2.2 255.255.255.255
RP/0/0/CPU0:XR1(config-if)# no shutdown
RP/0/0/CPU0:XR1(config-if)# interface GigabitEthernet0/0/0/0
RP/0/0/CPU0:XR1(config-if)# ipv4 address 172.16.0.2 255.255.255.0
RP/0/0/CPU0:XR1(config-if)# no shutdown
RP/0/0/CPU0:XR1(config-if)# commit
IOS
R1#
R1# configure terminal
R1(config)# interface Loopback0
R1(config-if)# ip address 1.1.1.1 255.255.255.255
R1(config-if)# no shutdown
R1(config-if)# interface GigabitEthernet0/0
R1(config-if)# ip address 172.16.0.1 255.255.255.0
R1(config-if)# no shutdown
ตรวจสอบการตั้งค่า IPv4 Address
IOS XR
RP/0/0/CPU0:XR1# show ipv4 interface brief
Tue Apr 4 13:49:43.691 UTC
Interface IP-Address Status Protocol Vrf-Name
Loopback0 2.2.2.2 Up Up default
MgmtEth0/0/CPU0/0 unassigned Shutdown Down default
GigabitEthernet0/0/0/0 172.16.0.2 Up Up default
GigabitEthernet0/0/0/1 unassigned Shutdown Down default
GigabitEthernet0/0/0/2 unassigned Shutdown Down default
IOS
R1# show ip interface brief
Interface IP-Address OK? Method Status Protocol
GigabitEthernet0/0 172.16.0.1 YES manual up up
GigabitEthernet0/1 unassigned YES NVRAM up up
GigabitEthernet0/2 unassigned YES NVRAM administratively down down
GigabitEthernet0/3 unassigned YES NVRAM administratively down down
Loopback0 1.1.1.1 YES manual up up
LAB-X03 : ตั้งค่า IPv6 Address
IOS XR
RP/0/0/CPU0:XR1#
RP/0/0/CPU0:XR1# configure terminal
RP/0/0/CPU0:XR1(config)# interface Loopback0
RP/0/0/CPU0:XR1(config-if)# ipv6 address 2001::2/128
RP/0/0/CPU0:XR1(config-if)# no shutdown
RP/0/0/CPU0:XR1(config-if)# interface GigabitEthernet0/0/0/0
RP/0/0/CPU0:XR1(config-if)# ipv6 address 2001:172:16::2/64
RP/0/0/CPU0:XR1(config-if)# no shutdown
RP/0/0/CPU0:XR1(config-if)# commit
IOS
R1#
R1# configure terminal
R1(config)# interface Loopback0
R1(config-if)# ipv6 address 2001::1/128
R1(config-if)# no shutdown
R1(config-if)# interface GigabitEthernet0/0
R1(config-if)# ipv6 address 2001:172:16::1/64
R1(config-if)# no shutdown
ตรวจสอบการตั้งค่า IPv6 Address
IOS XR
RP/0/0/CPU0:XR1# show ipv6 interface brief
Tue Apr 4 14:05:59.564 UTC
Loopback0 [Up/Up]
fe80::64d2:cbff:fed0:ae91
2001::2
MgmtEth0/0/CPU0/0 [Shutdown/Down]
unassigned
GigabitEthernet0/0/0/0 [Up/Up]
fe80::5200:ff:fe01:1
2001:172:16::2
GigabitEthernet0/0/0/1 [Shutdown/Down]
unassigned
GigabitEthernet0/0/0/2 [Shutdown/Down]
unassigned
IOS
R1# show ipv6 interface brief
GigabitEthernet0/0 [up/up]
FE80::5200:FF:FE02:0
2001:172:16::1
GigabitEthernet0/1 [up/up]
unassigned
GigabitEthernet0/2 [administratively down/down]
unassigned
GigabitEthernet0/3 [administratively down/down]
unassigned
Loopback0 [up/up]
FE80::5200:FF:FE02:0
2001::1
LAB-X04 : ตั้งค่า OSPFv2
IOS XR
RP/0/0/CPU0:XR1(config)# router ospf 1
RP/0/0/CPU0:XR1(config-ospf)# router-id 2.2.2.2
RP/0/0/CPU0:XR1(config-ospf)# area 0
RP/0/0/CPU0:XR1(config-ospf-ar)# interface Loopback0
RP/0/0/CPU0:XR1(config-ospf-ar-if)# exit
RP/0/0/CPU0:XR1(config-ospf-ar)# interface GigabitEthernet0/0/0/0
RP/0/0/CPU0:XR1(config-ospf-ar-if)# commit
IOS
R1(config)# router ospf 1
R1(config-router)# router-id 1.1.1.1
R1(config-router)# network 1.1.1.1 0.0.0.0 area 0
R1(config-router)# network 172.16.0.1 0.0.0.0 area 0
ตรวจสอบ OSPFv2
IOS XR
RP/0/0/CPU0:XR1# show ospf neighbor
Tue Apr 4 14:16:49.610 UTC
* Indicates MADJ interface
# Indicates Neighbor awaiting BFD session up
Neighbors for OSPF 1
Neighbor ID Pri State Dead Time Address Interface
1.1.1.1 1 FULL/ DR 00:00:36 172.16.0.1 GigabitEthernet0/0/0/0
Neighbor is up for 08:57:30
RP/0/0/CPU0:XR1# show ospf database
Tue Apr 4 14:18:54.651 UTC
OSPF Router with ID (2.2.2.2) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 347 0x8000001a 0x00bf84 3
2.2.2.2 2.2.2.2 230 0x8000001a 0x005ddd 3
RP/0/0/CPU0:XR1# show route ospf
Tue Apr 4 14:22:30.396 UTC
O 1.1.1.1/32 [110/2] via 172.16.0.1, 00:00:04, GigabitEthernet0/0/0/0
RP/0/0/CPU0:XR1# show ospf interface g0/0/0/0
Tue Apr 4 14:27:42.205 UTC
GigabitEthernet0/0/0/0 is up, line protocol is up
Internet Address 172.16.0.2/24, Area 0
Process ID 1, Router ID 2.2.2.2, Network Type BROADCAST, Cost: 1
Transmit Delay is 1 sec, State DR, Priority 1, MTU 1500, MaxPktSz 1500
Designated Router (ID) 2.2.2.2, Interface address 172.16.0.2
Backup Designated router (ID) 1.1.1.1, Interface address 172.16.0.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
Hello due in 00:00:03:762
Index 2/2, flood queue length 0
Next 0(0)/0(0)
Last flood scan length is 1, maximum is 2
Last flood scan time is 0 msec, maximum is 0 msec
LS Ack List: current length 0, high water mark 2
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 1.1.1.1 (Backup Designated Router)
Suppress hello for 0 neighbor(s)
Multi-area interface Count is 0
IOS
R1# show ip ospf neighbor
Neighbor ID Pri State Dead Time Address Interface
2.2.2.2 0 FULL/ BDR 00:00:39 172.16.0.2 GigabitEthernet0/0
R1# show ip ospf database
OSPF Router with ID (1.1.1.1) (Process ID 1)
Router Link States (Area 0)
Link ID ADV Router Age Seq# Checksum Link count
1.1.1.1 1.1.1.1 126 0x8000001D 0x006815 2
2.2.2.2 2.2.2.2 128 0x8000001C 0x005A17 2
Net Link States (Area 0)
Link ID ADV Router Age Seq# Checksum
172.16.0.2 2.2.2.2 128 0x80000001 0x005017
R1# show ip route ospf
Gateway of last resort is not set
2.0.0.0/32 is subnetted, 1 subnets
O 2.2.2.2 [110/2] via 172.16.0.2, 00:03:03, GigabitEthernet0/0
R1# show ip ospf interface gi0/0
GigabitEthernet0/0 is up, line protocol is up
Internet Address 172.16.0.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 1.1.1.1, Network Type BROADCAST, Cost: 1
Topology-MTID Cost Disabled Shutdown Topology Name
0 1 no no Base
Transmit Delay is 1 sec, State BDR, Priority 1
Designated Router (ID) 2.2.2.2, Interface address 172.16.0.2
Backup Designated router (ID) 1.1.1.1, Interface address 172.16.0.1
Timer intervals configured, Hello 10, Dead 40, Wait 40, Retransmit 5
oob-resync timeout 40
Hello due in 00:00:02
Supports Link-local Signaling (LLS)
Cisco NSF helper support enabled
IETF NSF helper support enabled
Index 2/2, flood queue length 0
Next 0x0(0)/0x0(0)
Last flood scan length is 1, maximum is 1
Last flood scan time is 0 msec, maximum is 0 msec
Neighbor Count is 1, Adjacent neighbor count is 1
Adjacent with neighbor 2.2.2.2 (Designated Router)
Suppress hello for 0 neighbor(s)
LAB-X05 : ตั้งค่า OSPF Network Type
IOS XR
RP/0/0/CPU0:XR1(config)# router ospf 1
RP/0/0/CPU0:XR1(config-ospf)# area 0
RP/0/0/CPU0:XR1(config-ospf-ar)# interface gigabitEthernet0/0/0/0
RP/0/0/CPU0:XR1(config-ospf-ar-if)# network point-to-point
RP/0/0/CPU0:XR1(config-ospf-ar-if)# commit
IOS
R1(config)# interface gigabitEthernet 0/0
R1(config-if)# ip ospf network point-to-point
ตรวจสอบการตั้งค่า IPv4 Address
IOS XR
RP/0/0/CPU0:XR1# show ospf interface gigabitEthernet 0/0/0/0 | inc Network
Tue Apr 4 14:37:40.664 UTC
Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 1
IOS
R1# show ip ospf interface gigabitEthernet 0/0 | inc Network
Internet Address 172.16.0.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 1
LAB-X06 : ตั้งค่า OSPF Cost
ตรวจสอบค่า OSPF Cost เดิมก่อนปรับค่า
IOS XR
RP/0/0/CPU0:XR1# show ospf interface gigabitEthernet 0/0/0/0 | inc Network
Tue Apr 4 14:37:40.664 UTC
Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 1
IOS
R1# show ip ospf interface gigabitEthernet 0/0 | inc Network
Internet Address 172.16.0.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 1
ตั้งค่า OSPF Cost
IOS XR
RP/0/0/CPU0:XR1(config)# router ospf 1
RP/0/0/CPU0:XR1(config-ospf)# area 0
RP/0/0/CPU0:XR1(config-ospf-ar)# interface gigabitEthernet 0/0/0/0
RP/0/0/CPU0:XR1(config-ospf-ar-if)# cost 10
RP/0/0/CPU0:XR1(config-ospf-ar-if)# commit
IOS
R1(config)# interface gigabitEthernet 0/0
R1(config-if)# ip ospf cost 10
ตรวจสอบค่า OSPF Cost
IOS XR
RP/0/0/CPU0:XR1# show ospf interface gigabitEthernet 0/0/0/0 | inc Network
Tue Apr 4 14:37:40.664 UTC
Process ID 1, Router ID 2.2.2.2, Network Type POINT_TO_POINT, Cost: 10
IOS
R1# show ip ospf interface gigabitEthernet 0/0 | inc Network
Internet Address 172.16.0.1/24, Area 0, Attached via Network Statement
Process ID 1, Router ID 1.1.1.1, Network Type POINT_TO_POINT, Cost: 10
ไม่มีความคิดเห็น:
แสดงความคิดเห็น