HP OSPF 實驗(單區域)

 
一OSPF路由協議(單區域)
 
                       OSPF單區域拓撲圖

1、路由器上的配置

hostname "rr"

!

ip firewall

!

interface eth 0/1

  ip address  30.1.1.1  255.255.255.0 

  no shutdown

!

interface eth 0/2

  ip address  10.1.1.1  255.255.255.0 

  no shutdown

!

router ospf

  network 10.1.1.0 0.0.0.255 area 0.0.0.0

  network 30.1.1.0 0.0.0.255 area 0.0.0.0

2、SW1上的配置

hostname "sw1" 

ip routing 

snmp-server community "public" Unrestricted 

vlan 1 

   name "DEFAULT_VLAN" 

   untagged 1-2,4,6-24 

   ip address dhcp-bootp 

   no untagged 3,5 

   exit 

vlan 10 

   name "VLAN10" 

   untagged 3 

   ip address 10.1.1.2 255.255.255.0 

   exit 

vlan 20 

   name "VLAN20" 

   ip address 20.1.1.1 255.255.255.0 

   tagged 5 

   exit 

ip router-id 10.1.1.2    (自動生成)

router ospf

   area backbone

   exit

vlan 10

   ip ospf area backbone

   exit

vlan 20

   ip ospf area backbone

   exit

3、SW2上的配置

hostname "sw2" 

ip routing 

snmp-server community "public" Unrestricted 

vlan 1 

   name "DEFAULT_VLAN" 

   untagged 1-18,20-24 

   ip address dhcp-bootp 

   no untagged 19 

   exit 

vlan 20 

   name "VLAN20" 

   ip address 20.1.1.2 255.255.255.0 

   tagged 5 

   exit 

vlan 40 

   name "VLAN40" 

   untagged 19 

   ip address 40.1.1.1 255.255.255.0 

   exit 

ip router-id 20.1.1.2

router ospf

   area backbone

   exit

vlan 20

   ip ospf area backbone

   exit

vlan 40

   ip ospf area backbone

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