OSPF單區域配置

OSPF單區域配置

實驗名稱:OSPF單區域配置

實驗拓撲:

clip_image002

實驗配置步驟:

交換部分:

Switch1

Enable

Vlan database

Vlan 10 name magi

Exit

將vlan10加入到端口f0/2

Conf t

Int fa0/2

Switchport mode access

Switchport access vlan 10

Switch2

Enable

Vlan database

Vlan 20 name zydx

Vlan 30 name cysd

Exit

Conf t

Int f0/2

Switchport mode access

Switchport access vlan 20

Int f0/3

Switchport mode access

Switchport access vlan 30

在switch1上關閉路由功能

Sw1(config)#no ip routing

在switch2上開啓路由功能

Sw2(config)#ip routing

interface Vlan20

ip address 192.168.50.254 255.255.255.0

!

interface Vlan30

ip address 192.168.60.254 255.255.255.0

!

interface GigabitEthernet0/1

no switchport

ip address 192.168.45.2 255.255.255.0

router ospf 1

log-adjacency-changes

network 192.168.45.0 0.0.0.255 area 0

network 192.168.50.0 0.0.0.255 area 0

network 192.168.60.0 0.0.0.255 area 0

!

環境測試:

PC2 ping測試PC1:

PC>ping 192.168.34.1

Pinging 192.168.34.1 with 32 bytes of data:

Reply from 192.168.34.1: bytes=32 time=8ms TTL=124

Reply from 192.168.34.1: bytes=32 time=2ms TTL=124

Reply from 192.168.34.1: bytes=32 time=2ms TTL=124

Reply from 192.168.34.1: bytes=32 time=2ms TTL=124

Ping statistics for 192.168.34.1:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 2ms, Maximum = 8ms, Average = 3ms

PC>

PC3 ping測試PC1:

PC>ping 192.168.34.1

Pinging 192.168.34.1 with 32 bytes of data:

Reply from 192.168.34.1: bytes=32 time=4ms TTL=124

Reply from 192.168.34.1: bytes=32 time=2ms TTL=124

Reply from 192.168.34.1: bytes=32 time=2ms TTL=124

Reply from 192.168.34.1: bytes=32 time=2ms TTL=124

Ping statistics for 192.168.34.1:

Packets: Sent = 4, Received = 4, Lost = 0 (0% loss),

Approximate round trip times in milli-seconds:

Minimum = 2ms, Maximum = 4ms, Average = 2ms

PC>

實驗完成。

 

發表評論
所有評論
還沒有人評論,想成為第一個評論的人麼? 請在上方評論欄輸入並且點擊發布.
相關文章